You are not logged in.

#1 2010-09-25 23:59:59

jboons
Member
Registered: 2010-09-25
Posts: 37

[Solved] Root doesn't work

So, I've been customizing Arch a lot over the past day or so, and I'm pretty sure I messed up root somewhere, but I can't figure out where. All I know is that when I login using my username, and try to

su root

, I type in my password, it pauses for a while and then just keeps me as the user. Same thing happens if I try logging into root from the start.

Also, if I try

su -

, it says

su: user - does not exist

. Any ideas?

Last edited by jboons (2010-09-26 17:23:23)

Offline

#2 2010-09-26 00:17:08

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: [Solved] Root doesn't work

Really?  Logging in as root from the terminal gives you your regular user account?  Did you put "su jboons" in root's .bashrc or something?

Offline

#3 2010-09-26 00:19:46

jboons
Member
Registered: 2010-09-25
Posts: 37

Re: [Solved] Root doesn't work

The contents of my /root/.bashrc are:

. $HOME/.bashrc

Offline

#4 2010-09-26 00:29:25

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: [Solved] Root doesn't work

if you 'su root' you must give it the root password, not your password. if you use sudo, you give it your password.

Offline

#5 2010-09-26 00:33:36

jboons
Member
Registered: 2010-09-25
Posts: 37

Re: [Solved] Root doesn't work

jdarnold wrote:

if you 'su root' you must give it the root password, not your password. if you use sudo, you give it your password.

I'm not getting a password error, though. And I haven't changed the password at all, so what I'm typing as my password is correct.

Offline

#6 2010-09-26 01:34:45

Atragor
Member
Registered: 2009-02-28
Posts: 59

Re: [Solved] Root doesn't work

jboons wrote:

it says

su: user - does not exist

This error can be caused by having alias su='su -' in your .bashrc, use alias command to check.  Also try to look at your /etc/profile, there also can be something like 'su jboons' as tavianator assumed.

Last edited by Atragor (2010-09-26 01:36:27)

Offline

#7 2010-09-26 01:36:17

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [Solved] Root doesn't work

Unless I am going on a typo from your side, you're not supposed to type in your password. You're supposed to type your root user's password; not yours. Su != sudo.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2010-09-26 02:35:43

jboons
Member
Registered: 2010-09-25
Posts: 37

Re: [Solved] Root doesn't work

Atragor wrote:
jboons wrote:

it says

su: user - does not exist

This error can be caused by having alias su='su -' in your .bashrc, use alias command to check.  Also try to look at your /etc/profile, there also can be something like 'su jboons' as tavianator assumed.

Nothing out of the ordinairy.

.:B:. wrote:

Unless I am going on a typo from your side, you're not supposed to type in your password. You're supposed to type your root user's password; not yours. Su != sudo.

Well, not that it matters, but they're the same password.

Last edited by jboons (2010-09-26 02:36:31)

Offline

#9 2010-09-26 10:59:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Root doesn't work

jboons wrote:

Well, not that it matters, but they're the same password.

<cries laughing>
Next time, please don't withhold such important info - less headscratching is a good thing :-)

[karol@black ~]$ su
Password: 
[root@black karol]# 

Works here :-)

Can you log in as root? Boot into the console and type 'root' as login + give the password.

Offline

#10 2010-09-26 11:11:55

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: [Solved] Root doesn't work

jboons wrote:

The contents of my /root/.bashrc are:

. $HOME/.bashrc

To me it looks like this will create a recursive loop until there is kitten death (or whatever happens in bash)... Perhaps not source bashrc from bashrc?

Last edited by jac (2010-09-26 11:12:28)

Offline

#11 2010-09-26 14:02:13

Atragor
Member
Registered: 2009-02-28
Posts: 59

Re: [Solved] Root doesn't work

karol wrote:

Can you log in as root? Boot into the console and type 'root' as login + give the password.

jboons wrote:

Same thing happens if I try logging into root from the start.

It seems that he can't.

jboons, maybe you've set /bin/false (or /bin/true or something else) as root's shell. On my machine it leads to the same behaviour as you have.

Try to add 'set -x' to /etc/profile (this will make your shell print a lot of debug info) and login as root (without su).

Offline

#12 2010-09-26 17:21:36

jboons
Member
Registered: 2010-09-25
Posts: 37

Re: [Solved] Root doesn't work

jac wrote:
jboons wrote:

The contents of my /root/.bashrc are:

. $HOME/.bashrc

To me it looks like this will create a recursive loop until there is kitten death (or whatever happens in bash)... Perhaps not source bashrc from bashrc?

It looks like you were right! I tried what Atagor said and added

set -x

to /etc/profile, logged out, and tried logging in as root. I got a seemingly endless list of something like "......................................................../root/.bashrc.............."
"......................................................../root/.bashrc.............."
"......................................................../root/.bashrc.............."
"......................................................../root/.bashrc.............."
"......................................................../root/.bashrc.............."
Which to me means "hurr durr kitten death," so I got rid of what was in my /root/.bashrc and it works now! Thanks everyone.

Offline

Board footer

Powered by FluxBB