Sponsored Content
Special Forums UNIX and Linux Applications Infrastructure Monitoring need script for passwd , can't use expect tool Post 40773 by davidg on Tuesday 23rd of September 2003 09:46:21 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
pam_unix2(8)							 Reference Manual						      pam_unix2(8)

NAME
pam_unix2 - Standard PAM module for traditional password authentication DESCRIPTION
The pam_unix2 PAM module is for traditional password authentication. It uses standard calls from the glibc NSS libraries to retrieve and set account information as well as authentication. Usually this is obtained from the the local files /etc/passwd and /etc/shadow or from a NIS map. The options can be added in the PAM configuration files for every single service. /etc/security/pam_unix2.default defines, which password encryption algorithm should be used in case of a password change. OPTIONS
The following options may be passed to all types of management groups except session: debug A lot of debug information is printed with syslog(3). nullok Normally the account is disabled if no password is set or if the length of the password is zero. With this option the user is allowed to change the password for such accounts. This option does not overwrite a hardcoded default by the calling process. use_first_pass The default is, that pam_unix2 tries to get the authentication token from a previous module. If no token is available, the user is asked for the old password. With this option, pam_unix2 aborts with an error if no authentication token from a previous module is available. The following additional options may be passed to the passwd rules of this modules: nisdir=<path> This options specifies a path to the source files for NIS maps on a NIS master server. If this option is given, the passwords of NIS accounts will not be changed with yppasswd(1), instead the local passwd and shadow files below <path> will be modified. In conjunc- tion with rpasswdd(8) and pam_make rpc.yppasswdd(8) can be replaced with a more secure solution on the NIS master server. use_authtok Set the new password to the one provided by the previously stacked password module. If this option is not set, pam_unix2 would ask the user for the new password. One of the following options may be passed to the session rules of this modules: debug Some messages (login time, logout time) are logged to syslog with priority LOG_DEBUG. trace Some messages (login time, logout time) are logged to syslog with priority LOG_NOTICE. none No messages are logged. This is the default. The acct management does not recognize any additional options. For root, password and login expire are ignored, only on aging warning is printed. If no shadow information exists, it always returns success. FILES
/etc/security/pam_unix2.default SEE ALSO
login(1), passwd(1), pam.conf(8), pam.d(8), pam_pwcheck(8), pam(8), rpasswd(1), rpasswdd(8), rpc.yppasswdd(8), yppasswd(1) pam_unix2 August 2006 pam_unix2(8)
All times are GMT -4. The time now is 03:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy