- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script help
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
Forums
Discussions
Discussions
Discussions
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
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
04-24-2002 02:48 PM
04-24-2002 02:48 PM
Does any one has a script in place or any idea on changing root passwd on multiple system. I realy don't want to rlogin in each system and do "passwd root". I would like to use script.
Thanks in advance.
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:53 PM
04-24-2002 02:53 PM
Re: Script help
Do yoy have a system which is trusted by all other servers if yes then I can give you a script to do the password change.
Thanks
Rgds
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:57 PM
04-24-2002 02:57 PM
Re: Script help
Thanks,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:59 PM
04-24-2002 02:59 PM
Re: Script help
Your best bet would be to use an Expect script - mainly because of it's interactive capability.
Can be obtained at
http://dsportal.eservices.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,543,00.html
Someone may already have an Expect script written....
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 03:11 PM
04-24-2002 03:11 PM
SolutionIf you have ssh configured across all your servers your task is simple. If you have the ability to ssh as root to all your servers ... then:
OWNER="root"
SYS_LIST="host1 host2 host3 host4 host5"
for HOST in "${SYS_LIST}"
do
echo "Changing Root passwd on ${HOST}................................"
/usr/local/bin/ssh ${HOST} /usr/bin/passwd ${OWNER}
echo "passwd changed successfully for ${HOST} ......................." done
should work ... You will be prompted for new passwd for each of these servers ... This is NOT TESTED ...
Thanks,
Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 04:38 PM
04-24-2002 04:38 PM
Re: Script help
I modified your script but some how it hangs when it prompts me for new passwd. Any idea.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 04:40 PM
04-24-2002 04:40 PM
Re: Script help
Here is the script.
OWNER="root"
SYS_LIST=`cat mike3`
for HOST in $SYS_LIST
do
echo "Changing Root passwd on ${HOST}................................"
/usr/bin/rlogin -l root ${HOST} | /usr/bin/passwd ${OWNER}
echo "passwd changed successfully for $HOST ......................."
done
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 06:18 PM
04-24-2002 06:18 PM
Re: Script help
Thank You ! You just made me a ITRC Graduate :-)
Okay ... I would test two things first:
prompt>cat mike
host1 host2 host3 host4 ...
1) Try changing:
the first line (for loop)
to:
>for HOST in `cat /tmp/mike`
2) Try manually from the command prompt:
prompt>/usr/bin/rlogin -l root host1 | /usr/bin/passwd root
I've executed other commands using ssh before and it works. I use it to create logins for users across servers ...
Did you check the rlogin syntax ?
All the best !
-Thanks,
Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 10:32 AM
04-26-2002 10:32 AM
Re: Script help
Not running SSH on the server. Is their any other way I can do this.
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 10:41 AM
04-26-2002 10:41 AM
Re: Script help
Well you can do this a many number of ways.
I sometimes just cut and paste the encyped password into wordpad then vipw and paste in the new encyped key.
I have in the passed used expect to do this too.
One other suggestion is to use NIS for managing the systems passwords, but there are some security concerns that come along with that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2002 10:59 AM
04-26-2002 10:59 AM
Re: Script help
I had same problem like you. I go to one system then run script. I might have to type passwd 100 time but I am sure that it works.
#!/bin/sh
for i in `cat systemlist`
do
rlogin $i
#then I change passwd.
done
#cat systemlist = my systems names one in one line.
Sachin