- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: user name not updated in /etc/group file
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
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
тАО08-20-2008 01:13 AM
тАО08-20-2008 01:13 AM
user name not updated in /etc/group file
I have created user abc123 with primary group "users" and secondary group "work".but user abc123 is not showing in group "user" in the in /etc/group file.
i have given commands like below
$more /etc/passwd|grep abc123
abc123:*:21344:20:testuser:/home/test:/usr/bin/ksh
$more /etc/group |grep users
users::20:root,arcade
but if i check with id commannd its displaying the groupname for abc123
$id -ng abc123
users
$id -nG abc123
work
Thanks
chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 01:34 AM
тАО08-20-2008 01:34 AM
Re: user name not updated in /etc/group file
abc123 is part of the primary group users, have a look at your output from the password file.
abc123:*:21344:20:testuser:/home/test:/usr/bin/ksh
His id is 21344 and his primary group is 20. The primary group 20 correspond to the group users.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 01:38 AM
тАО08-20-2008 01:38 AM
Re: user name not updated in /etc/group file
grep user /etc/group
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 04:17 AM
тАО08-20-2008 04:17 AM
Re: user name not updated in /etc/group file
I think Chandra is expecting to see user abc123 automtically appear appended at the end of "users::20:root,arcade" in /etc/group. As pointed out above the abc123 membership to "users" is via the ":20:" in the passwd file. No need to do anything with /etc/group.
For the secondary group "work", the user abc123 must be manually appended to the "work" line in /etc/group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 08:22 AM
тАО08-20-2008 08:22 AM
Re: user name not updated in /etc/group file
grep username /etc/group
Thanks
SKR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 07:06 PM
тАО08-20-2008 07:06 PM
Re: user name not updated in /etc/group file
Thx for ur reply.
But i cant add abc123 to group work in/etc/group manually,because /etc/group is read only file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 07:42 PM
тАО08-20-2008 07:42 PM
Re: user name not updated in /etc/group file
It would be better to just use "id" so we can see all of the groups.'
>But I can't add abc123 to group work in /etc/group manually because /etc/group is read only file.
By definition you are root so you can change anything. Just use vi. If it complains, use w!.
(If you want to be pedantic, you can use chmod to add then remove write permission. :-)
You can also use usermod(1M) to add secondary groups:
# usermod -u abc123 -G work
>Ivan: For all groups, when user belong to check with grep:
Wouldn't "id abc123" be easier?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 08:13 PM
тАО08-20-2008 08:13 PM
Re: user name not updated in /etc/group file
/etc/group file is belongs to owner and group "bin".
I am not sure wether we can change the file having the ownership bin by root user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2008 09:38 PM
тАО08-20-2008 09:38 PM
Re: user name not updated in /etc/group file
Unless you have /etc/ as an NFS mount, root can edit it without problems.
(If you want to be pedantic, you can use chown root:root, chmod, edit, then chmod, chown. ;-)
Using usermod(1m) looks even easier now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2008 01:50 AM
тАО08-21-2008 01:50 AM
Re: user name not updated in /etc/group file
Can you please tell us why exactly you want to update /etc/group file.
As long as id is showing all desired details you should not modify /etc/group.
provide us:
#id
# grep -i abc123 /etc/group