Re: login problems


Subject: Re: login problems
From: Mac Mason (macmasta@ak.net)
Date: Thu Jun 19 2003 - 20:40:33 AKDT


> This I am unable to do. Maybe I'm using the wrong command. I type login,
> then it asks for my username and password. I put in 'root' and my pw and it
> tells me, "login is incorrect".

Hey, cool, I learned a new command - I didn't know there was a 'login'
command.

The correct command for this is 'su'.
(Note that you always want to add a hyphen - this makes the shell as the
other user a "login shell" which goes way back into the depths of unix
antiquity - but it makes things work a lot better)

For example, as a regular user, 'su -' wrll change to root, 'su - fred'
will change to fred, etc.

Note that logging out ('exit', 'logout' or even ctrl-D) will take you
back through the history of logins.

For example:

I do 'su -' and enter my root password - now I'm root. Then I do 'su -
fred' and now I'm fred. When I logout as fred, I end up as root again -
when I logout of root, I'm me again.

You can also run a command an another user using this:

'su - <username> -c "put whole command here"' will prompt for a
password, then run the command as that user.

I hope that made sense - a more complete explanation would take a really
long time, but this is about 90% of everything you'll ever need to know
about this.

~Mac~

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Thu Jun 19 2003 - 20:40:31 AKDT