The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Solaris 8 - Asks for current root password when trying to change root password. tferrazz SUN Solaris 8 04-07-2009 03:28 PM
how to change root password using shell script with standard password kurva Shell Programming and Scripting 2 02-25-2009 02:35 AM
Have users changed their password annemar UNIX for Dummies Questions & Answers 6 09-20-2006 05:18 AM
Change users login name spacewalker AIX 9 03-20-2006 11:09 AM
Change password by pushing encrypted password to systems benq70 UNIX for Dummies Questions & Answers 1 09-02-2005 10:08 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-11-2009
Tuxidow Tuxidow is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 47
Help- Change the password of users to common one

Hi all


I have some 106 users of which i need to change the password of them to a common one. I dont know their paswword. But i need to reset them to a common one. How can i do this with a shell script? It would be a great help if some one can help to sort out this.

I know it can be done using passwd command, but its a huge list and can't do it manually typing in the New password. Is there any way to change the password of these many users at a stretch by just passing the username and the password in a loop to the script?

-----Post Update-----


Code:
echo $PASS | passwd $USER --stdin

i got it.. :-)

-----Post Update-----


Code:
echo $PASS | passwd $USER --stdin

i got it.. :-)

Last edited by Tuxidow; 06-11-2009 at 06:27 AM..
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0