1752600 Members
4955 Online
108788 Solutions
New Discussion

Re: problem with root

 
SOLVED
Go to solution
LinneaGeiger
Occasional Visitor

problem with root

I got this problem:

 

 

 

etc $ sudo chmod root:root /etc/sudoers
sudo: /etc/sudoers is owned by uid 1000, should be 0
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

 

 

And I remember running this command:

 

 

sudo chown -R cdrlinux83 /etc/hosts/

 

 

Is it related?

4 REPLIES 4
Steven Schweda
Honored Contributor
Solution

Re: problem with root

> I got this problem:

   On _what_?

      uname -a

> etc $ sudo chmod root:root /etc/sudoers

   "chmod" or "chown"?

> sudo: /etc/sudoers is owned by uid 1000, should be 0

   That seems pretty clear.  If you can't use "sudo" because the owner
is wrong on "/etc/sudoers", then you might need a real "root" login so
that you can set the proper owner(+group(+permissions)) on that file.


> sudo chown -R cdrlinux83 /etc/hosts/
>
> Is it related?

   I don't see how it could be.  But I also don't know why you'd want to
change the owner/group/permissions on "/etc/hosts".  (Or "/etc/hosts/".
Is it a plain file or a directory?)

      ls -ld /etc/hosts

Patrick Wallek
Honored Contributor

Re: problem with root

I agree with Steven.

 

The sudoers file will have to have its ownership changed by logging in as root.  Otherwise, you won't be able to use sudo.

 

Also changing /etc/hosts to be owned by anyone other than root is not good.  /etc/hosts should typically be owned by root and permissions shold be -r--r--r--.

LinneaGeiger
Occasional Visitor

Re: problem with root

Thanks!!

the problem solved!

Steven Schweda
Honored Contributor

Re: problem with root

> the problem solved!

   Perhaps some future reader will be able to squeeze some useful
information from that nearly information-free report, but I doubt it.

   "solved!" _how_?


> /etc/hosts should typically be owned by root and permissions shold be
> -r--r--r--.

   "owned by root" sounds good to me, but, if so, then "-rw-r--r--"
should be just as good.  It's not as if "-r--r--r--" would actually stop
user "root" from doing anything.