User Tools

Site Tools


users_and_groups

If you want to send us your comments, please do so. Thanks
More on comments


Users and groups

NameDescriptionRemark
wShow who is logged on and what they are doing
wallWrite a message to all users logged in on a terminalIn a tmux session only users logged on that tmux session get the message
whoShow who is logged on

User and Group management commands

For the change of adding a user to, or removing a user from, a group to have effect the user must log out and login again

NameDescriptionRemark
chfnchange real user name and information. The chfn command changes user fullname, office room number, office phone number, and home phone number information for a user's account
groupsPrint the groups a user is in
groupaddCreate a new groupgroupadd somenewgroupname
usersPrint the user names of users currently logged in to the current host
adduserCreate a new userTo add an existing user to a group use adduser user group
deluserRemove a group for a userdeluser user group
gpasswdRemove a group for a usergpasswd --delete user group
usermodModify a user accountIncorporate all already enlisted groups and the group(s) to be added. Example : usermod --groups group1,group2,group3,newgroup user or use --append. Example: usermod --groups groupname --append user which does the same as usermod -G groupname -a user
vigrEdit the groups file
vipwEdit the passwords file

Ownership

With chmod the ownership of a file or directory can be changed. Multiple files and directories can be changed with chmod -R
WARNING: Hidden files have to be changed separately. Example to change all files and directories (watch the dot in the second line!)

chown -R user2:user2 *
cbown -R user2:user2 .*

user2 can be the name of the user account or the number of the user account

To be solved

As root:

# usermod -G adm -a user
# grep user /etc/group
adm:x:4:user
user:x:1000:
# ls -l /var/log/syslog
-rw-r----- 1 root adm 2,1M okt  7 12:50 /var/log/syslog

As user user

$ less /var/log/syslog
/var/log/syslog: Permission denied

Why denied if user is member of group adm?

Debian System Groups
Standard groups
Users and groups
Managing Group Access
Linux users and groups


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
users_and_groups.txt · Last modified: 23-04-2022 10:24 by wim