469,609 Members | 1,574 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

perl code for adding updating and deleting user in linux

Adding,Updating and Deleting user using perl script in linux
--------------------------------------------------------------------------------

hi,

If i can get help in writing perl code for adding updating and deleting user in linux.adds a user to the database file called passwd.

With the -a switch the program accepts a user-id and then prompts for a password, and a conformation. The username and password are then added to the passwd file.

updates a user's password. The -u switch accepts a user-id and prompts for a new password. This function then scans other password files and updates any password fields associated with that user-id

--------------------------------------------------------------------------------
Mar 29 '07 #1
1 1528
Motoma
3,237 Expert 2GB
You are going to probably tack the user line to the end of the passwd file, and use the passwd command line tool to update the password in the shadow file.

You will want to do some checking as well, to see if the user is already there. Regular expressions would be good for this.

Is this a homework problem?
Mar 29 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Pat Deegan | last post: by
reply views Thread by Kirt Loki Dankmyer | last post: by
1 post views Thread by Rebles | last post: by
1 post views Thread by pitjpz | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.