Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sudo su strange behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
KWhat
l33t
l33t


Joined: 04 Sep 2005
Posts: 647
Location: Los Angeles

PostPosted: Fri Aug 15, 2008 4:32 pm    Post subject: sudo su strange behavior Reply with quote

So I'm experiencing some very strange behavior on only one of my systems. If i type `sudo su` at the console it switches to a root shell but when i type in a letter it macros out exit and returns me to the previous none root shell. This only happens about 60% of the time, the other 40% it works fine. Also if i type out a few enters before i type it seems to work 100% of the time. If i setup sudo to automatically start a shell on just the sudo cmd it works fine. Additionally if i key in `sudo /bin/bash` it seems to work as well. Anyone have any idea what maybe causing this?

Please do not respond with something like why would you want to do that or why don't you do it this other way. I would really just like to know what might cause this behavior as it only happens on one system.
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Fri Aug 15, 2008 10:00 pm    Post subject: Reply with quote

Did you try login root directly?
What is the default shell for root?
Can you post /etc/sudoers?
Instead of "sudo su", did you try "sudo su -"?
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Fri Aug 15, 2008 10:48 pm    Post subject: Reply with quote

word, I was about to make a post about this.

I'm getting the same as Kwhat.

I've tried the latest stable sudo-1.6.9_p17 (according to sudo.ws), and the oldest package in portage.



Code:

<bash> grep -v \# /etc/sudoers
Defaults   env_reset
root   ALL=(ALL) ALL
%wheel   ALL=(ALL)   NOPASSWD: ALL


