LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-26-2008, 12:57 AM   #1
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Rep: Reputation: 30
No passwd entry for root!


Hello Guys,

I have a Ubuntu Fiesty Linux which displays the following at the time I supply the following commands:

Code:
vjs@micex:~$ sudo /etc/init.d/apache2 restart
sudo: no passwd entry for root!
vjs@micex:~$
I tried logging through runlevel 1 but all it ends saying:

Code:
chown: root-tty:invalid user
su-login cannot open passwd database 
Segmented Fault
init:rcS-sulogin main process(3801) terminated with status 139.
-
-
-
Its just displaying cursor and nothing ahead.


I could see
#root .. .. ..

Entry on /etc/passwd but couldnt modify.

Pls Help !!!

Last edited by ajeetraina; 05-26-2008 at 12:59 AM.
 
Old 05-26-2008, 01:15 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you tried as your admin user (ie not root)

sudo passwd -u root

to set the password?
 
Old 05-26-2008, 01:20 AM   #3
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
vjs@micex:~$ sudo passwd -u root
sudo: no passwd entry for root!
vjs@micex:~$

vjs@micex:~$ sudo passwd -u admin
sudo: no passwd entry for root!
vjs@micex:~$

Still not working!!
 
Old 05-26-2008, 01:28 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Why does the second entry give the same message as the first? What user are you doing this as?
 
Old 05-26-2008, 01:36 AM   #5
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
You could boot it into single user mode and set a password. (Press the esc key immediately after the powerup test and then select recovery mode.) But you shouldn't need a root password to use sudo! In fact, Ubuntu is designed to not have a root password. (This has been a cause for contention with some people.) So I would wonder if the cause of it wanting a root password to be set shouldn't be investigated.

Last edited by blackhole54; 05-26-2008 at 01:38 AM.
 
Old 05-26-2008, 01:43 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
May be it is trying to say that the passwd file itself does not have any entry for root?
I use Ubuntu and never need to give root password for sudo and hence logically it should not matter.
But try editing the file if you can but if you can not sudo then you should not be able to edit the file either.
Only way is to enter single user mode or recovery mode.
 
Old 05-26-2008, 01:45 AM   #7
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
I followed http://www.cyberciti.biz/tips/recove...word-file.html
and ran :

1. Rebooted
2. Edit Recovery Mode : with init=/bin/bash
3. mount -rw -o remount /
4. Edited /etc/passwd file(Surprisingly nano editor was working but vi dint)
5. Moved passwd- to passwd and moved shadow- to shadow.
6. Forcibly rebooted.

Now it seems to work. But it displays:

I have no name!@micex:~$


Why it is displaying so??
 
Old 05-26-2008, 02:01 AM   #8
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by linuxlover.chaitanya View Post
May be it is trying to say that the passwd file itself does not have any entry for root?
Bingo! I think I (and perhaps others) read the error message a little too quickly.

Quote:
Originally Posted by ajeetraina View Post
(Surprisingly nano editor was working but vi dint)
Does anybody else think this is all too strange? If this is a new installation I wonder if it should be re-installed. If it is not new, I am wondering if the system has been compromised. Reactions from anybody else?

@ajeetraina,

You might want to wait just a little while to see if anybody else has an opinion on this.

EDIT: Before your last repair attempt, did you do anything that might have deleted the root account? I just checked UbuntuForums and found an entry where somebody got this error after deleting the root account (as linuxlover.chaitanya suggested). But accounts shouldn't just magically disappear!

Reference: http://ubuntuforums.org/archive/index.php/t-3575.html

Last edited by blackhole54; 05-26-2008 at 02:17 AM.
 
Old 05-26-2008, 02:18 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I went on Google with the terms 'Ubuntu "I have no name!"'. There are a large number of posts and they seem to be caused after many different changes but a common theme is that the permissions of one file or another doesn't allow reading. At first glance the "I have no name!" looked suspicious as well but apparently it isn't evidence of being compromised.

You may want to check your logs and see what errors are noted there. Also check the permissions of your /etc/passwd, /etc/shadow, /etc/group & /etc/hosts.
 
Old 05-26-2008, 04:17 AM   #10
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by jschiwal View Post
Also check the permissions of your /etc/passwd, /etc/shadow, /etc/group & /etc/hosts.
I just checked an edgy eft installation:

Code:
-rw-r--r-- 1 root root   1784 2008-04-10 18:54 /etc/passwd
-rw------- 1 root root   1829 2008-04-01 03:37 /etc/passwd-
-rw-r----- 1 root shadow 1193 2008-05-26 00:46 /etc/shadow
-rw------- 1 root root   1220 2008-04-01 03:37 /etc/shadow-
Note that the "dash files" which you moved over have different ownership/permissions than the "non-dash files." If fiesty uses the same scheme then you would need to:

Code:
sudo chmod go+r /etc/passwd
sudo chmod g+r /etc/shadow
sudo chgrp shadow /etc/shadow
Then double check with

Code:
ls -l /etc/passwd* /etc/shadow*
In particular, make sure you do not make /etc/shadow world readable.

BTW, on edgy, making /etc/passwd not world readable does, in fact, produce the symptom you quoted.

Last edited by blackhole54; 05-26-2008 at 10:36 AM. Reason: shadown -> shadow
 
Old 05-26-2008, 04:55 AM   #11
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
Whats :
Code:
sudo chgrp shadown /etc/shadow
Shadown????

ANyway..When I ran rest of commands besides the above chown its running fine.
Thanks Prof.

Last edited by ajeetraina; 05-26-2008 at 04:57 AM.
 
Old 05-26-2008, 10:39 AM   #12
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by ajeetraina View Post
Shadown????
Oops! Must have had a twitching finger or something. I've corrected it in the post. Thanks.
 
Old 05-26-2008, 12:23 PM   #13
mtimbro
Member
 
Registered: Feb 2008
Location: Montreal, Canada
Distribution: RedHat 3/4, Ubuntu 7.10
Posts: 86

Rep: Reputation: 15
Thumbs up

Code:
sudo chgrp shadown /etc/shadow
He owns shadows. What a Linux beast.
 
Old 05-27-2008, 12:14 AM   #14
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by mtimbro View Post
He owns shadows.
Carl Jung tought us that a long time ago! </OT>
 
  


Reply



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
ORPHAN (no passwd entry) markus1982 Linux - General 6 08-19-2010 08:57 AM
Samba failed to modify passwd entry GUIPenguin Linux - General 1 01-17-2005 10:39 AM
odd entry in /etc/passwd file globeTrotter Linux - Security 4 07-21-2004 09:27 PM
/etc/passwd entry secprovider Linux - Security 1 06-25-2004 10:55 AM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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