X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fvuseradd;h=ba5c9cfcf2d3e52cf13173becd72e316ee0be020;hb=c4de7f5b21fc299cc0462626fb1bfb5c33af5481;hp=fa580152174b189fa23eaa7373a5b2955ba0c6b3;hpb=5eaf3d83ac6661e3ac227849e997f7c20b948bf1;p=util-vserver-pl.git diff --git a/scripts/vuseradd b/scripts/vuseradd index fa58015..ba5c9cf 100755 --- a/scripts/vuseradd +++ b/scripts/vuseradd @@ -156,8 +156,11 @@ if [ -d "$__DEFAULT_VSERVERDIR/$NAME" ] ; then chmod 755 "$__DEFAULT_VSERVERDIR/$NAME" # Add user in vserver - $_VSERVER ----insecure $NAME suexec root sh -c \ - "groupadd -g $GROUPID $GROUPNAME ; useradd -u $USERID -g $GROUPID -p '' $NAME" + $_VSERVER $NAME start --rescue sh -c \ + "groupadd -g $GROUPID $GROUPNAME ; useradd -m -u $USERID -g $GROUPID -p '' $NAME" + + # Stop the guest (since it's persistent) + $_VSERVER $NAME stop # Add an unrestricted entry to /etc/sudoers file if [ -f "$__DEFAULT_VSERVERDIR/$NAME/etc/sudoers" ] && \