Off-Topic > Off-Topic - Tiny Core Lounge
linux question - What are the rules regarding user names in the "group" file?
bigpcman:
When the "group" file does not contain any user name entries does that mean any user can be in any group?
As in tc group file:
--- Code: ---root:x:0:
lp:x:7:lp
nogroup:x:65534:
staff:x:50:
--- End code ---
Conversely, if user names are entered for a group does that mean only those user names can be associated with that group.
As in:
--- Code: ---root:x:0:
lp:x:7:lp
nogroup:x:65534:
staff:x:50:tc
--- End code ---
Where tc is the only user associated with group staff. Are there any other rules of interest?
^thehatsrule^:
--- Quote ---When the "group" file does not contain any user name entries does that mean any user can be in any group?
--- End quote ---
Not exactly, but afaik this part is:
--- Quote ---any user can be in any group
--- End quote ---
--- Quote ---if user names are entered for a group does that mean only those user names can be associated with that group.
--- End quote ---
No, there are primary groups (see /etc/passwd)
There are probably better explanations of these files in full... if more details are needed
bigpcman:
I wanted user nobody to be in group staff in addition to nogroup so I added it and user tc to the group file staff group entry (staff:x:50:tc,nobody).
I created a folder test owned by user nobody group staff. Here's the strange part - when logged in as user tc a "cd" to the test directory is denied. I get the message "can't cd to test" If I change the permissions from 666 to 676 then I can access the directory. What the heck is going on?
jpeters:
You have to have exec permission to enter a directory.
bigpcman:
--- Quote from: jpeters on May 04, 2009, 09:39:12 PM ---You have to have exec permission to enter a directory.
--- End quote ---
Wow after all these years of playing around with linux and I never knew that?
Navigation
[0] Message Index
[#] Next page
Go to full version