[Bash-completion-devel] [bash-completion-Bugs][311717] chsh -s: different behaviour for root

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Mon Jun 1 08:47:43 UTC 2009


Bugs item #311717, was opened at 01.06.2009 08:47 by Martin von Gagern
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311717&group_id=100114

Status: Open
Priority: 3
Submitted By: Martin von Gagern (gagern-guest)
Assigned to: Nobody (None)
Summary: chsh -s: different behaviour for root 
Distribution: Gentoo
Originally reported in: Gentoo Bugzilla
Milestone: None
Status: None
Original bug number: 271521


Initial Comment:
The bash completion for "chsh -s" uses the contents of /etc/shells as the list of posible completions. This makes sense for normal users, as their choice is usually restricted to one of these shells. However, there is no such restriction for root. In fact, on many systems there are binaries like /sbin/nologin or similar which are unsuitable as a login shell for normal users, but which are likely to be chosen by root as the login shell for special system accounts.

I therefore suggest that the completion for "chsh -s" detect whether it's run by UID 0, and if so, use normal path completin instead of using the contents from /etc/shells.

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311717&group_id=100114



More information about the Bash-completion-devel mailing list