Users Flashcards
What is the command to view who is logged in to the system?
who
w *detailed
What is the command to get the user and group ID of a user?
id
id >user
Where is user account information stored?
/etc/passwd
Where are hashed user passwords stored?
/etc/shadow
Where a group memberships stored?
/etc/group
What is the format for a user account in /etc/passwd?
user: pw:userid:groupid:comment:homedirectory:loginshell
i. e user:x:1002:1003::/home/cloud_user:/bin/bash
* services do not have a home or login shell
Which group membership denotes a user having root priveleges?
wheel
*has group id of 10
What is the command to change a user password?
passwd >user
What is the format output for the id command?
uid gid groups
i.e uid=1002(user) gid=1003(user) groups=1003(cloud_user),10(wheel)
What is the format for a group in /etc/group
group: pw:gid:members
wheel: x:10:centos,user
How do you create a user account?
useradd >user<
- G add group id -m home dir
- C comment (name) -s shell
What is the command to create a group?
groupadd >groupname
What is the purpose of /etc/skel?
Files from /etc/skel are copied to the home directory of a newly created user
What is the command to show the when users have logged into the system?
last
How do you see the group memberships of a user?
groups >user<
id >user