LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-22-2008, 07:47 AM   #1
hansos
LQ Newbie
 
Registered: Jul 2008
Posts: 2

Rep: Reputation: 0
How to assign to all users the same password


On my server I have 100 users. (I'm superuser)
All the users have the same password: 'abcde'.
Now, I want to change (simultaneously) their password with 'newpass'.
What I should do ? Any suggestion about a script ?
Thank you in advance.

Last edited by hansos; 07-22-2008 at 07:50 AM.
 
Old 07-22-2008, 07:50 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Ummm.. why in the world would you have all users with the same password? You might as well just create one account with a password for them to share for easier maintenance.

The default passwords are md5 in /etc/shadow. Change the password for the first user, grab the encrypted password from /etc/shadow, then write a script to change the remaining within the shadow file. I'd advise to just allow the users to create their own passwords though. And you should really use better passwords rather than just newpass, something with Alpha-Numeric/Upper-Lower/Special-Character combination and longer than 6 characters.
 
Old 07-22-2008, 07:58 AM   #3
hansos
LQ Newbie
 
Registered: Jul 2008
Posts: 2

Original Poster
Rep: Reputation: 0
OK, I understand.
Do you suggest me a simple script to change the remaining passwords within the shadow file ?
Thank you.
----------------
Quote:
Originally Posted by trickykid View Post
Ummm.. why in the world would you have all users with the same password? You might as well just create one account with a password for them to share for easier maintenance.

The default passwords are md5 in /etc/shadow. Change the password for the first user, grab the encrypted password from /etc/shadow, then write a script to change the remaining within the shadow file. I'd advise to just allow the users to create their own passwords though. And you should really use better passwords rather than just newpass, something with Alpha-Numeric/Upper-Lower/Special-Character combination and longer than 6 characters.
 
  


Reply



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
Can't assign password to user corbis_demon Linux - General 2 02-22-2005 07:46 AM
assign new data partition to specific users wycolorado Linux - Newbie 2 01-01-2005 09:53 PM
how to assign users access to new partitions wycolorado SUSE / openSUSE 2 01-01-2005 09:48 PM
how can you assign a password to a new user want2learn Linux - Security 2 09-30-2004 07:50 AM
how to assign password for a user in shell script mtest Programming 10 10-29-2003 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:58 PM.

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