You are not logged in.
Pages: 1
Hello friends,
I am new to arch but not new to world of gnu/linux. I have installed and used distros from ubuntu to slackware and comfortable at cli.
Now I wanted to try my hands at arch.
I followed arch wiki and installed base system twice on the actual hard disk twice first with archlinux-2015.07.01-dual.iso and then with archlinux-2015.12.01-dual.iso in 64 bit mode and then once in virtualbox with archlinux-2015.12.01-dual.iso.
While i was able to run sudo somehow in virtualbox installation though I did not do anything which I think i missed in physical installs, i fail to get it working on physical disk installs.
Following is the message I get right after installing sudo and running it as non-root user with entry for user in /etc/sudoers and even as root I get the same dump.
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
I have checked /etc/sudoers file's permissions. It is 440.
What am I missing here?
Thanks in advance.
Offline
To be sure: you have installed the "sudo" package ?
I have followed https://wiki.archlinux.org/index.php/Sudo - and it works.
Offline
It's not possible to get these errors from sudo without having it installed.
The only thing I can remember I did different in VirtualBox install was there i installed only the base package not base-devel which installs sudo by itself.
Something to do with that (although it must not matter)?
Offline
What are the permissions for / and /etc?
Offline
What are the permissions for / and /etc?
And the sudo executable?
Offline
The permissions for / is 700 and it is not getting changed with 'chmod 755 /' as root. What can I do? Btw sudo is executable.
Offline
The permissions for / is 700 and it is not getting changed with 'chmod 755 /' as root. What can I do? Btw sudo is executable.
Is the SUID bit set? It should be.
ewaller@turing ~ 1018 %ls -ln $(which sudo)
-rwsr-xr-x 1 0 0 126160 Nov 2 23:01 /usr/bin/sudoNothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
@OP - What if you simply reinstall the sudo package?
Offline
Not an Installation issue, moving to NC...
Offline
The permissions for / is 700 and it is not getting changed with 'chmod 755 /' as root. What can I do? Btw sudo is executable.
What filesystem is /?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
i changed the permission, added myself to sudoers and changed the permission back.
ezik
Offline
i changed the permission, added myself to sudoers and changed the permission back.
ezik
Wrong thread?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
why?
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
ezik
Offline
Please paste the output of
ls -ld $(which sudo) / /etc /etc/sudoers
The output for the above is as under
drwx------ 18 755 root 4096 Dec 28 20:24 /
drwxr-xr-x 39 755 root 4096 Dec 27 15:35 /etc
-r--r----- 1 755 root 3174 Nov 3 12:31 /etc/sudoers
-rwxr-xr-x 1 755 root 126160 Nov 3 12:31 /usr/bin/sudo
Btw I have tried reinstalling already before i posted the issue here but in vain.
Offline
This would answer ewaller's question about the SUID being set, then. Have you tried setting it (as root)?
chmod u+s /usr/bin/sudoAlthough... it's weird that a re-installation of sudo wouldn't fix the permissions on the sudo executable.
(if setting SUIDs doesn't work, then an answer to WorMzy's question would be helpful)
WAIT, WAIT, WAAAAAIT. Did you chown instead of chmod? The owner of the files seems to be 755.
Something, somewhere has gone terribly wrong.
Last edited by ayekat (2015-12-28 15:18:16)
Offline
This would answer ewaller's question about the SUID being set, then. Have you tried setting it (as root)?chmod u+s /usr/bin/sudo
Although... it's weird that a re-installation of sudo wouldn't fix the permissions on the sudo executable.
(if setting SUIDs doesn't work, then an answer to WorMzy's question would be helpful)WAIT, WAIT, WAAAAAIT. Did you chown instead of chmod? The owner of the files seems to be 755.
Something, somewhere has gone terribly wrong.
My situation can be summed up possibly as FUBAR. ![]()
I had run chown recursively on /
My only way out seems fresh base install.
Btw I am able to run sudo now.
But having run chown -R root:root / and chmod - R 0755 / nothing perhaps can salvage this installation now.
Offline
My situation can be summed up possibly as FUBAR.
I had run chown recursively on /
My only way out seems fresh base install.Btw I am able to run sudo now.
But having run chown -R root:root / and chmod - R 0755 / nothing perhaps can salvage this installation now.
Isn't it right that I would be so much better off with a new install rather than try to fix this esp. with so may folders' and files' ownership and permissions that would be needed to be rectified?
Offline
But having run chown -R root:root / and chmod - R 0755 / nothing perhaps can salvage this installation now.
I guess you've learned a lesson here: Never recursively do anything in /. ![]()
And yes, I'd say fingering around on that system any longer might be considered necrophilia at best.
Offline
Thank you all for your help. Going to reinstall base.
Offline
Pages: 1