Users and Groups Flashcards
What command shows basic information about a logged in user?
■ id
What ‘ps’ option shows processes with a terminal?
■ ‘a’
What ‘ps’ option shows the user associated with a process?
■ ‘u’
How does the operating system track users internally?
■ By UID number
What are the fields of an /etc/passwd entry?
■ username:password:UID:GID:GECOS:/home/dir:shell
■ username - mapping of UID to username
■ password - historical field for password now stored in /etc/shadow
■ UID - identifies the user at the most fundamental level
■ GID - user’s primary group ID number
■ GECOS - arbitrary text, usually user’s real name
■ /home/dir - location of user’s personal data and conf files
■ shell - program that provides the user’s command line prompt
Which group normally owns the files created by a user?
■ Primary Group
What command allows the user to log in to a new group changing the current real group ID to the named group?
■ newgrp
What command sets administers group membership and passwords?
■ gpasswd
Whats the difference between ‘su’ and ‘su -‘?
■ ‘su [username]’ starts a non-login shell as that user with the current environment
■ ‘su - [username]’ starts a login shell as that user with a new environment
Where are commands executed by ‘sudo’ logged?
■ /var/log/secure
Where are parameters for new accounts and groups kept?
■ /etc/login.defs
What command is used to configure user password time limits?
■ chage
What command is used to configure/administer user accounts?
■ usermod
What user account setting allows a user to login to a system but prevents interactive use?
■ nologin
What character in an /etc/shadow entry signifies a locked account?
■ !