- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to change password on remote server
Operating System - HP-UX
1824976
Members
3390
Online
109678
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 09:37 PM
тАО05-16-2007 09:37 PM
script to change password on remote server
hello all,
i want to change the passwords of normal users on more than 100 HP-UX servers. for this i need a script which will login to the servers one by one and change passwords.
i tried using rexec
rexec -l -n /appl/tsu/bin/sudo passwd
i am able to login to the remote server but istead of prompting me to enter the choice "p" to select my own password it comes out of the remote shell and
displays illegal choice.
can anyone tell me where i am going wrong. am i using the right command or i need to use rexec() call
Thanks in advance.
i want to change the passwords of normal users on more than 100 HP-UX servers. for this i need a script which will login to the servers one by one and change passwords.
i tried using rexec
rexec
i am able to login to the remote server but istead of prompting me to enter the choice "p" to select my own password it comes out of the remote shell and
displays illegal choice.
can anyone tell me where i am going wrong. am i using the right command or i need to use rexec() call
Thanks in advance.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 10:13 PM
тАО05-16-2007 10:13 PM
Re: script to change password on remote server
Shalom,
What's wrong? You are trying to do something the OS passwd command is designed to prevent.
SEP
What's wrong? You are trying to do something the OS passwd command is designed to prevent.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 10:16 PM
тАО05-16-2007 10:16 PM
Re: script to change password on remote server
hi,
Should use something like:
#!/bin/sh
for host in node1, node2, Node3, Node4,Node5
do
function logon
{
trap INT
echo root
sleep 1
echo $PASSIN
sleep 2
echo ls
stty echo
echo exit
}
logon | telnet $1
done
Also have a look at the following threads:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1039966
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1094727
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1050251
hope these help!
kind regards
yogeeraj
Should use something like:
#!/bin/sh
for host in node1, node2, Node3, Node4,Node5
do
function logon
{
trap INT
echo root
sleep 1
echo $PASSIN
sleep 2
echo ls
stty echo
echo exit
}
logon | telnet $1
done
Also have a look at the following threads:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1039966
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1094727
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1050251
hope these help!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2007 11:00 PM
тАО05-16-2007 11:00 PM
Re: script to change password on remote server
Hi Steven,
the user with -l option and the user who's password i am trying to change are same. so what am i doing wrong in this.
it is similar to rlogin to remote host with the same user account and changing password.
i just want to save few key strokes.
Yogeeraj,
can u explain the script you gave suggested coz i am not an expert in scripting. i am not confident enough to test the script on a production server without understanding it.
Thanks
the user with -l option and the user who's password i am trying to change are same. so what am i doing wrong in this.
it is similar to rlogin to remote host with the same user account and changing password.
i just want to save few key strokes.
Yogeeraj,
can u explain the script you gave suggested coz i am not an expert in scripting. i am not confident enough to test the script on a production server without understanding it.
Thanks
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP