Much Ado About sudo


Much Ado About sudo

When you start a graphical command that requires administrative privileges, a dialog appears asking you for your password. This dialog is actually a command called gksudo. In turn, gksudo is a wrapper for a shell command called sudo.

For those of you who may have used other Linux (or UNIX) systems, you may have had access to an account called root. This is the superuser account with ultimate power over the system. Ubuntu locks down the root account and does not allow a direct login. To execute commands with root privileges, Ubuntu makes use of the sudo command.

When you run a program with sudo (or gksudo), you are asked for your password to confirm access. After entering your password, your account can execute additional root-level commands for the next 15 minutes without having to reenter your password. That said, you still need to preface your commands with sudo or gksudo.

To run a command inside a GNOME terminal session, or a command shell, preface the command with sudo.

 sudo command_name 


From time to time, you may need to run several commands with root privileges. At those times, it may get a little tiring to prefix each and every command with sudo. To get around this, you can enter a session with administrative privileges by typing the following.

 sudo -i 


When you are through with your admin session, type exit.

In Chapter 21, I give an extended tour of the command shell. There, you will have additional opportunity to see sudo in action.

Note

Always use gksudo when running graphical applications that need administrative privileges.





Moving to Ubuntu Linux
Moving to Ubuntu Linux
ISBN: 032142722X
EAN: 2147483647
Year: 2004
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net