how to manage unix/linux groups
hi everyone,
i need some knowledge about managing users and groups on a linux machine therefore i have a few questions.. 1. does every user belong to a group? 2. case : user belongs to more then one group and creates a file..for which groups belongs the files(default) ? 3. how can i see a whole list of the users and the groups they are belonging to ? |
1. yes, although many distro's marginalize users groups by putting each user into their own group.
2. their main group as defined in /etc/passwd 3. nothign offhand to spool all that out, but "id -a username" will list all the groups for one user. |
Quote:
Thanks again ! Uncle-c |
Code:
cumhur@mfc-falter:~> id -a cumhur if yes, how can i modify it? i want to create another group with the same as the user "cumhur" and the user "cumhur" belongs only to this group.. another question, what does dialout and video groups mean/do..what happens if i remove user "cumhur" out of the groups? |
not sure what you're actually asking... you want to create another user with the same name??
as for what the other groups are, dialout is presumably the group with permission to dial a modem link, and video? no idea to be honest... obviously some sort of ownership about video device access.. possibly for accelerated access like OpenGL? |
Quote:
|
First you need to create a "cumhur" group. Then you need to make this group the users default group. The second part can be done using the "usermod" command. Your distro may have a gui config program where you can manage groups and users if that is how you want to proceed.
See the manpages for groupadd, groupdel, groupmod, usemod, passwd and shadow. |
Quote:
Forrest |
If you want to edit the /etc/passwd or /etc/group files directly, you should use "vipw" or "vigr" respectively. This will add error correction. You will also be using the "vim" program. However, using usermod, etal would be better because some changes need to be reflected also in /etc/shadow.
The OP hasn't learned anything about these utilities yet and will probably torch up his system editing /etc/passwd directly. However, I did direct him to the manpages for passwd and shadow. |
All times are GMT -5. The time now is 08:02 AM. |