LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2007, 10:10 AM   #1
shaft
LQ Newbie
 
Registered: Jun 2007
Posts: 8

Rep: Reputation: 0
UBUNTU 7.04 i386 cannot login as root ... ? HELP ?


Hi there! I have installed ubuntu 7.04 and I'm trying, to change root password, but there is some troubles...

This is what i try :

Code:
killersoft@KillerSoft-desktop:~$ sudo passwd root
sudo: /etc/sudoers is mode 0777, should be 0440
After that i try
Code:
killersoft@KillerSoft-desktop:~$ sudo chmod 0440 /etc/sudoers
sudo: /etc/sudoers is mode 0777, should be 0440
killersoft@KillerSoft-desktop:~$

killersoft@KillerSoft-desktop:~$ chmod 440 /etc/sudoers
chmod: changing permissions of `/etc/sudoers': Operation not permitted
killersoft@KillerSoft-desktop:~$

killersoft@KillerSoft-desktop:~$ chown root:root /etc/sudoers
chown: changing ownership of `/etc/sudoers': Operation not permitted

killersoft@KillerSoft-desktop:~$ sudo chmod -R 440 /etc
sudo: /etc/sudoers is mode 0777, should be 0440

killersoft@KillerSoft-desktop:~$ passwd root
passwd: You may not view or modify password information for root
After this i still getting this row
Code:
sudo: /etc/sudoers is mode 0777, should be 0440
How can I login as root? I am newbie ubuntu user
 
Old 11-02-2007, 10:44 AM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Ubuntu doesn't allow you to login as root, for safety and for noobs.

if you are noob, then use only a normal user, and sudo if required. There is a reason why they did that.
 
Old 11-02-2007, 12:10 PM   #3
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
Not sure how/why your /etc/sudoers got set to 0777, that is not what you want--0440 is the correct permissions. Looks like with the incorrect settings it is not even allowing you to use the sudo command. You might want to try logging in with single user mode. You can do this by hitting ESC during boot to get the GRUB menu. Hit 'e' to edit GRUB, then choose the line that begins with kernel and hit 'e' again to edit that line. At the end of the line type in 'single' (without the quote marks). Hit enter, hit 'b' to boot. This will boot you into and terminal session as root without asking for a password. From here do the following

Code:
chmod 440 /etc/sudoers
You can also set roots password here by typing
Code:
#passwd
And entering what you want for the root passwd.

Once you have reset the permission on /etc/sudoers and done what else you need to do from this session all you need to to is reboot to revert back to your normal login.

I would follow duryodhan advice though and not setup a root password, but use sudo instead. If you have several commands you need to run as root and do not want to have to type sudo before each one just do one of the following.

Code:
sudo su
or
Code:
sudo -i
Hope this helps.

Last edited by wit_273; 11-02-2007 at 12:11 PM.
 
  


Reply


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
how to login graphically as root user in ubuntu baran_6566 Ubuntu 1 10-20-2007 06:45 AM
Root login issues with Mandriva & Ubuntu iconicmoronic Linux - Security 4 03-23-2007 03:51 AM
ubuntu can't login as root kristof_v Linux - Software 20 12-30-2006 07:09 AM
root login problem in ubuntu 5.10 Pr_009 Ubuntu 16 02-25-2006 08:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration