Bookmark and Share

Front Back
What commands will add a user/group? 
What commands will delete a user/group? 
What command will display the uid, gid, and groups for a user? 
 id [username]
What values in /etc/login.defs define the cutoff points for UID/GID? 
How would you manually add a group \\\"proprofs\\\" and assign a GID of 565? 
 groupadd -g 565 proprofs
How would you add a user \\\"jdoe\\\" with the full name \\\"John Doe\\\"? 
 adduser -c \\\"John Doe\\\" jdoe
How would you add a user \\\"mikey\\\" with a home directory named \\\"deleteMe\\\" in the default home directory?
useradd -d \\\"/home/deleteMe\\\" mikey
How would you add a user \\\"fflintstone\\\" to groups \\\"dino\\\" and \\\"barney\\\"? 
 useradd -G \\\"dino,barney\\\" fflintstone
What useradd switch specifies a specific shell to use? 
What useradd switch specifies a password? 
How do you create a user\\\'s home directory if it does not exist? 
 useradd -m or useradd --create-home
How many options does the groupdel command have? 
 None - just specify the group(s) to delete
How do you delete a user and the user\\\'s home directory/mail spool? 
 userdel -r [username]
What value in /etc/login.defs specifies whether a group of the same name is deleted when a user is deleted? 
How would you change a user\\\'s name from \\\"sues: to \\\"sueu\\\", while ensuring the home directory also changes? 
 usermod -l sueu -d /home/sueu sues or usermod --login sueu -d /home/sueu sues
True or False: To add an additional group to a user, you must specify the existing groups PLUS the new group(s). 
How do you change group \\\"test1\\\" to be named \\\"test2\\\"? 
 groupmod -n test2 test1
What are two ways to suspend an account? 
 passwd -l and usermod -L
Which file contains info on groups and the users that belong to them? 
Which file contains encrypted group passwords? 
What are two ways to unlock an account? 
 passwd -u and usermod -U
How do you set an account as without a password? 
 passwd -d
How do you set a password to have a min life of 4 days and max life of 30 days? 
 passwd -n4 -x30
What purpose does /etc/passwd serve? 
 contains basic info about users (username, password, UID, GID, comment, home, shell)
Who can open /etc/shadow (by default)? 
 root only
What are the four fields, in order, of /etc/group? 
 groupname, password, GID, members
What are the four fields, in order, of /etc/gshadow? 
 groupname, password, admins, members
How would root set user jane as a group administrator for group RandD? 
 gpasswd -A jane RandD
How would group admin jane add user john access to group RandD? 
 gpasswd -a john RandD
What UID does root have? 
What two login shells are typically assigned to special accounts that shouldn\\\'t be able to login? 
 /sbin/nologin or /bin/false
What function does /etc/skel serve? 
 Template of files/folders users have in their home directory by default.
What file finely tunes the level of system logging? 
What daemon controls system logging? 
What priority of the following is the highest? notice, info, error 
What priority of the following is the lowest? notice, alert, debug 
What would an entry that logs all messages of level info or higher? 
 *.info [destination]
What would an entry that logs all mail messages in /var/log/maillog? 
 mail.* /var/log/maillog
What file controls log rotation? 
What entry in logrotate.conf would specify to keep 3 weeks worth of backups? 
 rotate 3
By default, which files are rotated by logrotate.conf? 
 All contents of /etc/logrotate.d
What command creates a crontab? 
 crontab -e
What are the fields in a crontab entry (in order)? 
 minute, hour, day of month, month of year, day of week, string to be executed
What would a crontab entry look like that ran every 20 minutes every hour every day on January? 
 0,20,40 * * 1 * [command]
Where is a user\\\'s crontab located? 
Where is the system crontab files located? 
 /etc/crontab and /etc/cron.d
What are the typical contents of /etc/cron.d? 
 cron.hourly, cron.daily, cron.weekly, cron.monthly
What additional field is found in the /etc/crontab file? 
 The 5th field specifies who the command should run as (typically root)
Anacron does not handle which type of jobs? 
Where does anacron log when jobs are run? 
x of y cards Next >|