You are not logged in.

#1 2013-12-17 20:45:45

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Hello,
In my fresh installed gnome3 graphical environment, in gnome-terminal, I can not gain root access.
I've tried diverse su commands.

1. su command, ends with:

su -
Password: 
su: Authentication failure

2. sudo command, ends with:

sudo -l
[sudo] password for root: 
Sorry, try again.
[sudo] password for root: 
Sorry, try again.
[sudo] password for root: 
sudo: 2 incorrect password attempts

Of course - each time, I typed correct password.
In my sudoers file, group wheel ( into which belongs user I logged in ) has permissions to execute any command.

3. gksudo with debug:

gksudo -ld gnome-terminal
No ask_pass set, using default!
xauth: /tmp/libgksu-stbGos/.Xauthority
STARTUP_ID: gksudo/gnome-terminal/879-0-Bex_TIME0
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: root
cmd[7]: --
cmd[8]: gnome-terminal
buffer: -GNOME_SUDO_PASS-
brute force GNOME_SUDO_PASS ended...
Yeah, we're in...
sudo: 1 incorrect password attempt
xauth: /tmp/libgksu-stbGos/.Xauthority
xauth_env: /var/run/gdm/auth-for-tangram-9JYTNt/database
dir: /tmp/libgksu-stbGos

I've been asked for my password, not root, after typing I get "incorrect password attempt", if I type root pwd I get the same.

4. Same with this command:

gksu -ld gnome-terminal
No ask_pass set, using default!
xauth: /tmp/libgksu-SBPcOB/.Xauthority
STARTUP_ID: gksu/gnome-terminal/1028-0-Bex_TIME0
cmd[0]: /usr/bin/sudo
cmd[1]: -H
cmd[2]: -S
cmd[3]: -p
cmd[4]: GNOME_SUDO_PASS
cmd[5]: -u
cmd[6]: root
cmd[7]: --
cmd[8]: gnome-terminal
buffer: -GNOME_SUDO_PASS-
brute force GNOME_SUDO_PASS ended...
Yeah, we're in...
sudo: 1 incorrect password attempt
xauth: /tmp/libgksu-SBPcOB/.Xauthority
xauth_env: /var/run/gdm/auth-for-tangram-6RCSoJ/database
dir: /tmp/libgksu-SBPcOB

In multi-user-mode I can login to root account.

Last edited by tangram (2013-12-23 08:42:09)

Offline

#2 2013-12-17 21:10:15

Gulver
Member
Registered: 2013-05-24
Posts: 208

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

I would boot into a livecd environment and change both of my passwords by chroot. Nothing else. If happens again then look for something.

Last edited by Gulver (2013-12-18 05:00:33)

Offline

#3 2013-12-18 03:48:04

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

After looking at the man page for sudo, it seems like the -l option is being misused here. Try a command after the sudo such as the following

sudo gedit

and post the output. Make absolute sure you are typing your password 100% right.


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#4 2013-12-19 07:38:37

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Hello Hurricane.
Yesterday, I had a company christmas-meeting and did not have time to check this command.
It seems to me, that once I have tried "sudo (xterm|gnome-terminal)", without success.
This evening I will check it again and of course post output.

Offline

#5 2013-12-19 11:01:00

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

I think you have an incorrect keyboard layout for X.

Edit this file

/etc/X11/xorg.conf.d/10-evdev.conf

And in this section

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

add the line

Option "XkbLayout" "mykeyboardlayout"

With mykeyboardlayout being the correct code for your keyboard.

See here for codes: http://en.wikipedia.org/wiki/ISO_3166-1 … e_elements

Log out and log in again and then it should work.



For me the section looks like this

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "gb"
EndSection


Hope this helps!

Last edited by Chazza (2013-12-19 11:08:26)

Offline

#6 2013-12-19 22:27:24

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Hello.
Hurricane:
Still the same.
Command "sudo xterm" returns:

sudo xterm
[sudo] password for root:
Sorry, try again.
[sudo] password for root:
Sorry, try again.
[sudo] password for root:
Sorry, try again.
sudo: 3 incorrect password attempts

Chazza:
I added this option, but it did not help.
My input class section for keyboard looks like this:

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "pl"
EndSection

I think your helpfull advice may be a good path...
I am using locale set to "en_US.UTF-8",
/etc/vconsole.conf contains:

# dartst
KEYMAP=pl
FONT=Lat2-Terminus16
#FONT=lat2-16
FONT_MAP=8859-2

and I am using keymap hook ( for national characters )

HOOKS="base udev autodetect modconf block lvm2 filesystems keymap fsck"

Hm.. it looks like sudo does not understand what I am typing ( misunderstands my correct typed password ).

Offline

#7 2013-12-19 23:00:58

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Yeah I'm thinking it's the non-english characters you are using. I would suggest changing your locale to where you are instead of using en_US. I don't exactly know how you could do that without sudo in the first place. I guess your only option would be to boot into the Arch live CD and chroot.


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#8 2013-12-20 08:39:41

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

