One way to give full or limited root privileges to any nonroot user is to set up the sudo facility,
which simply entails adding the user to /etc/sudoers and defining what privilege you want that
user to have. Then the user can run any command he or she is privileged to use by preceding that
command with the sudo command.
146
Running the Show Part II
Here??™s an example of how to use the sudo facility to give any users that are added to the wheel
group full root privileges:
1. As the root user, edit the /etc/sudoers file by running the visudo command:
# /usr/sbin/visudo
By default, the file opens in vi, unless your EDITOR variable happens to be set to some
other editor acceptable to visudo (for example, export EDITOR=gedit). The reason
for using visudo is that the command locks the /etc/sudoers file and does some
basic sanity checking of the file to ensure it has been edited correctly.
If you are stuck here, refer to the vi tutorial in Chapter 2 for information on using the vi
editor.
2. Uncomment the following line to allow users in the wheel group to have full root privileges
on the computer:
%wheel ALL=(ALL) ALL
If you look at the sudoers file in Ubuntu, you will see that this privilege exists, by
default, for the admin group members.
This line causes users in the wheel group to provide a password (their own password,
not the root password) in order to use administrative commands.
Pages:
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351