View previous topic :: View next topic |
Author |
Message |
KWhat l33t
Joined: 04 Sep 2005 Posts: 647 Location: Los Angeles
|
Posted: Fri Aug 15, 2008 4:32 pm Post subject: sudo su strange behavior |
|
|
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 |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Fri Aug 15, 2008 10:00 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Fri Aug 15, 2008 10:48 pm Post subject: |
|
|
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 |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Fri Aug 15, 2008 11:21 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Sat Aug 16, 2008 12:01 am Post subject: |
|
|
yes, oh, and
sudo -s
works just fine _________________ fun in PDX -> http://www.zoobomb.net |
|
Back to top |
|
|
KWhat l33t
Joined: 04 Sep 2005 Posts: 647 Location: Los Angeles
|
Posted: Sat Aug 16, 2008 2:43 am Post subject: |
|
|
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 |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Sat Aug 16, 2008 4:03 am Post subject: |
|
|
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 |
|
|
KWhat l33t
Joined: 04 Sep 2005 Posts: 647 Location: Los Angeles
|
Posted: Sat Aug 16, 2008 4:49 pm Post subject: |
|
|
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 |
|
|
mikegpitt Advocate
Joined: 22 May 2004 Posts: 3224
|
Posted: Sat Aug 16, 2008 6:07 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Sat Aug 16, 2008 7:05 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Sat Aug 16, 2008 7:13 pm Post subject: |
|
|
kwhat, which bash version are you using. i'm assuming probably the same as mine, i'm pretty sure this happened after an as well...
EDIT: downgrading didn't work :EDIT _________________ fun in PDX -> http://www.zoobomb.net |
|
Back to top |
|
|
SeaTiger l33t
Joined: 22 Nov 2007 Posts: 603 Location: Toronto, Ontario, Canada
|
Posted: Sat Aug 16, 2008 8:39 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Sat Aug 16, 2008 8:54 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Sun Aug 17, 2008 3:38 am Post subject: solvedish |
|
|
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 |
|
|
KWhat l33t
Joined: 04 Sep 2005 Posts: 647 Location: Los Angeles
|
Posted: Sat Aug 23, 2008 6:30 pm Post subject: |
|
|
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 |
|
|
notHerbert Advocate
Joined: 11 Mar 2008 Posts: 2228 Location: 45N 73W
|
Posted: Mon Aug 25, 2008 11:02 pm Post subject: |
|
|
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 |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9691 Location: almost Mile High in the USA
|
Posted: Tue Aug 26, 2008 8:03 pm Post subject: |
|
|
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 |
|
|
nill n00b
Joined: 04 Dec 2007 Posts: 28 Location: PDX homebum
|
Posted: Thu Aug 28, 2008 8:23 am Post subject: |
|
|
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:
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 ... 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 |
|
|
TheHistorian n00b
Joined: 16 Jul 2005 Posts: 27
|
Posted: Tue Sep 23, 2008 3:35 am Post subject: |
|
|
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 |
|
|
|