The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to change password? ipzig Post Here to Contact Site Administrators and Moderators 6 05-27-2008 04:15 AM
change password ?? varungupta UNIX for Advanced & Expert Users 4 03-03-2008 12:25 PM
How I Can Change The Password bobangarcia HP-UX 4 10-06-2005 11:06 PM
Change password by pushing encrypted password to systems benq70 UNIX for Dummies Questions & Answers 1 09-02-2005 06:08 AM
can't change password hassan2 UNIX for Advanced & Expert Users 9 12-23-2003 03:05 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-23-2008
Registered User
 

Join Date: Feb 2007
Posts: 30
Stumble this Post!
Non-interactive password change?

Does anyone know how I can do a non-interactive password change in Solaris 8 and 10?

Using Sed to edit the passwd file, or Expect to automate the process has already been considered.... I'm looking for something more direct.

Your guidance is appreciated.

akbar
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-23-2008
Registered User
 

Join Date: Feb 2008
Posts: 8
Stumble this Post!
Im guessing by "more direct", you mean "easier to implement".

The two methods you mentioned are pretty much the options available to you (which option you use depends on whether you want to use the encrypted or unencrypted password string).

Writing an expect script to reset a password is simple, just do a google search and you will have several working examples within minutes.

Using expect to run the "passwd" command protects the integrity of the file as it uses file locking to edit it, and a typo in your script is less likely to corrupt the shadow file.

Also if you are going to be changing passwords via a script keep in mind that it is bad security to leave passwords lying around hardcoded in scripts.
Reply With Quote
  #3 (permalink)  
Old 04-28-2008
Registered User
 

Join Date: Feb 2007
Posts: 30
Stumble this Post!
Quote:
Originally Posted by squall View Post
Im guessing by "more direct", you mean "easier to implement".

The two methods you mentioned are pretty much the options available to you (which option you use depends on whether you want to use the encrypted or unencrypted password string).

Writing an expect script to reset a password is simple, just do a google search and you will have several working examples within minutes.

Using expect to run the "passwd" command protects the integrity of the file as it uses file locking to edit it, and a typo in your script is less likely to corrupt the shadow file.

Also if you are going to be changing passwords via a script keep in mind that it is bad security to leave passwords lying around hardcoded in scripts.
Thanks for your reply, Squall. I'lve decided to proceed using expect after all.

best regards
akbar
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0