- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- changing 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
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
тАО04-10-2007 10:36 PM
тАО04-10-2007 10:36 PM
changing group
How to change user group temporarily without making changes in /etc/groups file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:00 PM
тАО04-10-2007 11:00 PM
Re: changing group
If you are in multiple groups, you don't need to change /etc/groups.
What does id(1) show for your user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:04 PM
тАО04-10-2007 11:04 PM
Re: changing group
running usermod command will update the group file.
if you want to get access to a directory belonging to some other group then changing the permissions of that directory or file can help instead of changing the user's group temporarily.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:04 PM
тАО04-10-2007 11:04 PM
Re: changing group
The newgrp command changes your group ID without changing your user ID
and replaces your current shell with a new one.
If you specify group, the change is successful if group exists and
either your user ID is a member of the new group, or group has a
password and you can supply it from the terminal.
If you omit group, newgroup changes to the group specified in your
entry in the password file, /etc/passwd.
Whether the group is changed successfully or not, or the new group is
the same as the old one or not, newgrp proceeds to replace your
current shell with the one specified in the shell field of your
password file entry. If that field is empty, newgrp uses the POSIX
shell, /usr/bin/sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-10-2007 11:55 PM
тАО04-10-2007 11:55 PM
Re: changing group
By simply adding the user's login to other groups, that user will have all the privileges for that group. Use the id command to see what groups are currently enabled for each user.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 01:10 AM
тАО04-11-2007 01:10 AM
Re: changing group
This isn't enough. You need to symlink logingroup to group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 05:56 AM
тАО04-11-2007 05:56 AM
Re: changing group
I believe that requirement disappeared in 11.00. Around the same time I remember that the primary group membership would be determined from /etc/passwd and did not have to be replicated in /etc/group, so /etc/group user lists were only needed for multiple group memberships.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2007 03:33 PM
тАО04-11-2007 03:33 PM
Re: changing group
It looks like you are right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-17-2008 09:54 PM
тАО12-17-2008 09:54 PM