I think that changing locale to pl_PL_UTF-8 does not metter.
My root's password contains only simple ascii characters and digits, without any national characters.
I choose locale en_US only to practice english skills ( I have also de_DE and pl_PL generated ) in future I plan to switch
between locales with kernel commandline param LOCALE.locale_code.
Locale settings can be changed ( systemwide ) via /etc/locale.conf and localy via .bashrc, I do not need chroot, I can boot into initlevel 3 or 5.
After work I will play with locale settings further ... ( if I had not to go with wife christmas shoping ;-/ ).

Offline

#9 2013-12-20 08:54:48

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Sorry, little mistake:
in line ... "between locales with kernel commandline param LOCALE.locale_code" ...
should be:
"between locales with kernel commandline param locale.LANG=locale_code"

Offline

#10 2013-12-20 09:30:13

xtraroot
Member
Registered: 2013-12-17
Posts: 59

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

How is su in the tty?

Offline

#11 2013-12-20 10:24:23

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

As i wrote at the end of post #1, fine without any problems.

Offline

#12 2013-12-20 18:23:04

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

tangram wrote:

I think that changing locale to pl_PL_UTF-8 does not metter.
My root's password contains only simple ascii characters and digits, without any national characters.
I choose locale en_US only to practice english skills ( I have also de_DE and pl_PL generated ) in future I plan to switch
between locales with kernel commandline param LOCALE.locale_code.
Locale settings can be changed ( systemwide ) via /etc/locale.conf and localy via .bashrc, I do not need chroot, I can boot into initlevel 3 or 5.
After work I will play with locale settings further ... ( if I had not to go with wife christmas shoping ;-/ ).

Okay then. Yeah I've never had to change locales before like that so I didn't really know how to tell you to do it. If the problem is only gnome-terminal, but sudo works in the tty, maybe you could try logging in on tty1 and just re-installing gnome-terminal?

You could also try installing another terminal emulator such as terminator and seeing if it works in there.

Last edited by Hurricane (2013-12-20 18:24:34)


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#13 2013-12-23 08:41:06

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Hurrican, ok, there is no need to install antother terminal, as I wrote it did not work also in xterm.

Yesterday evening, tired and sad that gk(su|sudo) still does not work,
as the "last chance idea", I logged in into multi-user mode ( init level 3 ) and changed root's password,
then loged in into graphical mode ( init level 5 ), start gnome-terminal and suddenly ... command "su -" started to work.
By the way, similar solution ( but with chroot ) has suggested Gulver in his post ( this thread, answer #2 ).
The question is, why root's password, set during install, after finished installation is recognized in text mode, but not im graphical ?
First root's password was really simple, like "dog4356", without any national chars.

Offline

#14 2013-12-23 08:44:37

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Btw, happy christmas :-)

Offline

#15 2013-12-23 17:19:53

Hurricane
Member
Registered: 2012-10-18
Posts: 77

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

tangram wrote:

Hurrican, ok, there is no need to install antother terminal, as I wrote it did not work also in xterm.

Yesterday evening, tired and sad that gk(su|sudo) still does not work,
as the "last chance idea", I logged in into multi-user mode ( init level 3 ) and changed root's password,
then loged in into graphical mode ( init level 5 ), start gnome-terminal and suddenly ... command "su -" started to work.
By the way, similar solution ( but with chroot ) has suggested Gulver in his post ( this thread, answer #2 ).
The question is, why root's password, set during install, after finished installation is recognized in text mode, but not im graphical ?
First root's password was really simple, like "dog4356", without any national chars.

You're right. I don't even have xterm installed so I guess I just singled out gnome-terminal and forgot that xterm also wasn't working.
Forgive me for my shaky advice. Like you I've been super busy, and sweating out a fever of 102 degrees (that's Fahrenheit no my
blood wasn't boiling lol). Anyways, glad you got it working. After reading over the whole thread and thinking about it for a little bit, I
can't really make a good guess as to what was happening.

I'm sure you probably had tried this, but you could have typed the password out in the command line so you could see it. If there was
something wrong with it, it would have shown up there as well. If it was perfectly fine, then it would have been very, very weird.

The important thing is you got it working. smile

Merry Christmas.


Computers are extra dumb, which is why it takes extra smart people to make them work.

Offline

#16 2013-12-23 19:25:03

tangram
Member
From: 3City, Poland
Registered: 2013-01-21
Posts: 55

Re: ( SOLVED )gnome-terminal, su, sudo, gksu, gksudo does not work

Hello Hurricane, yes it was strange / dummy problem.
I set during install root's password and never tought about it.
Under console ( text mode ) su worked from beginning, but in X not,
even without any window manager, only with clean twm und xterm.
Thanks for your words of appreciation, I am also glad of myself and lucky that su finally works.
This is the reason why I like Linux - lot of problems, but lot of satisfaction with their solving too.

What about your fever, do you feel yourself better ?
When I saw 102 degrees F. I quickly converted value with my handy to Celsius degress ( about 38.88 ) - not bad.
You wrote you have been super busy, work or study ?
I am working here as software engineer.
It was nice to write with you - I wish you good health and also Merry Christmas.

Offline

Board footer

Powered by FluxBB