LMDE update: problem with sudo.

Archived topics about LMDE 1 and LMDE 2
Locked
rayandrews

LMDE update: problem with sudo.

Post by rayandrews »

All,

Got my 1177 packages upgrade more or less working. So far only one thing seems broken: it seems that when I sudo, I'm not getting access to my root path like I used to. My sudoers file is unchanged:
#

Code: Select all

# This file MUST be edited with the 'visudo' command as root.
#
Defaults	env_reset, timestamp_timeout=100

root	ALL=(ALL:ALL) ALL
ray	ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

When I:
"sudo echo $PATH"
I see my normal users path, not root's path as I think I should. Because almost the whole system was upgraded, it's hard to know where to start looking. I use zsh, but had the same problem with bash.
I can do anything I need to by su-ing to root, so I'm not stuck, but I'd sure like sudo working again. Perhaps one of those scripts that is overwritten has something to do with it?

Thanks guys.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
squeezy

Re: LMDE update: problem with sudo.

Post by squeezy »

Check to see that you're in the sudo group.
craigevil

Re: LMDE update: problem with sudo.

Post by craigevil »

my /etc/sudoers

Code: Select all

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
$ groups
craig lp cdrom floppy sudo audio dip video plugdev users netdev lpadmin powerdev scanner debian-tor

Make sure you have the Default lines in your sudoers file.
rayandrews

Re: LMDE update: problem with sudo.

Post by rayandrews »

Gentlemen:

I am In the sudo group. I added this line:

Code: Select all

#
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
... and now Synaptic works (it was the busted thing that brought this problem to my attention), but 'sudo echo $PATH' still shows my 'user' path. Dunno, maybe that's a red herring. Synaptic is fine, and so I guess that's all I need to worry about.
Locked

Return to “LMDE Archive”