You are not logged in.

#1 2013-08-11 09:10:52

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

[SOLVED] problem with permission

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 failure

2- 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

#2 2013-08-11 09:26:18

cellisten
Member
From: Gothenburg
Registered: 2013-08-08
Posts: 30
Website

Re: [SOLVED] problem with permission

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

#3 2013-08-11 09:48:46

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

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.d

my 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

#4 2013-08-11 13:57:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] problem with permission

hadian wrote:
$ pacman -Q | grep sudo
sudo 1.8.7-1

No need for grep:

$ pacman -Q sudo
sudo 1.8.7-1

What'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

#5 2013-08-13 08:26:54

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

it is bash. here is the /etc/shels file:

#
# /etc/shells
#

/bin/sh
/bin/bash

# End of file

Offline

#6 2013-08-13 10:46:08

cellisten
Member
From: Gothenburg
Registered: 2013-08-08
Posts: 30
Website

Re: [SOLVED] problem with permission

Check the ownership of your sudo executable. Found two articles about it, one here:
https://bbs.archlinux.org/viewtopic.php?id=161534

Offline

#7 2013-08-14 06:17:49

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

cellisten wrote:

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/sudo

i am confusing since i did not copy the files as it was done in that reference. so why this problem happened?
any idea?

Offline

#8 2013-08-14 06:33:36

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: [SOLVED] problem with permission

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

#9 2013-08-14 07:06:15

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

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

#10 2013-08-14 07:29:46

bleach
Member
Registered: 2013-07-26
Posts: 264

Re: [SOLVED] problem with permission

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

#11 2013-08-14 09:39:44

spyrocete
Member
Registered: 2013-08-14
Posts: 4

Re: [SOLVED] problem with permission

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

#12 2013-08-14 10:12:19

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

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

#13 2013-09-23 20:34:33

mortbauer
Member
Registered: 2012-08-25
Posts: 15

Re: [SOLVED] problem with permission

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

#14 2013-09-29 21:02:24

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: [SOLVED] problem with permission

mortbauer wrote:

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

mount

give?

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

#15 2013-10-02 06:28:16

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

# 
# /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 0

Offline

#16 2013-10-02 06:43:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] problem with permission

mortbauer nailed it, nosuid

Offline

#17 2013-10-02 09:16:08

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [SOLVED] problem with permission

Offline

#18 2013-10-02 09:57:09

hadian
Member
From: Yazd, Iran
Registered: 2008-09-09
Posts: 74
Website

Re: [SOLVED] problem with permission

thanks. i deleted "nosuid,nodev" from line related to root partition and now it works fine!

Offline

Board footer

Powered by FluxBB