• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Question about Linux users and groups

Garet Jax

Diamond Member
Hello all,

I have been teaching myself to use linux a little better. I am currently using Red Hat 9.0. Is there somewhere I can go to learn more about users and groups. Things like:

1) How they are created
2) How they are removed
3) How access is granted and revoked.

Thanks a lot.
 
I would say google but with those search terms you just get a bunch of stuff for linux users groups.

To add a user - useradd or adduser
To remove - userdel or deluser

Access of what kind? You can change their shell by running "chsh [user]", (user defaults to you, if you don't specify), if you change it to something that doesn't exist, then they can't login to a shell. IIRC - changing it to /bin/true will let them still log in to ftp and other things, while /bin/false will deny them from everything.

chfn is for changing their personal info.

passwd changes password

I believe "useradd -G <groupname> <username>" will add a person to a group (I just edit the groups file).

To edit the passwd file, do "vipw", and to edit the groups file, do "vigr" (I don't think vigr is totally standard though, if you don't have it, then just edit /etc/group).
 
One difficulty you'll find is that the tools and details of users and groups vary a lot across distros. Nothing conceptually different, really, just different defaults and command line options. The man pages BBWF mentioned should be the best reference for you. Also note that the passwd man page should contain some info about locking/unlocking accounts as well. If you can get a copy of Running Linux, that has a pretty good section on accounts, though most introductory sysadmin materials cover the same thing.
 
Back
Top