ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 207 - SK0-005 discussion

Report
Export

A user logs in to a Linux server and attempts to run the following command:

sudo emacs /root/file

However the user gets the following message:

User userid is not allowed to execute Temacs' on this server. Which of the following would BEST allow the user to find out which commands can be used?

A.
visudo I grep userid
Answers
A.
visudo I grep userid
B.
sudo -1 -U userid
Answers
B.
sudo -1 -U userid
C.
cat /etc/passwd
Answers
C.
cat /etc/passwd
D.
userlist I grep userid
Answers
D.
userlist I grep userid
Suggested answer: B

Explanation:

This is the best command to find out which commands can be used by a user with sudo privileges because it lists the allowed and forbidden commands for a given user or role. The -l option stands for list, and the -U option specifies the user name. The output of this command will show what commands can be executed with sudo by that user on that server. Reference:

https://www.sudo.ws/man/1.8.13/sudo.man.html

asked 02/10/2024
Cristian Lazo
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first