Unix Questions and Answers – Administrator Specific Commands and Privileges – 1

This set of Unix Multiple Choice Questions & Answers (MCQs) focuses on “Administrator Specific Commands and Privileges – 1”.

1. The system administrator is also known as _____
a) master user
b) superuser
c) root user
d) master and super user
View Answer

Answer: d
Explanation: The system administrator has access to huge powers. This entrusted person is also known as the root user or superuser.

2. Which of the following functionalities is carried by the root user?
a) managing disk space
b) performing backup
c) changing attributes of a file
d) managing disk space, performing backup, changing attributes of a file
View Answer

Answer: d
Explanation: superuser or the root user has access to vast powers like he/she is responsible for managing the disk space, performing backups, changing attributes of files, maintaining user accounts etc.

3. What is the login name of system administrator?
a) root
b) su
c) master
d) admin
View Answer

Answer: a
Explanation: UNIX provides a special login name for system administrator i.e. root. This account doesn’t need to be created separately but comes with every system. The password for the root user is set at the time of installation.
advertisement
advertisement

4. What is the prompt for system administrator?
a) $
b) %
c) #
d) &
View Answer

Answer: c
Explanation: The prompt of the root user is # whereas the prompt for normal users or non-privileged users is % or $.

5. When we log in as root user we are placed in ____
a) /bin
b) /root
c) /system
d) /admin
View Answer

Answer: b
Explanation: When we log in to the system as root user we are normally placed in the root’s home directory. Depending on the system we are using this directory can be / or /root.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. The PATH for superuser doesn’t include current directory.
a) True
b) False
View Answer

Answer: a
Explanation: Since we know that the superuser has to constantly navigate through the file system, it may happen that he/she unintentionally execute the scripts or programs written by other users. That’s why the PATH for a superuser doesn’t include the current directory.

7. Which command is used for acquiring superuser status?
a) pu
b) su
c) admn
d) super
View Answer

Answer: b
Explanation: Any user can acquire the status of superuser by using the su command. The only condition that needs to be fulfilled here is, he/she must be aware of the root password. For example,

advertisement
$ su
Password: *****        //root’s password
#pwd
/home/abd             //prompt changes ( super user mode)

8. Which of the following is used for creating user’s environment?
a) su
b) su –
c) -su
d) su – –
View Answer

Answer: b
Explanation: The administrator can create a simulated environment using su – for any user. This command creates the user’s environment without taking the login-password route. For example,

advertisement
$ su - abd

Above command will execute abd’s .profile and creates a temporary abd’s environment.

9. User’s environment mode created using su – is terminated using ____
a) ctrl-v
b) ctrl-q
c) ctrl-d
d) ctrl-f
View Answer

Answer: c
Explanation: The administrator can create a simulated environment using su – for any user. This mode runs a separate sub-shell and is terminated using ctrl-d or exit.

10. Which command is used by the system administrator to set the date of the system?
a) dt
b) su
c) date
d) chdt
View Answer

Answer: c
Explanation: date command is used by users for displaying the system date. Same command is used by the system administrator to change/set the system date. The argument is an eight-character string of the form MMDDhhmm. For example,

# date 08122134
Sun Aug  12 21:34:00 IST 2018

11. ____ command allows superuser to communicate with users.
a) comm
b) cron
c) date
d) wall
View Answer

Answer: d
Explanation: The wall command can be used by the administrator to address all users simultaneously. For example,

# wall
Kindly everyone shut down the system before leaving the lab.
[ctrl-d]
All the users currently logged in will receive this message on their terminal.

12. ____ command is used for setting limits on file size.
a) limit
b) flimit
c) ulimit
d) flim
View Answer

Answer: c
Explanation: The ulimit command is used for imposing a restriction on the maximum size of the file that a user is permitted to create on the system. For example,

# ulimit  209788        // measured in 512-byte locks

13. The access to the use of at and batch is restricted and controlled by ___ and ____
a) at.allow, batch.allow
b) at.allow, at.deny
c) at.allow , batch.deny
d) batch. deny, batch.allow
View Answer

Answer: b
Explanation: The access to the use of at and batch is restricted and controlled by the files at.allow and at.deny. If at.allow is present, only those users which are listed in this file can use at and batch. If this file is not present then the system checks at.deny for users who are blocked from using these commands.

14. If both at.allow and at.deny are not present, only the system administrator can access at and batch command.
a) True
b) False
View Answer

Answer: a
Explanation: The access to the use of at and batch is restricted and controlled by the files at.allow and at.deny. If at.allow is present, only those users which are listed in this file can use at and batch. If this file is not present then the system checks at.deny for users who are blocked from using these commands. If neither file is present, only the administrator can invoke at and batch.

15. ____ command is used by the superuser for changing root’s password.
a) pd
b) password
c) pswd
d) pwd
View Answer

Answer: c
Explanation: The pswd command prompts for existing password when this command is used by a non-privileged user but when the same command is used by the superuser it behaves much leniently and doesn’t ask for the old password this time. For example,

# pswd
/* diagnostic messages displayed */
New-password : ******
Re-enter password: ******
Password Changed

Sanfoundry Global Education & Learning Series – Unix.

To practice all areas of Unix, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.