su problem
Karl Larsen
klarsen1 at gmail.com
Mon Jun 28 17:33:21 UTC 2010
On 06/28/2010 09:30 AM, Markus Schönhaber wrote:
> 28.06.2010 16:53, Leander Jedamus:
>
>
>> su does not work as expected. When I am user1 and do a "su - user2", I
>> don't get a shell for that user and i am not user2. How can this be done?
>>
>
DESCRIPTION
The su command is used to become another user during a login
session.
Invoked without a username, su defaults to becoming the
superuser. The
optional argument - may be used to provide an environment similar to
what the user would expect had the user logged in directly.
Additional arguments may be provided after the username, in
which case
they are supplied to the users login shell. In particular, an
argument
of -c will cause the next argument to be treated as a command by
most
command interpreters. The command will be executed by the shell
specified in /etc/passwd for the target user.
You can use the -- argument to separate su options from the
arguments
supplied to the shell.
Stupid as I am, I could not recall what su is and what it does.
So being stupid I RTFM which in this case you get from using "man su".
Now I know and so do you :-)
73 Karl
--
Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
Key ID = 3951B48D
More information about the ubuntu-users
mailing list