The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Root Password change bullz26 SUN Solaris 2 03-30-2008 11:09 AM
How to change ROOT password. angelofhell HP-UX 3 02-25-2008 06:44 AM
Change root password? kaugrs HP-UX 4 02-13-2008 12:16 PM
change root password duke0001 SUN Solaris 3 02-22-2007 12:10 PM
How to change root password on HP UX mle06 HP-UX 4 08-11-2006 11:03 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-17-2007
kvadivel80 kvadivel80 is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 2
script to change root password

Hi All,

I'm looking for a script to change root password for about 200 servers of both Solaris and Linux. I'm not very good at scripting, can anyone share a script if you already have one?
  #2 (permalink)  
Old 09-17-2007
anchal_khare anchal_khare is offline
Registered User
  
 

Join Date: Jun 2007
Location: Mumbai,India
Posts: 325
just for an idea...


#!/usr/bin/expect -f
spawn telnet server1
expect "login:"
send "root\r"
expect "Password:"
send "secret\r"
expect "server1>$"
send "passwd\r"
expect "password:"
send "new\r"
expect "retype password:"
send "new\r"
expect eof
  #3 (permalink)  
Old 09-17-2007
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is online now Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,947
Quote:
Originally Posted by kvadivel80 View Post
Hi All,

I'm looking for a script to change root password for about 200 servers of both Solaris and Linux. I'm not very good at scripting, can anyone share a script if you already have one?
maybe nis or ldap is a better solution...
  #4 (permalink)  
Old 09-18-2007
kvadivel80 kvadivel80 is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 2
The above script didnot work, we use ssh and NIS+ is our environment.
Sponsored Links
Closed Thread

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:38 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