- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /usr/sam/lbin/usermod.sam
Operating System - HP-UX
1819903
Members
2465
Online
109607
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
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
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
тАО10-23-2007 12:25 PM
тАО10-23-2007 12:25 PM
/usr/sam/lbin/usermod.sam
Hello All,
I am automating root password changes across the Enterprise (800+ servers) using Opsware as the platform, it provides a OGSH (Opsware Global Shell), works the same fashion as ssh.
Here is the problem.
I am using this command line to do that:
/usr/sam/lbin/usermod.sam -F -p ${NEW_PASS_KEY[0]} root
It worked on almost all of them except for around 25+ servers, when I run it from the command line on the server I get the prompt back and a return code of '0' (echo $?) but it actually doesn't update /etc/shadow, for e.g. here is the sequence
[root@myserver:/root]# grep root /etc/shadow
root:JTPm1inSzOEwE:13767::::::
ebroot:*:13292::::::
[root@myserver:/root]# /usr/sam/lbin/usermod.sam -F -p iqIWHOhzjmAiA root
[root@myserver:/root]# echo $?
0
[root@myserver:/root]# grep root /etc/shadow
root:JTPm1inSzOEwE:13767::::::
ebroot:*:13292::::::
The permissions for /etc/passwd and /etc/shadow looks the same across the enterprise, pwck doesn't show problems ...
This is a 11.11 box and the patch bundles are not too old either.
ANy thoughts?
Thanks,
Shabu
Any thoughts?
- Tags:
- usermod.sam
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-24-2007 06:51 PM
тАО10-24-2007 06:51 PM
Re: /usr/sam/lbin/usermod.sam
hi,
usermod.sam does only works when the user is not logged in, if you use sudo please logoff all root users and retry...
ps there are some more ways to do thi via scripting (just searce on passwd change) in the forem
usermod.sam does only works when the user is not logged in, if you use sudo please logoff all root users and retry...
ps there are some more ways to do thi via scripting (just searce on passwd change) in the forem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-25-2007 06:42 AM
тАО10-25-2007 06:42 AM
Re: /usr/sam/lbin/usermod.sam
Thanks for responding.
The -F option will force it to change it, no need to log off anyone.
I'll search the forum with 'passwd change', I did that earlier and didn't find anything related to my issue, but I'll try again.
Thanks,
SHabu
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