Professional Documents
Culture Documents
- The who command list users who are currently logged in as well ass where and when they
logged in.
- The w command provides more detailedd info about users currently on system.
Consider This
The who command reads from the /var/log/utmp file which logs current users, while
the last command reads from the /var/log/wtmp file, which keeps a history of all user logins.
Hoofdstuk 16
Creating groups:
- Remember: user account info and authentication info is stored in the /etc/passwd and
/etc/shadow files
- Using these files to add users/groups is possible but not recommended
- Using commands is more appropriate.
- Groupadd command.
- Use -g to specify. Example: groupadd -g 506 research
Modifying in a group:
- The groupmod command can be used to either change the name of the group or change the
gid with the -g.
- To search fora n orphaned file us the find command with the -nogroup option.
Deleting a group:
- Before creating users, verify the default values using the useradd command
-
File ownership
When a user creates a file with the touch command i twill belong tot he current user and their
primary group.
Changing groups
To create a file under adifferent gorup, use the newgrp command to change your current group.
Permissions:
- To display the file type and permissions of a file use the ls -l command
- The first character of each line indicatest he type of file. Possible values for file types:
Permissions groups: