You are not logged in.

#26 2009-08-04 16:47:12

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Can't shutdown as user

Perhaps time to revisit http://wiki.archlinux.org/index.php/Sudo

fwiw, here my output:

toad@archtop 985\3 /home/toad > sudo -l
User toad may run the following commands on this host:
    (ALL) ALL
    (root) NOPASSWD: /usr/sbin/pm-hibernate
    (root) NOPASSWD: /usr/sbin/pm-suspend
    (ALL) ALL

BTW, I use the wheel group - as in here
http://wiki.archlinux.org/index.php/Beg … tup_groups


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#27 2009-08-04 18:01:03

t4k1t
Member
Registered: 2009-07-19
Posts: 123

Re: Can't shutdown as user

For one thing I ran it as user not as root, but when I run it as root it gives me the same output.
When the lower-case L would look like capital I it would make no difference, 'cause I still type a lower-case L, but I also tried upper-/lower-case I and upper-/lower-case L, the interesting thing is, because they are not assigned I get

sudo -I
sudo: Ungültige Option -- I
usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-p prompt]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U username] [-u
            username|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
            username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
            username|#uid] file ...

but when I type it with lower-case L
I only get

sudo -l
usage: sudo -h | -K | -k | -L | -V
usage: sudo -v [-AknS] [-p prompt]
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U username] [-u
            username|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
            username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
            username|#uid] file ...

Btw I don't know how the wiki-page on sudo should help me here.
I followed it when I installed sudo...

Edit
with wheel it won't work either...

Last edited by t4k1t (2009-08-04 18:04:11)


Who we are is but a stepping stone to what we can become.

Offline

#28 2009-08-04 19:15:50

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Can't shutdown as user

Really weird. Only thing remaining I can think of is either your sudoers file or sudo as a whole got somehow corrupted. Or there are some stale files interfering.

Did you ever try reinstall sudo? Are the system authentification setting still ok? Did you check /etc/pam.d/sudo?


To know or not to know ...
... the questions remain forever.

Offline

#29 2009-08-10 15:33:46

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: Can't shutdown as user

i had the same problem on a machine, where i had the alias 'sudo -E' in the .-bshrc. after kicking that out it worked.

Offline

#30 2009-08-10 15:45:11

ugkbunb
Member
Registered: 2009-02-26
Posts: 227

Re: Can't shutdown as user

weird I have tried every solution posted in this thread as well as the solutions posted in the policykit thread... I still for some unknown reason can not shutdown or reboot as w/o being a superuser.

Offline

#31 2011-01-22 09:00:23

teMplaryum
Member
From: Serbia
Registered: 2007-09-11
Posts: 30
Website

Re: Can't shutdown as user

If someone's still interested in this, try running sudo as:

$ /usr/bin/sudo

I had sudo alias defined in my .bashrc which called sudo -E, think that was the problem which gave me you are not allowed to preserve the environment errors.
Command listing also works with /usr/bin/sudo -l.


Online at:
Twit | Facebook | Blog

Registered Linux user #469726

Offline

Board footer

Powered by FluxBB