Linux Exam (Ch. 12 - 16)

Ace your homework & exams now with Quizwiz!

Which option for the usermod command can be used to specify a user's group ID (either primary or secondary)?

-g

What option to the netstat command has information shown as numbers rather than names?

-n

The userdel command will...

...delete the user account, but leave the user's files by default.

The "sticky bit" permission...

...prevents others from removing files they don't own from a common directory.

A network packet contains ...

...the IP address of the destination machine.

A network packet contains ...

...the IP address of the source machine.

Which of the following would be considered a host?

A printer attached to the network via an IP address

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

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 /var directory has files that change over time. True or False?

True

Which of the following commands will display how long the system has been running since the last boot?

uptime

Which of the following commands, run as root, will prevent the user bob from logging in?

usermod -L bob

The "setuid" permission...

...allows a command to be run as the file owner.

A GID is associated with a group name. True or False?

True

A source and a hard link must be part of the same filesystem. True or False?

True

Each user belongs to at least one group. 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

Sudo privileges can be used to specify which user can use the sudo command to execute commands as other users. True or False?

True

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 set "other" permissions on file to r-x?

chmod o=rx file

Which command can be used to view the /etc/passwd file entries?

getent

The /etc/group file follows what structure?

group_name:password_placeholder:GID:user_list

Which of the following commands can be used to modify a group?

groupmod

Which command will display the UID, GID and groups your current user belongs to?

id

Which of the following commands will display the group(s) a user belongs to?

id

Which of the following commands will display the groups that the user bob belongs to? (choose one)

id bob

Which of the following commands will display your machine's IP address?

ifconfig

Which of the following commands will display the routing table?

netstat -r

Octal notation uses the following values for the permissions granted:

r = 4, w = 2, x = 1

Which of the following are methods for setting permissions using the chmod command?

symbolic

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

Which of the following commands will display how long the system has been running since the last boot?

w

Which of the following options for the useradd command allows root to specify supplementary groups the user will be a member of?

-G

Which option for the usermod command can be used to specify a user's group ID (either primary or secondary)?

-G

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

Which of the following options for the useradd command allows root to specify the UID to be associated with the account?

-u

A service is...

...a feature provided by one computer to another.

The setgid permission...

...allows a command to be run as the group owner of the file.

The setgid permission...

...allows files created in a directory to be owned by the group that owns the directory.

The usermod command can be used to do all of the following except...

...change the user's MAX and MIN password settings.

The sudo command allows regular users to...

...run certain commands as the root user.

Setting setgid on a directory...

...will set the group owner of all files created in the directory to the group owner of the 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 of the following files contains user IDs?

/etc/passwd

What directory contains user's home directories?

/home

Which of the following permissions would allow all users to add, view, and delete files in a directory?

777

Which of the following files does the groupadd command use to determine the new GID when a GID isn't specified?

/etc/group

Which files contain user account information?

/etc/passwd

Which files contain user account information?

/etc/shadow

Which of the following files contains encrypted user password information?

/etc/shadow

Which of the following are valid IPv4 addresses?

10.33.55.77

Which of the following are valid IPv4 addresses?

192.105.10.10

On a system that does not use UPG, the useradd command will also create a user group. For example, user bob, group bob. True or False?

False

Only one set (user, group, other) of permission can be changed at once using the symbolic method. True or False?

False

Only servers have hostnames. True or False?

False

The name of the primary wired network devices is ether0. True or False?

False

The chown command can be used to change the user owner on a file by:

Only root

UIDs 1-500 are usually reserved for what kind of users?

System accounts, such as server processes

The chgrp command can be used on a file by:

The file owner and root

The chmod command can be used on a file by:

The file owner and root

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

The "execute" permission is never set on files by default. True or False?

True

The /etc/sudoers file should be edited directly by root using the visudo command. True or False?

True

The chown command can be used to change the owner and group of a file. True or False?

True

The groupmod command can be used to change a group GID. True or False?

True

The groupmod command can be used to change a group name. True or False?

True

The user sysadmin will be able to change the permissions of the file because they own it. —-r-r- 1 sysadmin group 38270 Sep 2 18:49 file True or False?

True

The useradd command will create a home directory by default for a user. True or False?

True

Which command can be used to determine a user's most recent log in?

last

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 are methods for setting permissions using the chmod command?

octal

Which of the following commands will display the routing table?

route

Which of the following commands will allow you to log into a remote machine?

ssh

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?

su - branch

Which of the following commands will allow you to switch to the user, branch?

su -l branch

Which of the following commands will allow you to switch to the user, branch?

su branch

The /etc/shadow file contains plain-text passwords. True or False?

False

The /tmp directory is a temporary directory and will not exist on a system at all times. True or False?

False

The RSA key fingerprint allows the dig command to connect to remote systems. True or False?

False

The chgrp command can be used to change the owner and group of a file. True or False?

False

The chown command will only accept one file at a time as an argument. True or False?

False

The user owner of a file will always have the same or higher permissions as "other". True or False?

False

The user sysadmin will be able to read the file because they own it. —-r-r- 1 sysadmin group 38270 Sep 2 18:49 file True or False?

False

Which of the following protocols defines how network communication functions?

TCP/IP

The "execute" permission on a directory allows you to:

Along with read permission to successfully perform ls -l

The "execute" permission on a directory allows you to:

Along with write permission to successfully create new files

A user can belong to...

At least 16 groups

The "execute" permission on a directory allows you to:

Change to that directory or use it as part of a path

A source file and a symbolic link must be part of the same file system. True or False?

False

A user cannot delete a file if they do not own it. True or False?

False

Deleting a source file will break an associated hard link. True or False?

False

The visudo command uses which text editor by default?

vi

Which command will display the users that are currently logged in to the system?

who


Related study sets

Ch. 14- Activation of Complement

View Set

"Family Now" Gender in Today's Society - Chapter 4

View Set

Microbiology (MIC 205) Final Exam Flash Cards

View Set

Chapter 10 Practice Questions: Blood

View Set

Viața economică în epoca modernă

View Set

AP Bio membranes and transport test

View Set

Macroeconomics Help 2 Chapter 34

View Set

Med surg 3- test 4- musculoskeletal

View Set

2.1 Crystal Structure I - Unit Cells

View Set