This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problem: edit of sudoers with visudo doesn't work

Tags: None
(comma "," separated)
wotan
Registered Member
Posts
131
Karma
-2
OS
Hey
I wanted to get able to shutdown the computer without having to enter my password
so i entered this in /etc/sudoers.de using visudo like on this tutorial http://ubuntuforums.org/showthread.php?t=1132821
Code: Select all
max ALL=(ALL) NOPASSWD:/sbin/shutdown

However I still need to enter my password... Anyone an idea why?
User avatar
google01103
Manager
Posts
6668
Karma
25
how do call the shutdown command? should be sudo shutdown not shutdown

what is result of command sudo -l ?


OpenSuse Leap 42.1 x64, Plasma 5.x

wotan
Registered Member
Posts
131
Karma
-2
OS
Oh okay that works now. I thought that I do not anymore have to write sudo before it since i don't need the password anymore.
I effectively have :
Code: Select all
max@ubuntu:~$ sudo -l
Matching Defaults entries for max on this host:
    env_reset

User max may run the following commands on this host:
    (ALL) ALL
    (ALL) NOPASSWD: /sbin/shutdown
User avatar
Wizard
Registered Member
Posts
99
Karma
0
OS
Maybe this will clarify what sudo and su are and how they should be used:
https://wiki.ubuntu.com/RootSudo


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]