Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help - Creating a new user account script

Status
Not open for further replies.

brendan11

Programmer
Jul 16, 2001
10
IE
Folks,
I need a script that creates a new user account and assigns a password. This script will be called from a program that will pass the login and password. Also if the program is not running as root how do I get the script to run as root so that it can create the user?
Thanks.
 
Hi Brendan,
You can use software program called super for HP. sudo for sun to assign root access to particular program.
in sort you can run a program with uid 0.

For script
1. Use useradd command.
2. for uid grep the /etc/passwd's last line 3rd field and increment one for new user id.
3. if you are using NIS run /var/yp/make passwd.

Sachin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top