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

is shells.checks necessary? #13

Open
liuyangc3 opened this issue Aug 29, 2016 · 3 comments
Open

is shells.checks necessary? #13

liuyangc3 opened this issue Aug 29, 2016 · 3 comments

Comments

@liuyangc3
Copy link

liuyangc3 commented Aug 29, 2016

if I set a login shell which not list in /etc/shells via chsh.ldap -s will get an error

is not a valid shell

but I just don't want to putmy login script in /etc/shells
,becase it is a part of my project, I want modify it in the repo dir.

so why the shells must be in /etc/shells, is it for some specific purpose?

@arthurdejong
Copy link
Owner

The behaviour of chsh.ldap is similar to usual chsh: login shell changes are subject to having the shell listed in /etc/shells. This is also enforced by nslcd. When running chsh.ldap as root you should be able to set any shell (similar to regular chsh).

While in theory this could be relaxed a bit because the LDAP modify operation is done with the user's DN and access controls to prevent malicious actions should be enforced by the LDAP server I am reluctant to change this.

Patches to disable this exrta check are welcome.

By the way, I don't think the error is "is not a valid shell" but "/foo/bar is an invalid shell".

@ghost
Copy link

ghost commented Aug 23, 2017

a similar conversation about this is discussed in detail in this FreeBSD bug report.

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216014

The conclusion is that /etc/shells is meant to be maintained by the administrator of the server controlling what shells are allowed to be login shells, period. This is the way it was always intended on Unix systems and software that allows you to change your user's shell should obey what is in /etc/shells.

@miklcct
Copy link

miklcct commented Oct 9, 2023

This function is buggy. I am reporting a bug soon (#61)

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

3 participants