The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

jailshell users 'passwd' problems

Discussion in 'General Discussion' started by ckrewt, Dec 25, 2007.

  1. ckrewt

    ckrewt Registered

    Joined:
    Dec 22, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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 :)
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The password is only being updated in the chroot environment, rather than the system. You will need to find another way of making the password change, rather than in the jailshell environment.
     
Loading...

Share This Page