You are not logged in.

#1 2011-04-05 00:06:08

bluekirby
Member
Registered: 2011-04-04
Posts: 5

[SOLVED] Unable to login to root unless it's through another account.

I'm fairly inexperienced with Linux and am having a frustrating problem.
I've forgotten my root password (oh boy) and am experiencing some weird problems attempting to reset it.
I have other accounts, which I can log in to, and they have sudo privileges. So I am not very restricted as to what I can actually do.

So I tried to use "passwd root" to change my root account password.
This allowed me to log in to root (at least I believe it is root) using "su" and the newly created password.
However, when I reboot and try to log in to root from the normal log in screen, it claims I'm using the wrong password.
I also tried logging in to root using "su" and then using "passwd" to change the root password. I got the same results as before.
I even tried removing the root password from the "etc/shadow" file, though I'm really not familiar with how that file works in archlinux.

I've searched around online, and stumbled across some similar topics in this forum, but all of them have worked around the problem by using a boot disc in some way.
I would really like to know what exactly is going on with my system here and why this password confusion is happening. If possible, I'd really really like to reset my root password remotely.

If this has been addressed before and I missed it, please link me to the old topic.

Thanks for reading guys. Any help is appreciated.

Last edited by bluekirby (2011-04-05 04:55:20)

Offline

#2 2011-04-05 00:26:11

jaco
Member
From: Toulouse, France
Registered: 2011-03-17
Posts: 149

Re: [SOLVED] Unable to login to root unless it's through another account.

are you sure that your keyboard map used to enter password at login is is the same as the map you use to change the password?

Offline

#3 2011-04-05 03:27:47

bluekirby
Member
Registered: 2011-04-04
Posts: 5

Re: [SOLVED] Unable to login to root unless it's through another account.

jaco wrote:

are you sure that your keyboard map used to enter password at login is is the same as the map you use to change the password?

very sure

Offline

#4 2011-04-05 03:31:05

AurosGamma
Member
From: San Cristobal,Venezuela
Registered: 2011-02-22
Posts: 132

Re: [SOLVED] Unable to login to root unless it's through another account.

Im not an expert but i think that root login with x runing is not allowed(e.g. You cant login as root on gnome,kde,etc) root login is only for CLI(i think)

Offline

#5 2011-04-05 03:35:14

bluekirby
Member
Registered: 2011-04-04
Posts: 5

Re: [SOLVED] Unable to login to root unless it's through another account.

Oh, I should be more specific.
I am logging in using the command line interface. I don't have any desktop or graphics interface installed.

Offline

#6 2011-04-05 03:47:45

bluekirby
Member
Registered: 2011-04-04
Posts: 5

Re: [SOLVED] Unable to login to root unless it's through another account.

If there were any location where I could deny people from logging in as root, where would that file be?
I'm really hoping it's just something I edited months ago and forgot about.

Offline

#7 2011-04-05 04:22:33

AurosGamma
Member
From: San Cristobal,Venezuela
Registered: 2011-02-22
Posts: 132

Re: [SOLVED] Unable to login to root unless it's through another account.

bluekirby wrote:

If there were any location where I could deny people from logging in as root, where would that file be?
I'm really hoping it's just something I edited months ago and forgot about.

Take a look to this topic:
https://bbs.archlinux.org/viewtopic.php?id=67753

And try this to reset the password:
http://www.howtoforge.com/how-to-reset- … knoppix-p2

After that, only the users who knows(and are listed on /etc/sudoers) the root password will be able to do root jobs, like installing/removing packages or modify the filesystem.
Note that if you use sudo you can use visudo to edit /etc/sudoers command to prevent or allow users to do root jobs, example:

...
root ALL=(ALL) ALL
...
...
# %wheel ALL=(ALL) ALL
...

If you uncomment %wheel line all users in wheel group can do root jobs if they know the root password.
But you can leave commented %wheel line and add users manually, example(for "edward" and "christine" users):

...
root ALL=(ALL) ALL
...
...
# %wheel ALL=(ALL) ALL
edward ALL=(ALL) ALL
christine ALL=(ALL) ALL
...

By doing this,these two users(through sudo) and root will be allowed to do root jobs and nobody else
NOTE: Editing /etc/sudoers through visudo is hardly recommended, please dont edit the file manually with nano,vi,vim,etc. USE "visudo"
P.S. Reseting the password through a live distro is the most recommended way to reset the root password.

Last edited by AurosGamma (2011-04-05 04:31:34)

Offline

#8 2011-04-05 04:54:19

bluekirby
Member
Registered: 2011-04-04
Posts: 5

Re: [SOLVED] Unable to login to root unless it's through another account.

Thank you so much for all the help.
I was reading through the material posted and realized the source of my problem.
I did not have ssh set up correctly. That's something I should have mentioned as well. I can't believe I forgot to say that I was logging in remotely.
I had my sshd_config file as
"AllowUsers user1 user2"
I changed it to
"AllowUsers user1 user2 root"
and restarted ssh
and now I can log in just fine.
Thank you for all of the help, I still feel like I learned a lot looking over that information.

Offline

Board footer

Powered by FluxBB