SUDO and GKSUDO
Posted on 04 May 2007 by admin
If you’ve been using Linux for any length of time you know about sudo. You are most likely running programs as root directly whenever you need to install packages, modify your system’s configuration, and so on. Ubuntu employs a different model, however. The Ubuntu installer doesn’t set up a root user — a root account still exists, but it’s set with a random password. Users are meant to do administration tasks using sudo and gksudo.
You probably already know how to use sudo — just run sudo commandname . But what about running GUI apps that you want to run as root? Simple — use gksudo instead of sudo. For instance, if you’d like to run Ethereal as root, just pop open a run dialog box (Alt-F2) and use gksudo ethereal.
If you really must do work as root, you can use sudo su -, which will log you in as root. If you really, really want to have a root password that you know, so that you can log in as root directly (i.e., without using sudo), then run passwd when logged in as root, and set the password to whatever you want. I’d recommend using the pwgen package to create a secure password not only for root but for all your user accounts.
