You are not logged in.
Pages: 1
i have installed arch linux with gnome desktop. there are some problem with root permission.
1- i can not use "su" or "sudo" commands. here is what i tested:
[hadian@cfd ~]$ sudo su
sudo: effective uid is not 0, is sudo installed setuid root?
[hadian@cfd ~]$ cat /etc/hostname
cfd
[hadian@cfd ~]$ cat /etc/passwd | head -n 1
root:x:0:0:root:/root:/bin/bash
[hadian@cfd ~]$ ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 127560 Jun 14 08:58 /usr/bin/sudo
[hadian@cfd ~]$ ls -l /bin/su
-rwsr-xr-x 1 root root 26412 Jul 31 13:16 /bin/su
[hadian@cfd ~]$ su -
Password:
su: Authentication failure2- when i want to mount an ntfs partition by clicling on partition name in nautilus i get an error message that says: "Incorrect permission on /usr/lib/polkit-1polkit-agent-helper-1 (needs to be setuid root)"
Last edited by hadian (2013-10-02 09:57:44)
Offline
Look at this page: https://wiki.archlinux.org/index.php/Sudo
There you can see that you have to add the user in some way to the sudoers file. My suggestion is to add you to the wheel group and add the wheel group to the sudoers file.
Offline
i added wheel group to sudoers after logging as root.
[root@cfd ~]# tail -n 17 /etc/sudoers
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL
## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw # Ask for the password of the target user
# ALL ALL=(ALL) ALL # WARNING: only use this together with 'Defaults targetpw'
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.dmy user was a member of wheel. here is the result after a system reboot:
[hadian@cfd ~]$ pacman -Q | grep sudo
sudo 1.8.7-1
[hadian@cfd ~]$ groups hadian
lp wheel network video audio storage users
[hadian@cfd ~]$ su -
Password:
su: Authentication failure
[hadian@cfd ~]$ sudo ls
sudo: effective uid is not 0, is sudo installed setuid root?Offline
$ pacman -Q | grep sudo sudo 1.8.7-1
No need for grep:
$ pacman -Q sudo
sudo 1.8.7-1What's your shell? Check if you've set it the same way as it's specified in /etc/shells https://mailman.archlinux.org/pipermail … 33740.html
Offline
it is bash. here is the /etc/shels file:
#
# /etc/shells
#
/bin/sh
/bin/bash
# End of fileOffline
Check the ownership of your sudo executable. Found two articles about it, one here:
https://bbs.archlinux.org/viewtopic.php?id=161534
Offline
Check the ownership of your sudo executable. Found two articles about it, one here:
https://bbs.archlinux.org/viewtopic.php?id=161534
actually that page was my reference and as you see in my post, i used exactly the commands mentioned in it. Today i used the suggestion in thatpage that was
pacman -S `pacman -Qq` --asdeps --force and nothing changed.
for checking the ownership of sudo: do you mean something more than what i did in my post? as you see it is:
[hadian@cfd ~]$ ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 127560 Jun 14 08:58 /usr/bin/sudoi am confusing since i did not copy the files as it was done in that reference. so why this problem happened?
any idea?
Offline
you can not access su?
is it posible to change the pass in a chroot environment?
Last edited by bleach (2013-08-14 06:33:58)
Offline
no i can not use su command but i can login as root.
would you please let me know how i can change the pass in chroot environment?
Offline
scratch that chroot.
if you can not su it is more than sudo and if you can root(sorry i missed that you used that) it is not the password.
I dont have an answer for you.
Offline
What I did was follow the sudo arch wiki here is the command you can use
VISUAL="/usr/bin/vim -p -X" visudo
All you need to do is add this line of code
user ALL=(ALL) ALL
replace user with your username. You can look at this page for more detail.
https://wiki.archlinux.org/index.php/Sudo
Last edited by spyrocete (2013-08-14 09:40:26)
Offline
i did it but nothing changed.
since i can not use "su -" command, i think the problem is not related to sudo. i can not find why "su -" does not work.
Offline
Could it be that you have mounted your filesystem with the nosuid flag? Happend to me right now, of course it doesn't work then.
Offline
Could it be that you have mounted your filesystem with the nosuid flag? Happend to me right now, of course it doesn't work then.
This.
What does
mountgive?
Please post fstab.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda10
UUID=c918711b-b6bf-4b92-b392-c5fd982f4f38 / ext4 rw,nosuid,nodev,relatime,data=ordered 0 1
# /dev/sda4 LABEL=swap
UUID=f58d35a2-8319-4e65-ab3f-07be590512e8 swap swap defaults 0 0Offline
mortbauer nailed it, nosuid
Offline
Offline
thanks. i deleted "nosuid,nodev" from line related to root partition and now it works fine!
Offline
Pages: 1