You are not logged in.

#1 2009-10-27 13:54:18

allorder
Member
From: Québec,Canada
Registered: 2008-10-07
Posts: 14

[Solved] I try to re-enable su

Hi everyone, I searched the forum for help but found nothing usefull to my problem. I try to re-enable "su" use instead of "sudo" but got error.

I tried some of the commands : (http://wiki.archlinux.org/index.php/Dis … o_password)

A similar command unlocks root.
$ sudo passwd -u root

To enable root login again:
$ sudo passwd root

then when I do su i got this message:

Your account has expired; please contact your system administrator
su: incorrect password

Do I need to uninstall sudo... ? roll

Last edited by allorder (2009-10-27 16:39:03)

Offline

#2 2009-10-27 14:20:11

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] I try to re-enable su

If you uninstall sudo now, you have no way off getting root privileges. Try sudo passwd -d root, followed by sudo passwd root.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#3 2009-10-27 14:47:07

allorder
Member
From: Québec,Canada
Registered: 2008-10-07
Posts: 14

Re: [Solved] I try to re-enable su

same thing.

Your account has expired; please contact your system administrator
su: incorrect password

Offline

#4 2009-10-27 15:39:53

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] I try to re-enable su

Does the root account have an expire date? It does if the end of the root line in /etc/shadow is :12345: instead of ::
If that is the case try usermod -e 2010-01-01 root


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#5 2009-10-27 16:19:10

allorder
Member
From: Québec,Canada
Registered: 2008-10-07
Posts: 14

Re: [Solved] I try to re-enable su

$ usermod -e 2010-01-01 root
Password:
usermod: cannot lock /etc/passwd; try again later.

$ sudo usermod -e 2010-01-01 root
Your account has expired; please contact your system administrator
usermod: PAM authentication failed

Offline

#6 2009-10-27 16:28:32

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] I try to re-enable su

What about the expiration info in /etc/shadow? Does either your or the root account have a set expiration date?


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#7 2009-10-27 16:31:17

allorder
Member
From: Québec,Canada
Registered: 2008-10-07
Posts: 14

Re: [Solved] I try to re-enable su

Yes

allorder:$1$s7NjhCyd$XInUXXBm7b3GCuKY1gfqm/:14293:0:99999:7:::

root:$1$/nus.rdU$pMPGIq6ORE.XeC6u05auo0:14544:::::1:

Offline

#8 2009-10-27 16:35:05

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] I try to re-enable su

Then try to edit it:
1. cp shadow shadow.bak
2. remove the '1' at the end of the root line
3. try again
If this screws up your system completely, restore from backup.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#9 2009-10-27 16:38:28

allorder
Member
From: Québec,Canada
Registered: 2008-10-07
Posts: 14

Re: [Solved] I try to re-enable su

big thanks

$ su
Password:
# whoami
root

Offline

#10 2009-10-27 16:39:53

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [Solved] I try to re-enable su

Great. Could you mark the thread as solved by editing the titile of the first post?


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#11 2009-10-27 16:41:18

allorder
Member
From: Québec,Canada
Registered: 2008-10-07
Posts: 14

Re: [Solved] I try to re-enable su

Done! thanks again

Offline

Board footer

Powered by FluxBB