Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 10-01-2008, 06:41 AM   #1
LQ Newbie
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
Question sudo and su both disabled on my system

I enabled my root account in ubuntu

and was editing /etc/sudoers, for doing that I had set its file permissions to 744.

now when I do su, I get an account expiration message

santhosh@santhosh-laptop:~$ su
Your account has expired; please contact your system administrator
su: User account has expired
and I am not able to execute sudo too.

santhosh@santhosh-laptop:~$ sudo vim /etc/sudoers 
sudo: /etc/sudoers is mode 0744, should be 0440

is there a way in which I can reset the permissions of /etc/sudoers file or reenable the root account ?

Thank you
Old 10-01-2008, 07:00 AM   #2
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
You can boot into single-user mode and get root powers with no password required. From there you can fix things.

When you see the GRUB menu, hit any key to stop the countdown.
With the desired option highlighted, hit "e" for edit, then select the kernel line, "e" again. Add the word "single" (no quotes) at the end.
Hit enter and then "b" to boot.
Old 10-01-2008, 08:10 AM   #3
LQ Newbie
Registered: Oct 2007
Distribution: Ubuntu, RedHat Enterprise Linux
Posts: 12

Rep: Reputation: 0
Fix account

To fix root account expiration, run command:
 $ chage -E -1 root
(read man chage)

And you know already how to fix /etc/sudoers file.
Btw, use command:
 $ sudo visudo
to edit your sudoers file. It will handle file locking and permissions correctly.


spam, spamming

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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
The system administrator has disabled your account? Mate de Vita Linux - Newbie 3 08-30-2008 01:35 PM
sudo and denying to system log. binary_0011 Linux - Newbie 1 06-08-2006 01:40 AM
Problem: Root enabled, sudo disabled Conjurer Ubuntu 4 01-15-2006 12:55 AM
Access to floppy freezes system (Supermount already disabled) Mr. Gone Linux - Software 3 04-05-2004 02:47 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:57 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