- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- usermod -a equivalent under HP-UX 11.11 ?
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
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-11-2007 08:06 AM
04-11-2007 08:06 AM
I have a few servers under 11.11 without NIS so we have to maintain /etc/group consistent by hand.
One thing I miss versus Linux is usermod -a -G
That command would append the login to a new secondary group without removing it from any other group it might be in.
HP-UX does not do -a, so usermod -G
How can I, under 11.11, add a user to a group without removing him from everything else. I know I can edit /etc/group by hand but doing it over and over for each server is a pain....I'd rather ssh a usermod command if thats possible.
Thank you for your time.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2007 08:14 AM
04-11-2007 08:14 AM
Re: usermod -a equivalent under HP-UX 11.11 ?
# usermod -G newgroup,group1,group2,group3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2007 08:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2007 08:56 AM
04-11-2007 08:56 AM
Re: usermod -a equivalent under HP-UX 11.11 ?
If you have ssh access why don't you scp /etc/group to all other servers from a main server to make it consistent.
You can just use a single (for-do-done)script and a file with the hostnames to do this. Or you can use rsync or rdist.
cat > myhostnames
host1
host2
host3
for i in `cat myhostnames`
do
echo $i
scp /etc/group $i:/etc/group
done
You can even do it on a cron.
Of course, make backup copies of /etc/group before you fire the script.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2007 12:51 AM
04-12-2007 12:51 AM
Re: usermod -a equivalent under HP-UX 11.11 ?
Court : Correct but that is precisely what I do not want to do as it requires me to have prior knowledge of all groups the user is in.
Jeff : Looks promising, I've been putting off learning the stream editor for a while but this looks like a good reason to get to it.
Rasheed : Very true...But the systems are not as consistent as they need to be ( working on it !) so that is not possible right now.
So I'll experiment with sed.
Thanks all!