- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Automatically add existing user in a new group
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
11-21-2002 07:49 AM
11-21-2002 07:49 AM
I want to automatically add exisiting users in a new created group...
The command "groupadd" create the group, but how to include users in it ?
Thanx,
Sebastien.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:47 AM
11-21-2002 07:47 AM
Re: Automatically add existing user in a new group
for this problem
use the sam application
a addition the users to
the group created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:50 AM
11-21-2002 07:50 AM
Re: Automatically add existing user in a new group
Try usermod -G group,group,...
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:52 AM
11-21-2002 07:52 AM
Re: Automatically add existing user in a new group
Perhaps the easiest way would be to edit /etc/group and add each of the users manually.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:56 AM
11-21-2002 07:56 AM
Re: Automatically add existing user in a new group
Can use SAM to assign users to groups or groups to users, as you need.
Regards, Vicente.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:56 AM
11-21-2002 07:56 AM
Re: Automatically add existing user in a new group
The best way is to edit /etc/group . Also you log in as that user and run the command groups to know what groups the user belongs to , ie primary and secondary. In case you jsut want to change hte primary membership edit /etc/passwd , always take a backup of the curretn file before modifying it.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:58 AM
11-21-2002 07:58 AM
Re: Automatically add existing user in a new group
you can use the command :
-->usermod
but with sam is more easy
if you use the usermod command
insert the option --> " -G"
example :
usermod -G newgroup username
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 07:59 AM
11-21-2002 07:59 AM
Re: Automatically add existing user in a new group
this is how i would do it:
#usermod -G newgroup username
and if you run nis (which i do)you also have to create and push the nis database to all your nisclients:
#/var/yp/ypmake (or if its located at anotherplace on your installation)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:06 AM
11-21-2002 08:06 AM
Re: Automatically add existing user in a new group
# usermod -G newgroup root
Login root is currently in use
I am logged as root...
Any idea ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:13 AM
11-21-2002 08:13 AM
Solutiongroupname:(password):groupid:list,of,users,separated,by,commas,but,no,comma,at,the,end,root
(password) is hardly ever used, thats why i put it in ().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:15 AM
11-21-2002 08:15 AM
Re: Automatically add existing user in a new group
you can edit the /etc/group
file ..
see this example:
##vi /etc/group
root::0:root
other::1:root,hpdb
bin::2:root,bin
sys::3:root,uucp
adm::4:root,adm
daemon::5:root,daemon
in this file insert this
row :
newgroup::6:root
now exit save the change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2002 08:24 AM
11-21-2002 08:24 AM
Re: Automatically add existing user in a new group
Since you said "automatically", I don't think there is a way without some fairly elaborate scripting. Editing the group file and using a cut and paste technique is most likely going to be the quickest and simplest method.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2002 12:20 AM
11-22-2002 12:20 AM
Re: Automatically add existing user in a new group
Thanx to all !