WorksheetsRedHat Linux Week 7 Review
Total questions: 12
Worksheet time: 8mins
What makes a file or folder hidden on Linux?
The -h attribute
When it starts with a period ( . )
When it starts with a $
When it has a total permissions value of 8
What command shows you who is currently logged into a Linux system and from where?
w
who
which
last
Match the following file with the definition that best describes what it does.
~/.bashrc
File that allows you to alter how the default shell behaves.
~/.vimrc
File that alters how your favorite text editor behaves.
/etc/hosts
File that you can use to establish static IP address to machine name pairings.
/etc/passwd
File that hold information about all user accounts including UIDs and GIDs as well as default shell.
/etc/shadow
File that holds an encrypted version of all users' passwords as well as the salt and algorithm used
What command is used when creating new user accounts?
useradd
add --user
usermod -add
touch-user
What command allows you to make changes to a user account; like adding group membership or locking it out?
chage
userman
adduser
usermod
Which command will remove the user tot from the system but leave their home directory untouched?
userdel tot
userdel -r tot
userdel tot && rm -rf /home/tot
deluser /home/tot
Which of the following users is most likely to have the UID 1010?
root
syslog
arpwatch
tot
What file stores information about all groups on a Linux system like each group's GID?
/etc/group
~/.groups
/etc/gshadow
/etc/gid.defs
In the attached entry, what does the $6 after sellison: tell you about sellison's passoword?
It will need to be changed in 6 more days
It must be at least 6 characters in length
Nothing, it is not related to his password
It was encrypted using the SHA-512 hashing algorithm
If I wanted to change when a user's password will expire on a Linux system, what command would I use?
usermod
chage
userdel
userman
If you want to create a user account that cannot login to the system interactively, what do you do?
Give them an invalid shell in their /etc/passwd file entry.
Use the command "chage -M user_name"
Specify a UID lower than 1000
Add them to a group that has a password on it that they do not know
Match the following command with the definition that BEST fits.
su
Allows you to become the root user
sudo
Allows you to run a "one-off" command with elevated privileges
usermod -aG
Allows you to add supplementary groups to a user
id
Allows you to see UID and GIDs for an account
passwd
Allows you to change yours or, if root, another user's password
