Test 3 linux 101
Which of the following options for the useradd command allows root to specify supplementary groups the user will be a member of?
-G
What option to the netstat command has information shown as numbers rather than names?
-n
The "setuid" permission...
...allows a command to be run as the file owner.
The userdel command will...
...delete the user account, but leave the user's files by default.
Which of the following is a valid IPv6 address?
2601:3c3:304:c170:bc08:377e:7f4:1971
The "execute" permission on a directory allows you to: (choose three)
Along with write permission to successfully create new files Change to that directory or use it as part of a path Along with read permission to successfully perform ls -l
A user can belong to...
At least 16 groups
Deleting a source file will break an associated hard link. True or False?
False
The /etc/shadow file contains plain-text passwords. True or False?
False
The groupmod command can be used to add users to a group. True or False?
False
The "execute" permission on a file allows you to:
Run the file as a script
Which of the following protocols defines how network communication functions?
TCP/IP
Which user can view the /etc/shadow file?
The root user
Deleting a source file will break an associated symbolic link. True or False?
True
In distributions that do not allow the root user to login directly or via the su command, the installation process automatically configures one user account to be able to use the sudo command to execute commands as if they were executed by the root user. True or False?
True
The /var directory has files that change over time. True or False?
True
The setgid permission... (choose two)
allows files created in a directory to be owned by the group that owns the directory. ...allows a command to be run as the group owner of the file.
Which of the following commands will display your machine's IP address?
ifconfig
Which of the following commands would create a symbolic link, link to file?
ln -s file link
Which of the following commands would create a hard link, link to file?
ln file link
Which of the following commands will display the routing table?
netstat -r
Which of the following commands will allow you to log into the machine server1 with the account name nick?
ssh nick@server1
Which of the following commands will allow you to switch to the user, branch? (choose three)
su - branch su -l branch su branch
Which of the following commands will display how long the system has been running since the last boot? (choose two)
uptime w
Which of the following commands, run as root, will prevent the user bob from logging in?
usermod -L bob
Which of the following files contains user IDs?
/etc/passwd
Which option for the chown command can be used to change the owner of a directory and all the files and directories below it?
-R
The usermod command can be used to do all of the following except...
...change the user's MAX and MIN password settings.
The "sticky bit" permission...
...prevents others from removing files they don't own from a common directory.
If a user is deleted, the files and directories that the user owned...
...will show a UID as the owner, but not user name.
Which files contain user account information? (choose 2)
/etc/passwd /etc/shadow
Which of the following files contains encrypted user password information?
/etc/shadow
Which of the following is a valid IPv4 address?
10.33.55.77
Which of the following permissions would allow all users to add, view, and delete files in a directory?
777
Only one set (user, group, other) of permission can be changed at once using the symbolic method. True or False?
False
The name of the primary wired network devices is ether0.
False
The user sysadmin will be able to read the file because they own it.
False
A GID is associated with a group name. True or False?
True
For non-root users, the passwd command can only be used to change the password of the user running the command. True or False?
True
The "execute" permission is never set on files by default.
True
The useradd command will create a home directory by default for a user. True or False?
True
The /etc/group file follows what structure?
group_name:password_placeholder:GID:user_list
Which of the following commands will display the group(s) a user belongs to?
id
Octal notation uses the following values for the permissions granted:
r = 4, w = 2, x = 1
Which of the following commands set "other" permissions on file to r-x?
chmod o=rx file
Which of the following commands will set the "sticky bit" on /shared ?
chmod 1777 /shared
Which of the following commands will set setgid on /shared ?
chmod 2777 /shared
Which of the following commands will set setuid for /usr/bin/program?
chmod 4755 /usr/bin/program ...
Which of the following commands sets "other" permissions on file to r-x?
chmod 775 file
Which of the following commands will add the group extra to the user bob's secondary groups in addition to bob's current secondary groups?
usermod -aG extra bob