Font size
WorksheetsLinux2-Quiz 3 - permissions, rights
Total questions: 22
Worksheet time: 12mins
A user can change the default log-in shell using the command...
chmod
chsh
rmsh
tchsh
User’s Primary Group id is listed in which file, at the time of creation of the user (Posix Unix system)
/etc/passwd
/etc/login
/etc/group
/etc/profile
The encrypted password of a user is stored in?
/etc/shadow
/etc/enpasswwd
/etc/passwd
/etc/secrets
The /etc/passwd file doesn’t contain
userid
home directory for a user
login shell name
none of the above
The permission -rwxr–r– represented in octal expression will be
777
666
744
711
Sticky bit can be set using following permission
0777
2666
4744
1711
If the umask value is 002. What will be the permissions of new directory?
777
775
664
022
How can I lock the user account 'frankie' as root in Linux Mint?
usermod -l frankie
passwd -l frankie
usermod -L frankie
passwd -L frankie
What is the command to set the execute permissions to all files and subdirectories within the directory /home/user1/
chmod –r +x /home/user1/
chmod –R +x /home/user1/
chmod –f –r +x /home/user1/direct
chmod –F +x /home/user1/
Which command changes a file’s group owner
cgrp
gpchange
group -m
chown
Which of the following command output contains userid
ls –n
date
uname
help
Which command can be executed by a user who is logged on, to change to the root user? (type the command without any parameters)
root
chroot
su
user -r root
Which command is used to re-execute the previous command?
!cat
!3
!$
!!
Where is the directory that contains default copied files for new users?
/etc/default
/var/lib/skel
/etc/skel
/home/skel
How to change the group of user test-user to manav? (when logged in as non-root user)
sudo usermod -ag manav test_user
usermod -g manav test_user
sudo chgrp manav test_user
sudo usermod -g manav test_user
what is a correct command to create a user?
useradd -m -d /var/www/frankie -s /bin/bash -c "FrankieBoy” -U frankie
useradd -g machines -d /dev/null -c "Intern 3 Comp" -s /bin/false
useradd -m /var/www/frankie -s /bin/bash -c "FrankieBoy” -U frankie
useradd -g /var/www/frankie -s /bin/bash -c "FrankieBoy” -U frankie
How to find a specific users id: for the user 'master', to find his UID , use the command:
id master
group -u master
id -u master
getent-u master
How to verify the age of the account and the password?
id frankie
whois frankie
chage -l frankie
finger frankie
How can you diplay the current user you are working in?
whoami
user
uid
who
Which of the following statements is true (multiple correct answers)?
Linux is a multiuser operating system, allowing multiple users to access the system simultaneously
Linux can only support a Graphical User Interface in single user mode
User and group accounts facilitate multi-user-environments by controlling the access allowed for different types of users
Linux can run in a single user mode
What will happen when the Linux command ‘passwd –l test_user’ is issued?
You will list the account ‘test_user’ with all details
You will lock the password for the account ‘test_user’
You will load the account ‘test_user’ for testing purposes
You can reset the password for the user ‘test_user’
What is the correct command to delete the user test_user account along with the user’s home directory?
userdel -r test_user
userdel test_user -d
userdel test_user – f - del
userdel test_user
