[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Some Basic Newbie Q's



On Tue, Apr 29, 2003 at 03:26:21PM +1000, Chris Share wrote:
> Hi,
> 
> I have a couple of really basic newbie questions:
> 
> 1. How do I logon as the root user? At present, when I start Linux I don't 
> seem to get this option in the logon window.

You don't.  Well, you sometimes do, but the general rule is still
"don't".  You do all your normal work as your user account, and only
switch to root for particular commands that require it.  There are a
number of tools to do this, including 'su', 'sudo', 'sux' and 'ssh -X
root@localhost'.  I prefer sudo.  Just install it, and add a line like
this to your /etc/sudoers (ideally using visudo):

rob     ALL=(ALL) ALL

This lets user 'rob' (that's me) run any command he wants to as root.
It'll also work in X, so 'sudo some_random_x_app' will Just Work.  Oh,
by the way, the password sudo asks for is your USER password, not
root's.

> 2. How do I shutdown/restart the computer when logged on as a normal user?

Once you configure sudo, it's as easy as 'sudo shutdown -h now' for
system halt (as in turn off) and 'sudo shutdown -r now' for a reboot.
The shutdown man page explains the rest of the stuff you might want to
know.

-- 
Rob Weir <rweir@ertius.org>                              http://www.ertius.org/
GPG keys: 1024D/1E73B7CD, 4096R/3ABDE5EC     |      Do I look like I want a CC?
Words of the day: Australia investigation Capricorn STARLAN diwn ASPIC Pine Gap

Attachment: pgp16FEKFTIDt.pgp
Description: PGP signature


Reply to: