On Thu, 27 Dec 2007 15:53:11 +0200
"Dirk Moolman" <[EMAIL PROTECTED]> wrote:

> I am trying to setup sudo rights on a specific user (username: test), to
> use the command: useradd
> 
> I have not used sudo before, and I played around with /etc/sudoers a
> bit, but I keep getting the error:
> 
>       useradd -c "JUST A TEST USER" -d /home/test -s /usr/bin/ksh
> test2
>       Cannot lock password file: already locked.
> 
> 
> My sudoers file looks like this currently:
> 
> /etc/sudoers
> 
> # create group LIMITEDTRUST with user test as a member
> User_Alias LIMITEDTRUST=test
> Cmnd_Alias PROGRAMS=/usr/sbin/useradd,/usr/bin/ksh
> 
> # members in the group LIMITEDTRUST are allowed to use sudo only with
> the commands listed in cmnd alias PROGRAMS
> 
> #LIMITEDTRUST ALL=PROGRAMS, NOPASSWD:PROGRAMS
> LIMITEDTRUST ALL = ALL
> 
> 
> I am using Suse SLES9.
> 
> What do I need to do / change to get user "test" to be able to use
> "useradd" ?
> 
> 
> Dirk


Try the following:
sudo useradd -c "JUST A TEST USER" -d /home/test -s /usr/bin/ksh test2

You need to use the sudo command.

-- 
Jerry Feldman <[EMAIL PROTECTED]>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9

Attachment: signature.asc
Description: PGP signature

Reply via email to