Hello Everyone,
First time caller long time listener! :P
I have a problem, I have been giving jailshells out to friends so they can IRC and what not However we have stumbled across a unique bug and im not sure how to fix it, Ive spent the day rummaging around google to no avail and im not sure how to solve it, Maybe you can all help me.
The problem is users on the jailshell environment cannot change there passwords via the shell command "passwd" the permissions of the binary are fine, They can run the application, It asks them for current password and enter there new password twice, It says its all been updated but the new password is never set, It just ends up the password i set for them, Without jailshell users can change there passwords fine, And i can use root to alter there passwords also, Demonstration below:
[root@hamunaptra ~]# adduser testuser -s /usr/local/cpanel/bin/jailshell
[root@hamunaptra ~]# passwd testuser
Changing password for user testuser.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@hamunaptra ~]# su testuser
[testuser@hamunaptra ~]$ passwd
Changing password for user testuser.
Changing password for testuser
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[testuser@hamunaptra ~]$ exit
exit
[root@hamunaptra ~]# ssh testuser@localhost
testuser@localhost's password: <password i changed it to on there shell>
Permission denied, please try again.
testuser@localhost's password: <original set password>
[testuser@hamunaptra ~]$
Also if i try to run 'passwd' for a second time after the first failure, I get this:
testuser@localhost's password:
[testuser@hamunaptra ~]$ passwd
Changing password for user testuser.
Changing password for testuser
(current) UNIX password:
passwd: Authentication token manipulation error
[testuser@hamunaptra ~]$
If anyone has a solution other then not giving users a normal shell i would be a very happy camper![]()



LinkBack URL
About LinkBacks
Reply With Quote




