root is the super-user of a Linux system. Security experts recommend that you not routinely run your system as root, but instead run as a regular user. But there are times when you may need to temporarily assume root privileges so that you can perform an otherwise protected operation. Mandrake follows the security recommendations, and in some configurations it can make it very difficult to use graphic interface tools as root. The Mandrake Control Center asks for the root password at startup, and provides access to the most needed functions, but there are exceptions. Some examples of graphic programs you might want to use as root are ethereal and nmap. Both of these need root privilege to gain a lower level access to the ethernet card, and are very limited, or even useless, when used as a normal user. On the command line you can use the su command to launch the program:
su -c ethereal
If that seems rather awkward, a more elegant approach is to use the KDE equivalent of su, kdesu. This can open a password dialog, just like the one in the illustration. With a little effort you can add the kdesu wrapper to any menu command where it is needed.
To add kdesu to a menu item, open the Mandrake Control Center and select:
- System menu Configure
- pick the menu option to be changed
Add the following code in front of the Command field:
Be careful to not erase the original command, just add the kdesu command in front of the original command as shown in this screen shot.
If you are using a Gnome environment, the equivalent to kdesu is gksu
There are other ways you might want to consider to accomplish the goal. sudo can be used to set up policies allowing normal users to perform root functions. It is also possible to suid a program, so that it will run with the owner's privilege, not the user's, but that approach is fraught with very complicated security issues and is usually best to avoid.