wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Linux2-Quiz 3 - permissions, rights

Total questions: 22

Worksheet time: 12mins

Name
Class
Date
1.

A user can change the default log-in shell using the command...

a)

chmod

b)

chsh

c)

rmsh

d)

tchsh

2.

User’s Primary Group id is listed in which file, at the time of creation of the user (Posix Unix system)

a)

/etc/passwd

b)

/etc/login

c)

/etc/group

d)

/etc/profile

3.

The encrypted password of a user is stored in?

a)

/etc/shadow

b)

/etc/enpasswwd

c)

/etc/passwd

d)

/etc/secrets

4.

The /etc/passwd file doesn’t contain

a)

userid

b)

home directory for a user

c)

login shell name

d)

none of the above

5.

The permission -rwxr–r– represented in octal expression will be

a)

777

b)

666

c)

744

d)

711

6.

Sticky bit can be set using following permission

a)

0777

b)

2666

c)

4744

d)

1711

7.

If the umask value is 002. What will be the permissions of new directory?

a)

777

b)

775

c)

664

d)

022

8.

How can I lock the user account 'frankie' as root in Linux Mint?

a)

usermod -l frankie

b)

passwd -l frankie

c)

usermod -L frankie

d)

passwd -L frankie

9.

What is the command to set the execute permissions to all files and subdirectories within the directory /home/user1/

a)

chmod –r +x /home/user1/

b)

chmod –R +x /home/user1/

c)

chmod –f –r +x /home/user1/direct

d)

chmod –F +x /home/user1/

10.

Which command changes a file’s group owner

a)

cgrp

b)

gpchange

c)

group -m

d)

chown

11.

Which of the following command output contains userid

a)

ls –n

b)

date

c)

uname

d)

help

12.

Which command can be executed by a user who is logged on, to change to the root user? (type the command without any parameters)

a)

root

b)

chroot

c)

su

d)

user -r root

13.

Which command is used to re-execute the previous command?

a)

!cat

b)

!3

c)

!$

d)

!!

14.

Where is the directory that contains default copied files for new users?

a)

/etc/default

b)

/var/lib/skel

c)

/etc/skel

d)

/home/skel

15.

How to change the group of user test-user to manav? (when logged in as non-root user)

a)

sudo usermod -ag manav test_user

b)

usermod -g manav test_user

c)

sudo chgrp manav test_user

d)

sudo usermod -g manav test_user

16.

what is a correct command to create a user?

a)

useradd -m -d /var/www/frankie -s /bin/bash -c "FrankieBoy” -U frankie

b)

useradd -g machines -d /dev/null -c "Intern 3 Comp" -s /bin/false

c)

useradd -m /var/www/frankie -s /bin/bash -c "FrankieBoy” -U frankie

d)

useradd -g /var/www/frankie -s /bin/bash -c "FrankieBoy” -U frankie

17.

How to find a specific users id: for the user 'master', to find his UID , use the command:

a)

id master

b)

group -u master

c)

id -u master

d)

getent-u master

18.

How to verify the age of the account and the password?

a)

id frankie

b)

whois frankie

c)

chage -l frankie

d)

finger frankie

19.

How can you diplay the current user you are working in?

a)

whoami

b)

user

c)

uid

d)

who

20.

Which of the following statements is true (multiple correct answers)?

a)

Linux is a multiuser operating system, allowing multiple users to access the system simultaneously

b)

Linux can only support a Graphical User Interface in single user mode

c)

User and group accounts facilitate multi-user-environments by controlling the access allowed for different types of users

d)

Linux can run in a single user mode

21.

What will happen when the Linux command ‘passwd –l test_user’ is issued?

a)

You will list the account ‘test_user’ with all details

b)

You will lock the password for the account ‘test_user’

c)

You will load the account ‘test_user’ for testing purposes

d)

You can reset the password for the user ‘test_user’

22.

What is the correct command to delete the user test_user account along with the user’s home directory?

a)

userdel -r test_user

b)

userdel test_user -d

c)

userdel test_user – f - del

d)

userdel test_user