Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    3

    Default jailshell users 'passwd' problems

    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. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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.

Similar Threads & Tags
Similar threads

  1. Shared folder for jailshell users
    By jacampbe in forum Security
    Replies: 0
    Last Post: 07-26-2010, 05:39 AM
  2. Jailshell users
    By demomen in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-12-2005, 10:52 AM
  3. users canot change pass (spawn /usr/bin/passwd)
    By icehosting in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-12-2003, 03:07 PM
  4. Jailshell - The quota of users doubled
    By suscp in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-10-2003, 09:49 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube