Comments on A Beginner's Guide to Understanding sudo on Ubuntu

The sudo command on Linux: ever got a 'Permission denied' error while working on the Linux command line? Chances are that you were trying to perform an operation that requires root permissions.

2 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Pete

Thanks for the method to change the timeout.

Sudo isn't just about gaining root.  It can be used to runAs other userids.  This can be extremely convenient in a corporate environment.

Sudo can be used to limit which options a specific command allows for specific userids or groups. Perhaps the secretary needs to manage a printer queue?  Or perhaps you don't mind if everyone can manage the printer queue?  Use sudo with specific limitations on lp to do that. 

Or perhaps a developer needs access to 1 specific log file. Don't give her generic sudo - provide limited sudo that shows only the logfile ... or a grep of the log file.

Also, sudo can be setup to prevent those using an editor from shelling out as root and competely owning the box.  Actually, sudoedit is really the command to be used for editing system files. Only the file copy to temp and back is done with elevated priviledges. The actual editing is performed under the normal userid with whatever EDITOR has set.

Sudo is an amazing tool.  It provides a way to honor the principal of least privilege on our systems.

By: Suresh Tiwari

I have tried using sudo commans and i am having problem after i tried using -k option

Now i am not getting root permission for myself. I have followed exactly as you mentioned

$ sudo -k , --reset-timestamp   and now i am stuck please help me out.