LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-09-2003, 01:07 AM   #1
explorer1979
Member
 
Registered: Aug 2001
Location: Hong Kong, China
Distribution: CentOS, Red Hat, Mandrake, Debian
Posts: 88

Rep: Reputation: 15
Exclamation How to change all user password to the same?


Hi all,

I am a newbie, now my linux is RH 7.2 and running the sendmail, it have over 100 user at it for the e-mail service

Now, I want to change all that 100 person's password are same, like that one "rthdfkfg234#$%@"

How to do this easy?

I don't want to do like this,

passwd catherine
passwd sam
passwd teresa
...
....

How to quick to change all user's password, thanks
 
Old 04-09-2003, 08:29 AM   #2
NGraphiX
Member
 
Registered: Feb 2002
Location: Jerusalem, Israel
Distribution: Fedora Core 3
Posts: 154

Rep: Reputation: 30
this might work:
change one password say:
" passwd sam "
then view the hash in /etc/shadow and
copy the same hash to the rest of the users.
hope it helps, I'm not sure it will work.
 
Old 04-09-2003, 12:49 PM   #3
nakkaya
Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
or write a small shell script to run that command for you hundered times but i dont know how to get the usernames.
 
Old 04-09-2003, 01:02 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Re: How to change all user password to the same?

Quote:
Originally posted by explorer1979
Hi all,

I am a newbie, now my linux is RH 7.2 and running the sendmail, it have over 100 user at it for the e-mail service

Now, I want to change all that 100 person's password are same, like that one "rthdfkfg234#$%@"

How to do this easy?

I don't want to do like this,

passwd catherine
passwd sam
passwd teresa
...
....

How to quick to change all user's password, thanks
Assuming you have everything else configured right, you can edit /etc/passwd or /etc/shadow ( if you have shadow passwords enabled ). Make a backup version of the file you're just about to mess with, just in case.

Lets say you want to make Catherine and Teresa use Sam's password.

Find the password field ( MD5 hash - usually starts with $1$ ) against the username Sam. Replace the corresponding field against Catherine's and Teresa's. And so on if you want to do more.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM
what is the command to make a user change their password after creating a new user? naweenio Linux - Newbie 7 01-05-2005 07:07 AM
Change user password ust Linux - Software 2 12-31-2003 05:25 AM
About change user password ust Linux - General 1 12-23-2003 01:59 AM
Change user password ust Linux - Software 3 08-19-2003 03:37 AM


All times are GMT -5. The time now is 09:36 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration