need script for passwd , can't use expect tool

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Infrastructure Monitoring need script for passwd , can't use expect tool
# 8  
Old 09-23-2003
Hi Nicol,

I still think that .rhosts should be your solution. The sysadmin should be willing to help you with that.
If he doesn't wants to, just tell him to start using NIS or LDAP Smilie

Regs David
# 9  
Old 09-23-2003
I don't understand the relationship between the ".rhosts" and the script i need !!!

christian
# 10  
Old 09-23-2003
Sorry, me either. I explained you that redirecting input is not working in this case.
The only solution I can think of is use .rhosts to log through without a password then type the passwd command.
This of course need to be automated to do it for all about 25 servers in one go. Looks awfull though re-typing your password 25 times.
Ha, ha you will never forget your new password at least Smilie

Ahum, sorry. No only expect, NIS or LDAP could be your solution. As you don't have it there is no workable solution for you.

Regs David
# 11  
Old 09-23-2003
If you can find the software cd for Sun Cluster, then there is a program on it called ccp. It allows you to build a list of servers (16 per group I think) and telnet to all 16 at the same time (opens 16 windows) and you then use a command window to do the same commands on all 16 systems.

It uses telnet to connect to the systems, does not require a license for Sun Cluster.

I have the following on my workstation (although I don't think all are required to run ccp)
system SUNWccon Sun Cluster Console
system SUNWccp Sun Cluster Control Panel
system SUNWclmon Sun Cluster Monitor
system SUNWcsnmp Sun Cluster SNMP agent
system SUNWscch Sun Cluster Common Help Files
system SUNWscins Sun Cluster Installation Scripts
system SUNWscsdb Sun Cluster Serialports/Clusters Database

This is what I used in the past to change root password on 120 servers (I'll be glad when they add ssh support to it). Now we only have around 30 servers but it's still better than going to each one.
# 12  
Old 09-23-2003
Hi RTM,

Is this something new that comes with SunCluster 3.0 ??
I only know this feature from E10k control. This is normaly installed on the SSP.
Don't know if you're mixing up, or if this realy is a new feature.

Regs David
# 13  
Old 09-23-2003
My hosts are AIX one and i don't have SUN and don't know if this product is compatible.

Today i use a semi automatic script which "rlogin" to each host and i send manually "passwd" then passwords but it's quite boring .

thanks

christian
# 14  
Old 09-23-2003
The one I used was on SunCluster 2.1 - if you put the cd in you can load the software (not all of it is needed but I don't remember which are and which are not) with no license needed (you can't run a cluster but can run the ccp program after setting up your /etc/clusters file).

I doubt this package is compatible with AIX (actually I know it's not). I would believe that it's possible to do this with any UNIX OS since it's more of a X-window thing than SUN thing. I tried messing around with it once (trying to get ssh to work with it) but it was beyond my patience and understanding.

Last edited by RTM; 09-23-2003 at 11:16 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Expect script returning string following a found expect.

I'm fairly new to scripting so this might not be possible. I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version: #show version ... (0 Replies)
Discussion started by: IBGaryA
0 Replies

2. Programming

Calling another expect script inside an expect script

I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues: set REMOTE "/root/scripts/remote" ... log_user 1 send_user "Executing remote script as $user...\n" send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies

3. Programming

Calling expect script inside another expect

Hi, Am very new to expect scripting.. Can You please suggest me how to call an expect script inside another expect script.. I tried with spawn /usr/bin/ksh send "expect main.exp\r" expect $root_prompt and spawn /usr/bin/ksh send "main.exp\r" expect $root_prompt Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies

4. Shell Programming and Scripting

script using expect tool

Hi All, I need ur help and suggestion to make my code efficient.I have to reset the password for multiple unix flavour using expect tool.There is one file in which I have mentioned ip address and main script will pickup those ip and reset all password and it will write to a log file whether it has... (1 Reply)
Discussion started by: manish_1678
1 Replies

5. Shell Programming and Scripting

Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting

This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies

6. Solaris

tool to convert /etc/passwd and etc/shadow

i wonder if there is a tool to read the /etc/passwd or /etc/shadow files in order to reset user accounts to the same one. By moving (restore) all filessytem and data to another same Sun box, none of the users are able to logon to the new box which i didn't change nothing. But if i reset the user... (1 Reply)
Discussion started by: lamoul
1 Replies

7. Shell Programming and Scripting

Expect passwd scripting

I am trying to write an expect script which will read information from a file that contains username and password, and change the password for each user accordingly. The list contains around 100 users. I am new to both Solaris and expect. I have successfully been able to set the first user's... (9 Replies)
Discussion started by: DoctorOctagon
9 Replies

8. Shell Programming and Scripting

Help with Expect tool Script

Problem Description: I have written the Expect script in Linux box, able to login from Linux to Windows and able to execute the command(eg, hostname) on windows server which produces some value. I want to pass this value from Windows to Linux box . Can we pass any parameter from Linux with expect... (2 Replies)
Discussion started by: khagendra
2 Replies

9. Shell Programming and Scripting

strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy). :) I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies

10. UNIX for Dummies Questions & Answers

'expect' tool

Can someone please provide a simple sample of syntax using the expect tool with an app. Let's say FTP. Maybe point me to where I may find some information on the syntax used. I'm not going to by a book on it. Thanks in advance! (2 Replies)
Discussion started by: shaggy
2 Replies
Login or Register to Ask a Question