Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1744  / 2 Years ago, mon, february 28, 2022, 9:51:33

I've set up an ubuntu computer for my sisters. There is the admin account which only I can access and there are two normal accounts.



Occasionally I'm going to be called upon to install an extra program, check a setting or fix a problem. Instead of logging out and then logging into the admin account, it would be much easier if I could fix the problem from the terminal when I am handed the computer.



For example, I wanted to check the iptables policies whilst logged into the normal account.



When I typed in sudo iptables -L -v



I was not able to access that command since the normal user account I was logged in did not have privileges, and it gave a message saying that the incident would be reported.



I logged back into the admin account, and added the user to the sudo group.



When testing the iptables command again when logged in as the normal account, it only requested the normal user's password. I do not want this. For security measures, I would prefer that only the root password be used to execute these commands, especially when logged into the normal user account.



How can I execute commands requiring root privileges whilst logged into a non-admin account, and ensuring that only the root password can be used to execute those commands?


More From » login

 Answers
2

You can login to sudo account from terminal and then execute the sudo command. Basically, open up a terminal and do



su - sudousername



and then you can run sudo from terminal
If you need to to exit just do



exit


[#32098] Monday, February 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
serveeel

Total Points: 347
Total Questions: 106
Total Answers: 117

Location: American Samoa
Member since Fri, Aug 26, 2022
2 Years ago
serveeel questions
;