Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

New Debian 10 install but no sudo and no /usr/sbin in path

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
jbruyet
Posts: 10
Joined: 2011-03-29 03:27

New Debian 10 install but no sudo and no /usr/sbin in path

#1 Post by jbruyet »

Hey all, I just did an install of Buster and there are some configuration tweaks that need to be done. First, when I run sudo I get a "bash: sudo: command not found" error. While creating an MDADM array I learned that /usr/sbin ins't in the path. I'm starting to get a little concerned because I need this server for backing up files. What else could be wrong?

During the install everything went smooth. I did find one Google hit about Buster not including /usr/sbin in the root environment but that just sounds wrong. Should I keep going or rebuild the server?

Thanks,

Joe B

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: New Debian 10 install but no sudo and no /usr/sbin in pa

#2 Post by stevepusser »

You don't get sudo if you don't enable it in the install. It's disabled if you create a root password, but there are myriads of posts here about the same issue, along with the simple way to enable sudo after the install.

With Buster, you must now type "su -" to become the root user with /sbin in the path. This is in the Buster release notes...
MX Linux packager and developer

jbruyet
Posts: 10
Joined: 2011-03-29 03:27

Re: New Debian 10 install but no sudo and no /usr/sbin in pa

#3 Post by jbruyet »

Thanks StevePusser, that worked.

Sigh, I Googled this but didn't even think to search here on the forum.

Thanks,

Joe B

MagicPoulp
Posts: 431
Joined: 2018-11-05 21:30

Re: New Debian 10 install but no sudo and no /usr/sbin in pa

#4 Post by MagicPoulp »

and you need to add the group sudo to your user.
adduser homer_simpson sudo

replace homer_simpson with your user.

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: New Debian 10 install but no sudo and no /usr/sbin in pa

#5 Post by pendrachken »

I haven't tried it, since I just compiled the source of the shadow package, but supposedly you can set a var in a conf file to get the old behavior back

Code: Select all

ALWAYS_SET_PATH yes


in /etc/login.defs


Also, if this is on a single user machine, and you are willing to accept security risks, you can always just copy the ENV_SUPATH which is the standard path containing /sbin and friends to ENV_PATH. This will make any user change with su have the full path containing /sbin et al. though.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

Post Reply