- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: changing passwd on remote machines using scrip...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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-22-2004 12:11 AM
тАО05-22-2004 12:11 AM
I have 180 Machines running hpux11i. I have to change the passwd for a particular user in all the systems. I can use remote shell and i want to run a script from one server for this purpose. Can any one help me how can i achieve this?
Thanks in advance.
...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 12:27 AM
тАО05-22-2004 12:27 AM
Re: changing passwd on remote machines using script
One thing you could do (if you want the same password for the user on all boxes) is to change the password on one box, and then write a script to put that password entry in the /etc/passwd file for that user on all the other boxes.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 12:41 AM
тАО05-22-2004 12:41 AM
Re: changing passwd on remote machines using script
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 02:10 AM
тАО05-22-2004 02:10 AM
Solutionhttp://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=48946
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=214045
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=347973
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 04:03 PM
тАО05-22-2004 04:03 PM
Re: changing passwd on remote machines using script
echo "FULL NAME= \c"
read NAME
echo "LOGIN = \c"
read USER
echo "PASS= \c"
read PASS
GRP=users
CMD="/usr/sbin/useradd -g $GRP -c \"$NAME\" \
-d /home/equiv -s /usr/bin/true $USER"
echo $CMD
echo "run y/n ? \c"
read resp
if test "$resp" != "y"
then
echo "not running...bye"
else
eval $CMD
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-22-2004 06:36 PM
тАО05-22-2004 06:36 PM
Re: changing passwd on remote machines using script
"Expect" is good if you don't have remote shell capability as well to automatically supply responses to passwd program.
If you have remote shell access to all the systems, then there is a better secured way of doing it. First, generate the encrypted password. Then change it on the remote system using the command "/usr/sam/lbin/usermod.sam -p
1. Generate encrypted password. It's really easy to do it if you are willing to go with 8 char password. Use /usr/lib/makekey to generate encrypted password for you.
echo "
For ex.,
echo "Test123!xy" |/usr/lib/makekey
xyZz5eiXOP3r.
Otherwise, change the password on one system and grab the encrypted key from /etc/passwd or /tcb/auth/files/ (for trusted).
2. Place the encrypted password obtained in the above step into password field by using the command
/usr/sam/lbin/usermod.sam -p "xyZz5eiXOP3r." login_name
It works for both trusted and non-trusted sytems.
Put it in remsh for the remote systems.
Good thing about it is, though your remsh session transmits the information in clear text, your password is encrypted so it's relatively safer than using "expect".
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 02:52 AM
тАО05-24-2004 02:52 AM
Re: changing passwd on remote machines using script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2004 06:17 AM
тАО05-24-2004 06:17 AM
Re: changing passwd on remote machines using script
rexec $REMOTE_SYSTEM /usr/sam/lbin/usermod.sam -p $NEWPASS SomeUserName
wher $NEWPASS is a copy of the encrypted password. If this is a temporary password, you can then run:
rexec $REMOTE_SYSTEM passwd -f SomeUserName
Bill Hassell, sysadmin