Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chsh.ldap fails on every shell #61

Open
miklcct opened this issue Oct 9, 2023 · 0 comments
Open

chsh.ldap fails on every shell #61

miklcct opened this issue Oct 9, 2023 · 0 comments

Comments

@miklcct
Copy link

miklcct commented Oct 9, 2023

chsh.ldap says every shell is an invalid shell:

[michael@vps ~]$ cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/fish
[michael@vps ~]$ chsh.ldap -s /usr/bin/fish
/usr/bin/chsh.ldap: /usr/bin/fish is an invalid shell
[michael@vps ~]$ chsh.ldap -s /bin/bash
/usr/bin/chsh.ldap: /bin/bash is an invalid shell

The following python script illustrate the source of the problem:

#!/usr/bin/env python3
import sys

sys.path.append('/usr/share/nslcd-utils')
import shells

for shell in shells.list_shells():
    print(shell)

print(shells.check('/bin/bash'))

Output:

b'/bin/sh'
b'/bin/dash'
b'/bin/bash'
b'/bin/rbash'
b'/usr/bin/fish'
./test.py: /bin/bash is an invalid shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant