ESXi

 View Only
  • 1.  Issues adding & modifying users in esxi

    Posted Apr 11, 2011 09:41 PM

    Hi

    I am facing couple issues with adding new administrative users in esxi

    I used the useradd command to add the user but it seems like the user is not getting added to the root group

    useradd -d /home/$ADMIN_USER -c $USER_DESCRIPTION -s /bin/ash -g "root" -n $ADMIN_USER

    I used the groupadd which worked. Is this the expected sequence or am i missing something in useradd?

    Second issue is for the new user if I use vSphere to modify the password, the shell "/bin/ash" is replaced by ''/sbin/nologin" and I can no longer log into the shell.

    Am I supposed to specify some additional options when I create the user to ensure this is preserverd.

    Thanks



  • 2.  RE: Issues adding & modifying users in esxi

    Posted Apr 12, 2011 06:59 AM

    Hi

    # useradd -d / -c "Test User" -s /bin/ash -n -g root -P -M usrtest
    # cat /etc/passwd | grep -i usrtest
    usrtest:x:507:100:Test User:/:/bin/ash
    # /usr/sbin/usermod -g root usrtest
    # /usr/sbin/usermod -G root usrtest
    # cat /etc/passwd | grep -i usrtest
    usrtest:x:507:0:Test User:/:/bin/ash
    # cat /etc/group | grep -i root
    root:x:0:root,usrtest


  • 3.  RE: Issues adding & modifying users in esxi

    Posted Apr 12, 2011 05:04 PM

    Thanks for your reply.

    groupadd seems to accomplish the adding to group as well so I assume just useradd alone is not sufficient.

    This still does not resolve the issue of the shell for the new user changing to /sbin/nologin on restart



  • 4.  RE: Issues adding & modifying users in esxi

    Posted Apr 12, 2011 11:09 PM