Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 09-05-2009, 10:30 AM   #1
LQ Newbie
Registered: Sep 2009
Location: UK
Distribution: slackware
Posts: 7

Rep: Reputation: 0
Su to root works fine @ console, fails in x (cant login at all when using xdm)

*/Sorry if this has been covered before by either the slackbook, slackware basics, manpages or either on this forum or over at, i tried to be sure id scanned the above references thoroughly before posting but if its been covered please point me to the appropriate sources/*

Just completed a fresh install of slackware 13, and when logging into the console as root (with the exact root password given during the setup pahse of the installation) i can login fine. I can su to other users, and after setting up a regular user with the adduser script i can login as said user and even su to root, again from the console.

The problem im having is when i then attempt the same with x windows, either by startx or xdm.

With startx, xfce starts up perfectly, but then at a terminal i cannot use sudo (which i set up as root @ the console login) nor can i su to root. As good practice i do not login to a full x session as root, so iv not attempted to see if i can su when actually logged in to xfce as root.

Attempts to sudo give the output "incorrect password" and su (on its own so as to call the superuser) with the correct password simply fails with a slightly patronising "Sorry".

Trying to edit my inittab to launch straight into x windows results in a xdm screen that will not let me login either as root or the regular user.

All the correct virtuals terminals's are uncommented in /etc/securetty, i also uncommented pts/1 after running the tty command to see which virtual terminal xorg was running on (this had no effect).

Iv checked thoroughly and /etc/login.defs dosent have anything in it that would dissallow using su (which makes sense as it works fine at the raw console) plus SET_WHEEL_ONLY is set to no (i added the user to the wheel group regardless to make double sure).

/etc/login.access similarly dosent contain anything that would dissallow use of su.

Seeing as i cant find anything relevent in any documentation im completely stumped, i even went as far as burning the DVD+checksum again to make sure it wasnt some form of corruption on the media, even tho the md5's checked fine.

Any thoughts?
Old 09-05-2009, 02:25 PM   #2
Didier Spaier
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad W520
Posts: 5,373

Rep: Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494
If you don't have an English keyboard (e.g. I have a French one), you have to indicate the good layout of your keyboard in X server's configuration.

As Slackware 13.0 do not have a /etc/X11/xorg.conf file out of the box (it uses HAL to set up X instead if I understand well), you will have to create one yourself and indicate your language as the "XkbLayout" option in the "InputDevice" section of this file.

For instance I have:
Section "InputDevice"
#     (other options here)
     Option  "XkbLayout" "fr"
Edit: I forgot "fr" after Option "XkbLayout"

Last edited by Didier Spaier; 09-06-2009 at 03:15 AM. Reason: I forgot "fr" after Option "XkbLayout"
Old 09-05-2009, 04:58 PM   #3
LQ Newbie
Registered: Sep 2009
Location: UK
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for the input didier, unforuturnatley i will not solve my problems as i have a uk keyboard so i guess something else is miss configured with X.

This is the only stumbling bloke i have from adopting slackware full time, please can someone shed some light on this problem, im almost positive it must be some user based error - something iv overlooked, or not configured.

Edit: misread part of didiers response, amended my comments accordingly

Last edited by lionsong; 09-05-2009 at 05:01 PM.
Old 09-06-2009, 05:14 AM   #4
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,216

Rep: Reputation: 294Reputation: 294Reputation: 294
That is very strange. Do you have any custom prompt set in ~/.bashrc or ~/.bash_profile? I seem to recall this can cause problems when incorrect strings are added to any input in a terminal and cause login/su to fail.

Which terminal are you using to su with while in X? Have you tried any others to see if it's a terminal problem.

...(which i set up as root @ the console login)...
I'm not quite sure what you mean here. Sudo doesn't usually need any setting up except in sudoers file (use visudo for that).
Old 09-06-2009, 08:22 AM   #5
LQ Newbie
Registered: Sep 2009
Location: UK
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: 0
I'm not quite sure what you mean here. Sudo doesn't usually need any setting up except in sudoers file (use visudo for that).
Sorry i should have been more verbose, i mean that as root on a raw console (ie outside of x) i edited the sudoers file using visudo.

My .profile simply contains my $PATH at the minute.

At the raw console i can switch between tty's and login and su to root no problem, even sudo works.

Thanks for the input dive.

Iv slept on didiers idea abit and think it actually be on the money - if the installer only sets the keyboard to the uk keymap while installing then as soon as im in x (which is now self configuring as of slack 13) it would not map the non alpha numeric keys properly, so all my long winded complex passwords would fail. This is the first time iv been bitten by having too strong a password!

Does anyone know what the installer does with the keymap post installation? I would have assumed it would be written into the installed systems configuration? Also, apart from didier, from my digging around i seem to be an isolated case with this problem, so either its not the keyboard, or its such an obvious correction no slack user has ever had to post about it

Ill try that tonite regardless, thanks again for the input folks.
Old 09-06-2009, 06:22 PM   #6
LQ Newbie
Registered: Sep 2009
Location: UK
Distribution: slackware
Posts: 7

Original Poster
Rep: Reputation: 0
Well i finally got it working, thanks everyone.

Didier was right, my keymap wasnt set correctly. After trying the following i finally found success just running xorgconfig and tweaking a fresh xorg.conf file as mentioned here

Thanks again for the help folks!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
su failing, same password works fine at console Mistoffeles Linux - Server 5 03-02-2009 07:55 PM
Vista fails to print when going to CUPS. XP works fine. yah0m Linux - Software 1 08-09-2008 08:54 AM
su - password not accepted; root console login fine mrclisdue Linux - Security 5 11-25-2007 05:24 PM
kdm cannot login to KDE, but gdm and xdm work fine?? ming0 Slackware 2 09-01-2004 02:08 AM
su works but root login fails? Pcghost Linux - General 2 08-29-2003 08:26 PM

All times are GMT -5. The time now is 05:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration