Table of Contents
If you want to send us your comments, please do so. Thanks
More on comments
Users and groups
Name | Description | Remark |
---|---|---|
w | Show who is logged on and what they are doing | |
wall | Write a message to all users logged in on a terminal | In a tmux session only users logged on that tmux session get the message |
who | Show 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
Name | Description | Remark |
---|---|---|
chfn | change 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 | |
groups | Print the groups a user is in | |
groupadd | Create a new group | groupadd somenewgroupname |
users | Print the user names of users currently logged in to the current host | |
adduser | Create a new user | To add an existing user to a group use adduser user group |
deluser | Remove a group for a user | deluser user group |
gpasswd | Remove a group for a user | gpasswd --delete user group |
usermod | Modify a user account | Incorporate 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 |
vigr | Edit the groups file | |
vipw | Edit 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?
Useful links
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.