Discussion:
SUDO always requires password 11.4
(too old to reply)
James Knott
2011-07-18 16:54:25 UTC
Permalink
I have a directory /local/usr/bin/sudo, which I use to hold scripts that
would normally require root privileges, but I want to start as a user,
usually via the menu. I have used visudo to edit the sudo file in the
same way as an 11.0 system, where this works as expected. However, I
can't seem to get this to work without being asked for the root
password. I have added "jknott ALL = NOPASSWD: /usr/local/bin/sudo/*",
which is supposed to enable running items in that directory without
requiring a root password. Is there some difference between 11.0 (and
earlier) and 11.4 that might cause this problem?

tnx jk
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
Tejas Guruswamy
2011-07-18 18:21:14 UTC
Permalink
Post by James Knott
I have a directory /local/usr/bin/sudo, which I use to hold scripts
that would normally require root privileges, but I want to start as a
user, usually via the menu. I have used visudo to edit the sudo file
in the same way as an 11.0 system, where this works as expected.
However, I can't seem to get this to work without being asked for the
/usr/local/bin/sudo/*", which is supposed to enable running items in
that directory without requiring a root password. Is there some
difference between 11.0 (and earlier) and 11.4 that might cause this
problem?
tnx jk
I presume you remembered to comment out 'defaults targetpw'.
Check the output of 'sudo -l' for what privileges sudo thinks you should
have.

Regards,
Tejas
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
James Knott
2011-07-18 20:26:53 UTC
Permalink
Post by Tejas Guruswamy
Post by James Knott
I have a directory /local/usr/bin/sudo, which I use to hold scripts
that would normally require root privileges, but I want to start as a
user, usually via the menu. I have used visudo to edit the sudo file
in the same way as an 11.0 system, where this works as expected.
However, I can't seem to get this to work without being asked for the
/usr/local/bin/sudo/*", which is supposed to enable running items in
that directory without requiring a root password. Is there some
difference between 11.0 (and earlier) and 11.4 that might cause this
problem?
tnx jk
I presume you remembered to comment out 'defaults targetpw'.
Check the output of 'sudo -l' for what privileges sudo thinks you
should have.
Yes, I have tried that, both with and without the following line rem'd
out. When I do that, it now asks for my user password and then, after I
enter it, I get an error stating that I don't have permission.

***@t43:~> sudo -l
Matching Defaults entries for jknott on this host:
always_set_home, env_reset, env_keep="LANG LC_ADDRESS LC_CTYPE
LC_COLLATE
LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME
LC_NUMERIC
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS
XDG_SESSION_COOKIE"

User jknott may run the following commands on this host:
(ALL) ALL
(root) NOPASSWD: /usr/local/bin/sudo/*
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
James Knott
2011-07-18 20:38:19 UTC
Permalink
Dumb, Dumb, DUMB!!!

I just realized the problem. I have /local/usr reversed in the path.
It worked on the old system because I had a symlink from /usr/local to
/local/usr, but not on the new system.


BTW, it works without that line rem'd out in both old and new systems.
Post by James Knott
Post by Tejas Guruswamy
Post by James Knott
I have a directory /local/usr/bin/sudo, which I use to hold scripts
that would normally require root privileges, but I want to start as
a user, usually via the menu. I have used visudo to edit the sudo
file in the same way as an 11.0 system, where this works as
expected. However, I can't seem to get this to work without being
/usr/local/bin/sudo/*", which is supposed to enable running items in
that directory without requiring a root password. Is there some
difference between 11.0 (and earlier) and 11.4 that might cause this
problem?
tnx jk
I presume you remembered to comment out 'defaults targetpw'.
Check the output of 'sudo -l' for what privileges sudo thinks you
should have.
Yes, I have tried that, both with and without the following line rem'd
out. When I do that, it now asks for my user password and then, after
I enter it, I get an error stating that I don't have permission.
always_set_home, env_reset, env_keep="LANG LC_ADDRESS LC_CTYPE
LC_COLLATE
LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME
LC_NUMERIC
LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS
XDG_SESSION_COOKIE"
(ALL) ALL
(root) NOPASSWD: /usr/local/bin/sudo/*
--
To unsubscribe, e-mail: opensuse+***@opensuse.org
For additional commands, e-mail: opensuse+***@opensuse.org
Loading...