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?
The su command is used to become another user during a login
Invoked without a username, su defaults to becoming 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
they are supplied to the users login shell. In particular, an
of -c will cause the next argument to be treated as a command by
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
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 :-)
Karl F. Larsen, AKA K5DI
Key ID = 3951B48D
More information about the ubuntu-users