FS#15512 - /usr/bin/chsh does not work because the SUID permission isn't set
Attached to Project:
Arch Linux
Opened by none given (hoban) - Wednesday, 15 July 2009, 03:40 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 15 July 2009, 11:12 GMT
Opened by none given (hoban) - Wednesday, 15 July 2009, 03:40 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 15 July 2009, 11:12 GMT
|
Details
Description:
/usr/bin/chsh does not have the SUID permission set. Without being set, it does not successfully change a user's shell. We should set the SUID bit on the file, or perhaps look into setting capabilities on the file (I have no experience with this...). Thanks! Additional info: * package version(s) shadow 4.1.3.1-1 Steps to reproduce: testuser /root $ chsh Password: Changing the login shell for testuser Enter the new value, or press ENTER for the default Login Shell [/bin/bash]: /bin/sh Cannot change ID to root. testuser /root $ exit logout root ~ # which chsh /usr/bin/chsh root ~ # ls -l /usr/bin/chsh -rwxr-xr-x 1 root root 20400 2009-04-18 11:23 /usr/bin/chsh root ~ # chmod u+s /usr/bin/chsh root ~ # ls -l /usr/bin/chsh -rwsr-xr-x 1 root root 20400 2009-04-18 11:23 /usr/bin/chsh root ~ # !su su - testuser su: warning: cannot change directory to /home/testuser: No such file or directory testuser /root $ chsh Password: Changing the login shell for testuser Enter the new value, or press ENTER for the default Login Shell [/bin/bash]: /bin/sh testuser /root $ exit |
This task depends upon
Anyway, in the both packages are OK
$ tar -vtf i686/shadow-4.1.3.1-1-i686.pkg.tar.gz | grep "bin/chsh"
-rwsr-xr-x root/root 15996 2009-04-18 03:18 usr/bin/chsh
$ tar -vtf x86_64/shadow-4.1.3.1-1-x86_64.pkg.tar.gz | grep "bin/chsh"
-rwsr-xr-x root/root 20400 2009-04-18 14:23 usr/bin/chsh
Are you sure, that you don't play recently with the perms?