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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Linux password using perl

Status
Not open for further replies.

reason1000

IS-IT--Management
Feb 1, 2002
38
US
Hello,

I'm trying to put together a perl script that will allow for easier account creation. I would like our admins to be able to add an account with a command similar to "addacct username password" hit enter and it's done. To do this I need some way of specifying the password without having to type it twice. Please share any suggestions/ideas.

Thank you!
 
Might be better to have 'addact firstname lastname'. Use an algorithm to devise the user name, check to see if it already exists, if it does loop through appending 1, 2, 3 tc. to it until you find a usable name. Then add it, generating a random strong password that conforms to your site rules (they will have to change it the first time they log on anyway). Then display the results...


Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top