FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 06-28-2010, 02:53 PM
Leander Jedamus
 
Default su problem

Hi!

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?

Thanks in advance
Leander Jedamus


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 03:21 PM
Nils Kassube
 
Default su problem

Leander Jedamus wrote:
> 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?

Works here (Kubuntu 10.04). Which version of Ubuntu are you talking
about?


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 03:25 PM
Leander Jedamus
 
Default su problem

Am 28.06.2010 17:21, schrieb Nils Kassube:
> Leander Jedamus wrote:
>
>> 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?
>>
> Works here (Kubuntu 10.04). Which version of Ubuntu are you talking
> about?
>
>
> Nils
>
>
I use Ubuntu 10.04. uname -a says:
Linux arthur 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC
2010 x86_64 GNU/Linux

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 03:28 PM
Leander Jedamus
 
Default su problem

Am 28.06.2010 17:21, schrieb Nils Kassube:
> Leander Jedamus wrote:
>
>> 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?
>>
> Works here (Kubuntu 10.04). Which version of Ubuntu are you talking
> about?
>

Ah, I found out what it is. I tried a "su - tomcat6" and in /etc/passwd
tomcat has "/bin/false" as shell. That is it.

Thanks
Leander


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 03:30 PM
Markus Schönhaber
 
Default su problem

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?

Hm, works fine form me on lucid:

mks:~$ pwd
/home/mks
mks:~$ su - test
Passwort:
test:~$ pwd
/home/test
test:~$ whoami
test

but

test:~$ who am i
mks pts/5 2010-06-28 14:37 (:0.0)
test:~$

The latter is due to the fact that "who am i" prints the name of the
user who's recorded to be logged in on the terminal connected to "who"'s
stdin.
If that's what you mean by "I am not user2": it's completely normal.
Otherwise you should describe what exactly happens and how you determine
that the effective user ID has not changed.
And take a look at
/var/log/auth.log
Any errors which may have occurred during su invocation should be
recorded there.

BTW: A more Ubuntu-ish way to get another user's shell would be
sudo -i -u user2

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 05:33 PM
Karl Larsen
 
Default su problem

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



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 06-28-2010, 10:18 PM
Steve Flynn
 
Default su problem

On Mon, Jun 28, 2010 at 6:33 PM, Karl Larsen <klarsen1@gmail.com> wrote:
> 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?
>>>
>>
> * * * *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 :-)

I rather think he knew all that Karl.... but you forgot what "su"
does? Things really are getting flaky in New Mexico aren't they.

Keep your pecker up son.


--
Steve
When one person suffers from a delusion it is insanity. When many
people suffer from a delusion it is called religion.

09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:38 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org