Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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
(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!
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.