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


-------------------------------------------------------
From: Jerry Feldman [mailto:[EMAIL PROTECTED] 
Sent: 27 December 2007 04:48 PM

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.



-------------------------------------------------------
[Dirk said:]

:-o  you're right - sorry, my mistake  ....... first time user, but I
should have picked it up.

I can run the sudo command now  (sudo useradd -c .........).  I log in
as user "test", which I have given sudo rights to, but when I run

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

it only works if I enter the root passw0rd, instead of the test user's
passw0rd.   Why would this be ?   The documentation says that it will
ask for a password, but for the passw0rd of the user that is running the
sudo command.


Dirk


*** Disclaimer ***

The information contained in this e-mail is confidential and legally privileged 
and is intended solely for the addressee and to others who have the authority 
to receive it. Access to this e-mail by anyone else is unauthorized and as 
such, any disclosure, copying, distribution or any action taken or omitted in 
reliance on it is unlawful. If you have received this e-mail in error, please 
notify the sender immediately.

The views expressed in this e-mail are the views of the individual sender and 
should in no way be construed as the views of the Company.

The Company is not liable to ensure that outgoing e-mails are virus-free.

The Company is not liable, should information or data, for whatever reason, be 
corrupted or fail to reach its intended addressee.

The Company is not liable for any loss or damage of whatsoever nature and 
howsoever arising resulting from the opening or the use of the information in 
this e-mail, including its attachments and links.

The sender of this e-mail is subject to and bound by the terms and conditions 
of Company’s Electronic Communications Usage Policy.
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to