Results 1 to 2 of 2
I don'tknow if it is the correct category to post this post, but what is the difference between newgrp command and role? Does it differ or not? For example, in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-28-2013 #1
- Join Date
- Feb 2013
difference betwen newgrp command and roles
For example, in a System V-based UNIX system, in which a process can have exactly one group identity, and in order to change groups users must execute the newgrp command.
Do these groups differ from roles?
does my question make sense?
- 10-29-2013 #2
- Join Date
- Jan 2005
- Saint Paul, MN
The command, id, will show you your user name (and the uid, the number that user name) and all the groups (and the gid, the number assigned for that group) with the first group in the list being your "primary group".
A way to think about these tiers of access are like an "apartment complex". The owner layer is like your apartment. You don't want every body just walking into it. Your apartment building may have a "laundry room" that is accessible by all the building residents (group access). The complex might have a "game room" which can be used by all renters in the complex (another group). The "Sales Office" wants to allow anyone to enter its office (assume manned on a 24/7 model) so they set the "other permission" to anyone.
At each one of these tiers, the file permissions are a combination of (read, write, execute). You need both read and execute permission to run a program. The system first checks if you are the user that owns the file, then the user permission provides the needed permissions you have access, if not then it checks to see it your user is a member of the group that owns the file and if so the group permission set and if that has the needed permissions, access is granted. If both user and group access has not provided access, then the permissions for the "others" is checked and if that provides access needed you are given access to the file. Directories (folders) use the EXECUTE permission as you have browsing access within the directory (you do not need to know the file name as you can do "ls" in that directory or use tab completion or see the contents in a GUI based file browser).
After you understand the permission access, and are very conformable with them and the "chmod", "chown", and "chgrp" commands, you will then need to research the "sticky bit" (one for user, group, and other).