Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th February 2011, 20:56
nomikos nomikos is offline
Junior Member
 
Join Date: Feb 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Talking I screwed up sudoers and I haven't root access (remote server).

This is the hard way to learn when you MUST use visudo, specially in a remote server. That's right. I did something stupid like:

Quote:
$ sudo vi /etc/sudoers
and now have:

Quote:
$ sudo
>>> /etc/sudoers: syntax error near line 79 <<<
sudo: parse error in /etc/sudoers near line 79
sudo: no valid sudoers sources found, quitting
So what if I have locked the root account (passwd -l root) and now I can't do su to fix sudoers file???

As i said this is in a remote server (VPS) so I can not use recovering special tools via CD or similar.

thanks.-
Reply With Quote
Sponsored Links
  #2  
Old 12th February 2011, 02:30
beyerservice beyerservice is offline
Member
 
Join Date: Feb 2011
Location: /dev/null
Posts: 30
Thanks: 10
Thanked 6 Times in 5 Posts
Default

no recovery mode or something like that?

the thing is that it supposed to be nothing that you can do if you do not have recovery terminal.
Reply With Quote
  #3  
Old 12th February 2011, 11:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

You can boot from a recovery or live CD and try to fix the file. This should give you the idea: http://www.howtoforge.com/how-to-res...d-with-knoppix
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 12th February 2011, 11:47
beyerservice beyerservice is offline
Member
 
Join Date: Feb 2011
Location: /dev/null
Posts: 30
Thanks: 10
Thanked 6 Times in 5 Posts
Default

Quote:
Originally Posted by nomikos View Post
As i said this is in a remote server (VPS) so I can not use recovering special tools via CD or similar.
Quote:
Originally Posted by falko
You can boot from a recovery or live CD and try to fix the file. This should give you the idea: http://www.howtoforge.com/how-to-res...d-with-knoppix
???not really helping.
Reply With Quote
  #5  
Old 12th February 2011, 16:51
nomikos nomikos is offline
Junior Member
 
Join Date: Feb 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your answers.
Yes, I do not have physical access.
I am thinking in trying code some simple routine (as I have ssh access as user at least ) using something like http://www.kernel.org/doc/man-pages/...etpwent.3.html
Obviously I am not hurry and may be fun. Any idea to start?
Thanks.-
Reply With Quote
  #6  
Old 12th February 2011, 18:33
nomikos nomikos is offline
Junior Member
 
Join Date: Feb 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Update

What a odyssey! I was thinking in very rare things to solve this.
===
Solution:
I have webmin installed. So as the root account WAS locked, I have another webmin user with access to all modules.
Webmin > Users and Groups > root account > password: No password required
===
Can you believe it?
Reply With Quote
  #7  
Old 12th February 2011, 20:39
beyerservice beyerservice is offline
Member
 
Join Date: Feb 2011
Location: /dev/null
Posts: 30
Thanks: 10
Thanked 6 Times in 5 Posts
Talking

no. thats too much luck for you :-D
Reply With Quote
  #8  
Old 13th February 2011, 19:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
 
Default

Quote:
Originally Posted by beyerservice View Post
???not really helping.
Why? He could boot from a live system, mount his hard drive and then try to fix /etc/sudoers.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Tags
sudoers

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix email server problems Access denied 554 554 5.7.1 state 14 AceRimmer Server Operation 4 19th June 2008 14:36


All times are GMT +2. The time now is 07:33.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.