LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Thread Tools
Old 08-18-2006, 01:33 AM   #1
bv_uma
LQ Newbie
 
Registered: Aug 2006
Posts: 5
Thanked: 0
Request : set passwords for many users [user accounts exist] using a shell script


[Log in to get rid of this advertisement]
I have user accounts[temporary accounts used for conducting quizes] defined in /etc/passwd & /etc/shadow files.

As Administrator, I wish to set password for user accounts [say 100 in number] in bulk using a shell script. The shell script should read input from a text file containing <userid, and password in ascii text> and it should update the /etc/shadow or /etc/passwd file accordingly.
bv_uma is offline     Reply With Quote
Old 08-18-2006, 03:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 33,327
Thanked: 182
chpasswd can do various bulk operations, but i'd also suggest trying expect to automate any other detailed aspects if chpasswd doesn't fit in exactly with what you want, but i think it does.
acid_kewpie is offline     Reply With Quote
Old 08-18-2006, 04:13 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 5,040
Thanked: 223
newusers should do the job.
Code:
man newusers
for details.
bathory is online now     Reply With Quote
Old 08-19-2006, 10:01 AM   #4
bv_uma
LQ Newbie
 
Registered: Aug 2006
Posts: 5
Thanked: 0

Original Poster
thanks for reply regarding chpasswd for changing user passwords

Thanks to Chris for reply
regarding setting passwords for many users using chpasswd.
bv_uma is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set default Desktop environment while creating user accounts?? mayank_a Linux - Software 5 10-05-2005 07:26 AM
Need shell script to set passwords for already created users naren_0101bits Programming 2 08-28-2005 03:02 PM
can I set these flags using a shell script nirav.jani Linux - Security 1 01-12-2005 07:01 PM
giving user ability to change all users passwords mp5 Linux - Newbie 1 06-28-2004 09:02 PM
Cant set passwords for new users ribbones Linux - Newbie 2 09-03-2003 11:52 AM


All times are GMT -5. The time now is 02:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration