LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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
  Search this Thread
Old 08-18-2006, 12:33 AM   #1
bv_uma
LQ Newbie
 
Registered: Aug 2006
Posts: 5

Rep: Reputation: 0
Request : set passwords for many users [user accounts exist] using a shell script


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.
 
Old 08-18-2006, 02:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 08-18-2006, 03:13 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
newusers should do the job.
Code:
man newusers
for details.
 
Old 08-19-2006, 09:01 AM   #4
bv_uma
LQ Newbie
 
Registered: Aug 2006
Posts: 5

Original Poster
Rep: Reputation: 0
thanks for reply regarding chpasswd for changing user passwords

Thanks to Chris for reply
regarding setting passwords for many users using chpasswd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:26 AM
Need shell script to set passwords for already created users naren_0101bits Programming 2 08-28-2005 02:02 PM
can I set these flags using a shell script nirav.jani Linux - Security 1 01-12-2005 06:01 PM
giving user ability to change all users passwords mp5 Linux - Newbie 1 06-28-2004 08:02 PM
Cant set passwords for new users ribbones Linux - Newbie 2 09-03-2003 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:22 AM.

Main Menu
Advertisement
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
Twitter: @linuxquestions
Open Source Consulting | Domain Registration