LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-21-2005, 03:15 AM   #1
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Question Logged in as root, prompted for root password


I am running Slackware 10.0, and when I try to install a package with the KDE package installer I get a prompt to log in as root (when ALREADY logged in as root). It isn't the KDE root prompt; it is a small terminal running a shell. I typed 'login' and tried logging in as root, but it says my login is incorrect. Can you tell me what I need to do, and possibly how I messed something up? It used to work, but I don't remember what's happened since the last time I used it. I can 'make' and 'make install' manually with no problems, however. Thanks.
ta0kira
 
Old 04-21-2005, 06:23 AM   #2
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
You can't type "login" to log in when you're already logged in.

Instead, use the substitute user command. "su root". You'll be prompted for the password, and then given a root shell.
 
Old 04-21-2005, 09:53 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Original Poster
Rep: Reputation: Disabled
Thanks, I'll try that. It doesn't see me as logged in however; I've typed 'logout' and it says something like "this is the shell, therefore you can't log out; you need to exit". It also doesn't translate my PS1; it just displays it as I've typed it in.
ta0kira
 
Old 04-21-2005, 10:04 AM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
If you type in 'whoami' to a console, which user name comes up?
 
Old 04-21-2005, 10:17 AM   #5
Wartz
Member
 
Registered: Feb 2005
Distribution: Slackware
Posts: 52

Rep: Reputation: 15
I'm guessing you logged into KDE as root? try logging into your normal account then installing the package. When the prompt comes up type in your root password and see what happens.

As for logging out of a console, you need to type exit, not logout.
 
Old 04-22-2005, 01:02 AM   #6
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Original Poster
Rep: Reputation: Disabled
Ok, (logged in as root) in the terminal that popped up I did the following;

whoami (gave me 'root')
id -u (gave me '0')
su (nothing)
su root (nothing)
exit (closed window)

So I am root, so I am wondering if "root login" is just the generic title for that terminal, and that there is some other error. It could be that the terminal is only to show the script output, however there is a problem executing the scripts.
ta0kira
 
Old 04-22-2005, 06:36 AM   #7
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
If you're logged in as root, su doesn't prompt for a password.
 
Old 04-22-2005, 07:44 AM   #8
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Original Poster
Rep: Reputation: Disabled
Yes, I am aware of that. That means that something is happening in the package manager that should not be happening.
 
Old 04-22-2005, 08:50 AM   #9
sinczar
LQ Newbie
 
Registered: Oct 2003
Location: Michigan, USA
Distribution: PCLinuxOS, Debian, Slackware
Posts: 14

Rep: Reputation: 0
Same thing happened to me!!

ta0kira, killerbob,

the same thing happened to me yesterday when i tried to run xorgsetup.
I su to root from within a terminal, and got the error message that i needed to be
root before running xorgsetup. from all indications the terminal command line said I
was in root. I even tried to su again but was not prompted for a password, therefore
i must have been in root.

i will try to login as root from a reboot today and see if the problem repeats.

Rich D
Michigan, USA
 
Old 04-22-2005, 09:59 AM   #10
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
sinc, it's a longshot, but were you logged in to console, or were you using an x-term to run xorgconfig?

It's a personal preference, but whenever I do something to my xorg.conf, I change the default runlevel to 3 until I'm sure the change won't break things. Likewise, any changes are done in RL3, and tested with startx.


Likewise, ta0, what program are you trying to install? Is it something whose install depends on X, or can it be installed from console? If so, have you tried switching to RL3 (init 3) to install it? That way you can be 100% sure that you're logged in as root....
 
Old 04-22-2005, 03:08 PM   #11
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
umm...just wondering, why are you using the kde package manager?
is there a problem with installpkg or pkgtool?
 
Old 04-22-2005, 03:25 PM   #12
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Re: Same thing happened to me!!

Quote:
Originally posted by sinczar
ta0kira, killerbob,

the same thing happened to me yesterday when i tried to run xorgsetup.
I su to root from within a terminal, and got the error message that i needed to be
root before running xorgsetup. from all indications the terminal command line said I
was in root. I even tried to su again but was not prompted for a password, therefore
i must have been in root.

i will try to login as root from a reboot today and see if the problem repeats.

Rich D
Michigan, USA
I've found the root to your problem.
For the people that doesn't know, there's a difference between su and su -, the latest will load the enviroment values for the user you're "suing" to (in that case root).
xorgsetup is actually a bash script that tries to configure X for you using the command X -configure, if you take a look at xorgsetup you will see this lines:
Code:
# If we aren't root, bail:
if [ "$USER" = "root" ]; then
  TMP=/var/log/setup/tmp
else
  echo "Only root can configure X."
  exit
fi
It seems the message you got is "Only root can configure X.". That happens if the USER variable in your enviroment is not root.
Well, if you're in user gbonvehi the enviroment variable USER will have the content gbonvehi. If you su to root, the variable USER is still gbonvehi instead of root, this happens when you don't use su - which loads the user enviroment value, in that case root, so if you use su - instead of su USER will be root which will allow you to use xorgsetup.
I hope you get it, if not, sorry, i'm in hurry :P

PS: If i'm not wrong xorgsetup will load X to "autoconfigure" for you, so I guess it won't run if you're running a X server on display 0 (the default), so, do this from text-mode


Last edited by gbonvehi; 04-22-2005 at 04:39 PM.
 
Old 04-22-2005, 06:50 PM   #13
sinczar
LQ Newbie
 
Registered: Oct 2003
Location: Michigan, USA
Distribution: PCLinuxOS, Debian, Slackware
Posts: 14

Rep: Reputation: 0
Understood,

So the all powerful root humbled by a lowly environmental config file. Thanks for the tip. Problem solved

Rich D.
 
Old 04-25-2005, 01:29 AM   #14
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Original Poster
Rep: Reputation: Disabled
The reason I was using KPackage was so I could easily see what I already have. pkgtool and installpkg work just fine for me, but I don't like the idea of having something broken on my system that I did not directly break.

I think the problem was when I installed kernel 2.6.7 as a package; it overwrote some symlinks, so when I was running 2.4.26 it would look in a 2.6.7 directory. I tried replacing the links to reference the 2.4.26 directories, etc., but I guess it did more than just that. ./configure for Qt projects didn't recognize that it was installed, and also it didn't recognize that kdelibs was installed. Basically my system was jacked. I just did a reinstall, and it works fine now. Only took about 2 hours to get everything configured again. Thanks again.
ta0kira

(Oh, BTW, the root prompt doesn't use a script for KPackage; it is hard coded into a .cpp file; I found it. Don't feel like rewriting it.)
 
  


Reply



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
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
being logged in as root Smokey Linux - Security 6 09-06-2004 02:34 PM
kde much slower to start when logged in as alan than logged in as root arubin Slackware 0 04-26-2004 04:27 PM
changing root password (not logged in) rinux Linux - Security 10 05-22-2003 02:15 PM
mozilla works fine when logged in as a user but crashes when logged in as root jimi Linux - General 6 04-02-2003 08:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:09 PM.

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