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.

safe_chown: Error Fetching the uid/gid

Discussion in 'General Discussion' started by tybor, Sep 28, 2005.

  1. tybor

    tybor Member

    Joined:
    Aug 12, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ottawa, Ontario, Canada
    Receiving the following when creating an account...


    Copying skel files from /root/cpanel3-skel/ to /usr/home/tstdomc/
    Added Entries to httpd.conf
    Bind reconfiguring on linux1 using rndc
    Added Named File
    safe_chown: Error Fetching the uid/gid
    Starting install, port: 80.

    Creating web http://www.tstdom.com.
    Chowning Content in service /.
    Cannot chown content: user tstdomc does not exist.
    Install completed.
    safe_chown: Error Fetching the uid/gidsafe_chown: Error Fetching the uid/gidSetting Password
    Frontpage passthough auth enabled!
    Restarting apache
    Ftp Password Files synced
    Vhost Passwords synced
    Notifcation => blah@blah.dom via EMAIL [level => 3]
    wwwacct creation finished

    Any ideas?? WHM 10.6.0 cPanel 10.8.0-R30

    This was working (as trial) before I purchased the key. I have run an update with --force

    I have not found anything in the forums that is recent and related to this.
     
  2. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    What distro and version is the server?

    What is the error message in /usr/local/cpanel/logs/error_log?
     
  3. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    From your errors it looks like /scripts/wwwacct was unable to add the new user to the system. The relevant code block is between line 806 and 811. This is what it looks like:
    Code:
    if ( -x "/usr/sbin/useradd" ) {
        system("/usr/sbin/groupadd","${user}");
        system("/usr/sbin/useradd","-d","${mnt}/${user}","-g","${user}","${user}");
    } else {
        system("/scripts/adduser","$user","$mnt","!!");
    }
    So first off, do /usr/sbin/groupadd and /usr/sbin/useradd exist on your system? If so, are they executable?
     
  4. tybor

    tybor Member

    Joined:
    Aug 12, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ottawa, Ontario, Canada
    FreeBSD 5.4-RELEASE i386

    Internal Error: "" Normal Connection Timeout (Probably closed browser on a HTTP/
    1.1 session) at cpsrvd.pl line 1469.
    Content-type: text/html

    Error repeats several times.. (probably as many times as I've treid to create accounts)

    Thanks for any help.
     
  5. tybor

    tybor Member

    Joined:
    Aug 12, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ottawa, Ontario, Canada
    Hmmm... no, they are not to be found in /usr/sbin

    linux1# find / -name groupadd
    linux1# find / -name useradd
    linux1# find / -name adduser
    /usr/local/cpanel/bin/adduser
    /usr/sbin/adduser
    /scripts/adduser
    linux1# find / -name addgroup
    linux1#


    /usr/sbin/pw does exist, and is executable..

    From /etc/passwd
    tstdomc:*:1007:31:User &:/usr/home/tstdomc:/bin/csh

    From /etc/group
    guest:*:31:
     
    #5 tybor, Sep 28, 2005
    Last edited: Sep 28, 2005
  6. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    Sorry, I assumed that you were not using FreeBSD. The script wwwacct will use pw to create the account, and on your system it looks like it failed to add the group. I would run some tests using pw and see if it functions correctly on its own.
     
  7. tybor

    tybor Member

    Joined:
    Aug 12, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ottawa, Ontario, Canada
    failed to add the group? It appears to be using the "guest" group in /etc/passwd

    Other thoughts?? Does the error from the log mean anything? :confused:

    Thanks..
     
  8. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
    The group is supposed to be the same as the user name that is created:

    fbsd54# pw adduser mytestuser -i 600,32000 -b /home/mytestuser
    fbsd54# grep mytest /etc/passwd
    mytestuser:*:1009:1011:User &:/home/mytestuser/mytestuser:/bin/sh
    fbsd54# grep mytest /etc/group
    mytestuser:*:1011:
     
  9. tybor

    tybor Member

    Joined:
    Aug 12, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Ottawa, Ontario, Canada
    linux1# pw adduser mytestuser -i 600,32000 -b /home/mytestuser
    linux1# grep mytest /etc/passwd
    mytestuser:*:1006:31:User &:/home/mytestuser/mytestuser:/bin/csh
    linux1# grep mytest /etc/group
    mail:*:6:tthost,mytestuser


    Hmmm... any idea where this is going wrong? Have I buggered up a conf file somewhere?

    -------------------------------------
    Just looked into pw.conf, and I had some funky settings in there. Minor changes to this file and all seems to be operational again.

    Thanks for your help in resolving this.. :)
     
    #9 tybor, Sep 28, 2005
    Last edited: Sep 28, 2005
Loading...

Share This Page