[clug] Linux challenges

Lana Brindley lanabrindley at gmail.com
Wed Jul 15 18:05:56 MDT 2009


2009/7/15 Adam Thomas <adam.lloyd at gmail.com>

> 2009/7/16 Lana Brindley <lanabrindley at gmail.com>:
> > 2009/7/15 Wesley Bruce <wesleybruce at iinet.net.au>
> >
>
> The hyphen actually does a few things and the directory change is only a
> side effect of the other things it does. Basically, it runs the login
> scripts for
> the user being switched to and drops them into the default directory for
> that
> account (probably their home directory).
>

Ah, I didn't realise that! Thanks :)


>
> >
> > [Lana at localhost ~]$ su -
> > Password:
> >
> > Now it's asking you for a password. If you installed Linux yourself, you
> > would have set the root password up when you did that. Otherwise, you
> might
> > need to ask the person who did the installation for you. Enter the
> password
> > (you won't see anything as you do this, but rest assured it's recording
> it)
> > and then press enter. Your prompt should change to this:
> >
> > [Lana at localhost ~]$ su -
> > Password:
> > [root at localhost ~]#
>
> This will only work for distributions which set a password on the root
> account.
> This is the norm for most distributions but Ubuntu is different here.
> Ubuntu
> recommends against setting a root password (for reasons I wont get into)
> but using the sudo command to run commands as the root user. sudo is very
> similar to su in that it tells the computer to Switch User and DO
> something.


I'm an Ubuntu n00b, so apologies for the bum steer if that's what you're
using, Wesley. It would definitely help if you could tell us what distro
you're using.


>
>
> sudo is generally used to run single commands as the root user, you do this
> by prefixing the command that needs root privileges with the sudo command
> and entering the appropriate password when prompted. Some configurations
> of sudo allow you to run an interactive shell (like the shell that runs
> when you
> open the terminal emulator as Lana explained), to do this run 'sudo -i' and
> enter the correct password. This will allow you to run several commands as
> the user that is switched to. To get back to the shell of the regular user
> run
> the 'exit' command.
>

Oh, I meant to mention that and forgot.

L

-- 
Cheers! Lana

The artist doesn't have time to listen to the critics. The ones who want to
be writers read the reviews, the ones who want to write don't have the time
to read reviews.
 - William Faulkner

-----------------------------------------------
http://lanabrindley.blogspot.com
-----------------------------------------------

Please avoid sending me Word, Powerpoint or Windows Media attachments.

See http://www.gnu.org/philosophy/no-word-attachments.html for more
information.

------------------------------------------------


More information about the linux mailing list