useradd

Hi.

due to some needs i gave a user the premission to use useradd command with sudo.
i want to know if there is a way to let him set the initial password, without giving him the premission to use passwd command as root (sudo).

maybe a way to set a default password for all the new users that created????

BTW - im using sun-solaris 8.

Dori

modify your sudoers file so that your

users can run command /usr/bin/passwd and /usr/sbin/userradd

so your /etc/sudoers file might look like

e# User alias specification
User_Alias HELPDESK = userA, userB, userC, UserD

e# Cmnd alias specificatione
Cmnd_Alias ADMIN = /usr/bin/passwd /usr/sbin/useradd

e# User privilege specification
HELPDESK ALL=ADMIN

when userA login in userA can set password by issuing

sudo passwd "username"

userB, userC and userD can also set password without the for root access

Thank you for the quick reply, I will try it.