and, I thought maybe it was pam? (i'm not sure though)
Code:

clout$ cat /etc/pam.d/sudo
# File autogenerated by pamd_mimic in pam eclass


auth   include      system-auth
account   include      system-auth
password   include      system-auth
session   include      system-auth


junksiu wrote:

Instead of "sudo su", did you try "sudo su -"?


that's how I do it, and have done it for ever, though the shell prints logout , when i start to type a command, and with

$ sudo su

the shell prints exit. hmm... and to answer your first two questions: yes, and bash
_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Fri Aug 15, 2008 11:21 pm    Post subject: Reply with quote

I am seeing in other post that when you login a non-root account and su for the first time will be normal, but subsequent su will have the exit problem. Is it the case?
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Sat Aug 16, 2008 12:01 am    Post subject: Reply with quote

yes, oh, and

sudo -s

works just fine
_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
KWhat
l33t
l33t


Joined: 04 Sep 2005
Posts: 647
Location: Los Angeles

PostPosted: Sat Aug 16, 2008 2:43 am    Post subject: Reply with quote

Quote:
I am seeing in other post that when you login a non-root account and su for the first time will be normal, but subsequent su will have the exit problem. Is it the case?


Yes, the first time worked but now other times are not working.... also if i hit return after it works fine. My files for sudoers and such are the same as above.

Also sudo su - seems to work for me, could it be an env issue?
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Sat Aug 16, 2008 4:03 am    Post subject: Reply with quote

I forget to post the link of the original info., it is : http://www.archivum.info/ubuntu-bugs@lists.ubuntu.com/2008-05/msg36736.html

BTW, I am not having this problem and my sudo is:
Code:
[I] app-admin/sudo
     Installed versions:  1.6.9_p17(01:05:29 AM 07/22/2008)(offensive pam -ldap -selinux -skey)
Maybe try updating sudo.

Last edited by SeaTiger on Sat Aug 16, 2008 8:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
KWhat
l33t
l33t


Joined: 04 Sep 2005
Posts: 647
Location: Los Angeles

PostPosted: Sat Aug 16, 2008 4:49 pm    Post subject: Reply with quote

i have both the latest stable sudo and su version, the same that are running on my other machines with out issue. I tried reinstalling with the same result.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Sat Aug 16, 2008 6:07 pm    Post subject: Reply with quote

I started seeing this also starting a few months ago. Not sure what started causing it. Perhaps it has something to do with bash?
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Sat Aug 16, 2008 7:05 pm    Post subject: Reply with quote

mikegpitt wrote:
I started seeing this also starting a few months ago. Not sure what started causing it. Perhaps it has something to do with bash?


bash, maybe... I just installed tcsh, and so far the error isn't reproducible... I'll try a downgrade of bash.

I also thought, maybe it was something to do with the environment, but with the default configuration that gentoo ships bash with this issue is still persistent--which doesn't mean it's not something with the env.
_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Sat Aug 16, 2008 7:13 pm    Post subject: Reply with quote

kwhat, which bash version are you using. i'm assuming probably the same as mine, i'm pretty sure this happened after an
Code:
emerge -DNu world
as well...

EDIT: downgrading didn't work :EDIT
_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Sat Aug 16, 2008 8:39 pm    Post subject: Reply with quote

My bash:
Code:
[I] app-shells/bash
     Installed versions:  3.2_p39(04:29:36 PM 07/21/2008)(nls plugins -afs -bashlogger -examples -vanilla)

To update system, try following if you are using the new portage:
Code:
emerge -avutDN system world
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Sat Aug 16, 2008 8:54 pm    Post subject: Reply with quote

junksiu wrote:
My bash:
Code:
[I] app-shells/bash
     Installed versions:  3.2_p39(04:29:36 PM 07/21/2008)(nls plugins -afs -bashlogger -examples -vanilla)

To update system, try following if you are using the new portage:
Code:
emerge -avutDN system world


if the "new" portage is something that is installed with the 2008.0 release, yes, though I'm not sure.. Though I would say: if that command works on your system, then no I'm not, because I can only use "system" or "world' and not both.
_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Sun Aug 17, 2008 3:38 am    Post subject: solvedish Reply with quote

a downgrade to app-shells/bash-3.1_p17 fixed the auto logout/exit glitch, but on the occasion, an automatic CR happens with the first character you input at the prompt. maybe it's a readline issue in the end?

Code:
[I--] [  ] sys-libs/readline-5.2_p12-r1 (0)


example:
Code:
clout@valentine ~ $ sudo su -
valentine ~ # l
-su: l: command not found

_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
KWhat
l33t
l33t


Joined: 04 Sep 2005
Posts: 647
Location: Los Angeles

PostPosted: Sat Aug 23, 2008 6:30 pm    Post subject: Reply with quote

Here is my current setup, this is identical to my other working machine except that its amd64.
Code:

[ebuild   R   ] app-shells/bash-3.2_p33  USE="nls -afs -bashlogger -plugins -vanilla" 0 kB
[ebuild   R   ] app-admin/sudo-1.6.9_p16  USE="pam -ldap -offensive (-selinux) -skey" 0 kB
[ebuild   R   ] sys-libs/readline-5.2_p12-r1  0 kB


I also tried bash USE=vanilla to see if it was a gentoo patch issue, same result. Also i did not try to upgrade to 3.2_p39 as theres a portage blocker i dont want to mess with right now.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Mon Aug 25, 2008 11:02 pm    Post subject: Reply with quote

Maybe try upgrade to ~ in package.keywords - mine works fine with these versions
Code:
[ebuild   R   ] app-shells/bash-3.2_p39  USE="nls -afs -bashlogger -examples -plugins -vanilla" 0 kB
[ebuild   R   ] sys-libs/readline-5.2_p12-r1  0 kB
[ebuild   R   ] app-admin/sudo-1.6.9_p17  USE="ldap pam -offensive (-selinux) -skey" 0 kB
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9691
Location: almost Mile High in the USA

PostPosted: Tue Aug 26, 2008 8:03 pm    Post subject: Reply with quote

I see this on one of my systems, unfortunately it's not up at the moment.

[ebuild R ] app-admin/sudo-1.6.9_p16 USE="pam -ldap -offensive (-selinux) -skey" 0 kB
[ebuild R ] sys-libs/readline-5.2_p12-r1 0 kB
[ebuild R ] app-shells/bash-3.2_p33 USE="nls -afs -bashlogger -plugins -vanilla" 0 kB

As far as I can tell, this machine that I got these versions on also seems to work. IIRC the install that seemed to break for me was a 2008.0-profile machine (? not sure). All my other machines are 2007.0...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
nill
n00b
n00b


Joined: 04 Dec 2007
Posts: 28
Location: PDX homebum

PostPosted: Thu Aug 28, 2008 8:23 am    Post subject: Reply with quote

unmasking ~arch doesn't fix this issue... though I haven't tried it with* all the packages in question. just sudo, and bash...

my current bash:
Code:
app-shells/bash-3.1_p17


with this version, after sudoing to root via:
Code:
 bash $ sudo su -


an automatic carriage return happens with every sudo root elevation using the method above, after the initial sudo elevation. The first attempt works fine. this error isn't reproducible with any other shell.

maybe it's time to finally start using zsh, though it's "features" are somewhat daunting in their configuration--though that hasn't stopped me yet :twisted: ... Though I'd much rather fix this issue, then turn my back on a broken system.
_________________
fun in PDX -> http://www.zoobomb.net
Back to top
View user's profile Send private message
TheHistorian
n00b
n00b


Joined: 16 Jul 2005
Posts: 27

PostPosted: Tue Sep 23, 2008 3:35 am    Post subject: Reply with quote

I'm seeing this too. I think I'm seeing it only when I have X running, but I haven't tested enough to be certain. I figured I'd mention it, in case that triggers an idea for anyone.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum