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

If none of the more specific forums is the right place to ask

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

Postby jbruyet » 2020-02-28 00:01

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
jbruyet
 
Posts: 10
Joined: 2011-03-29 03:27

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

Postby stevepusser » 2020-02-28 02:42

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...
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Kodi 18.6, Strawberry 0.6.11, Muse 3.1.0, Chromium with va-api, Audacity 2.4.1, Kdenlive 20.04
User avatar
stevepusser
 
Posts: 11685
Joined: 2009-10-06 05:53

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

Postby jbruyet » 2020-02-28 15:23

Thanks StevePusser, that worked.

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

Thanks,

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

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

Postby MagicPoulp » 2020-03-02 08:09

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

replace homer_simpson with your user.
MagicPoulp
 
Posts: 303
Joined: 2018-11-05 21:30

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

Postby pendrachken » 2020-03-02 21:20

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
pendrachken
 
Posts: 1367
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable