- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /etc/group & /etc/passwd queries
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
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
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
тАО01-27-2004 04:01 PM
тАО01-27-2004 04:01 PM
/etc/group & /etc/passwd queries
I created a new user which was reflected in the /etc/group and passwd file. Later i completed deleted the group file and then login to the system, it allowed me...
I initially presumed that the system would first refer to the /etc/group and then validate the passwd with the passwd file but it does not seem so.
Also, in the /etc/passwd file what is the use of the userid. What would happen if the userid is tampered with i.e. the no. is changed to some other integer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 04:07 PM
тАО01-27-2004 04:07 PM
Re: /etc/group & /etc/passwd queries
One of the problems is that the file owned by the user will be left alone with the ownership pointing to that uid i.e.when you do a ls -l the old uid will be displayed in the owner's field as it does not have a corresponding entry to user in the /etc/passwd file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 04:09 PM
тАО01-27-2004 04:09 PM
Re: /etc/group & /etc/passwd queries
/etc/group is not checked.
Nothing should happen if userid is tampered with as long as it is unique in the file.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 04:13 PM
тАО01-27-2004 04:13 PM
Re: /etc/group & /etc/passwd queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 04:17 PM
тАО01-27-2004 04:17 PM
Re: /etc/group & /etc/passwd queries
Only a chown of the files will help restoring the same user as owner with the new uid.
Assume that a new user is created with that old uid.He becomes the owner for those files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 04:51 PM
тАО01-27-2004 04:51 PM
Re: /etc/group & /etc/passwd queries
The group membership that is in /etc/passwd field is the primary group of the user even if he/she is not listed in /etc/group file. If the user is added to other groups in /etc/group file, then they will become his/her secondary groups.
It's not the user name but the uid that matters. So, if you changet the uid of a user, then that login will be treated as a different login than the original. The user will not be able to manage those files unless they are with full permissions to others.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 04:59 PM
тАО01-27-2004 04:59 PM
Re: /etc/group & /etc/passwd queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2004 05:29 PM
тАО01-27-2004 05:29 PM
Re: /etc/group & /etc/passwd queries
gid will be unique in terms of group file. You don't want to have the same gid associated with different group names.
uid will be unique for the logins. Similary you don't want to have different login names with the same uid.
Multiple uids can share a single gid. This means those user accounts belong to the group with that gid.
Creating different users with the same uid means, calling the same person with different names.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 12:53 AM
тАО01-28-2004 12:53 AM
Re: /etc/group & /etc/passwd queries
the group file has the following attributes: groupname-passwd-gid-users.
Once I create a user a entry is created in the group and passwd file corresponding to my user name.
I now delete the gid-users corresponding to the username in the group file. Inspite of doing so I am able to perform all operations like rebooting the machine etc etc.
Is there any use of the gid-users apart from during initial creation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 01:15 AM
тАО01-28-2004 01:15 AM
Re: /etc/group & /etc/passwd queries
The group file really comes into play when a user is a member of multiple groups. His primary group is the gid stored in the passwd file but he is allowed to become a member of any group for which he has an entry in the groups file. If /etc/logingroup is linked to /etc/group then the system will automatically check for group permissions among his groups without having to do a newgrp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 01:22 AM
тАО01-28-2004 01:22 AM
Re: /etc/group & /etc/passwd queries
Existing files owned by that user will either be owned by the old UID, ( ls will show the number) or owned by another user, ie: a new user created with that number.
Existing files copied from another system, an NFS mount or a backup tape will retain the old uid number. If that number is not associated with a user, ls will list as a number.
If a GID doen't exist after a files is created with that group ownership, ls will show group ownership as a number.
all of these can affect access by a user or group to the file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 02:23 PM
тАО01-28-2004 02:23 PM
Re: /etc/group & /etc/passwd queries
One more observation that I made was that Adding a user using SAM didn't update the /etc/group file. If this is the case, then the script that I am using should also not modify the /etc/group but only the /etc/passwd file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 03:10 PM
тАО01-28-2004 03:10 PM
Re: /etc/group & /etc/passwd queries
-o options will do that for you
Duplicate uid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 03:15 PM
тАО01-28-2004 03:15 PM
Re: /etc/group & /etc/passwd queries
For example select
SAM-->users-->Modify secondary group
That will work on the /etc/group file.
The Normal 'ADD user' options works only on the password file as it has only primary group option there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2004 03:26 PM
тАО01-28-2004 03:26 PM
Re: /etc/group & /etc/passwd queries
SAM will not allow you to create a second user with the same user id as that of an existing user.