The officially official Devuan Forum!

You are not logged in.

#1 2020-06-08 12:12:34

devian
Member
Registered: 2019-11-08
Posts: 29  

sbin PATH problems on Beowulf [SOLVED]

I just upgraded to Beowulf and found that /sbin is not on the system path for root.

This is surely a bug?

It means you cannot run fdisk etc.

Last edited by devian (2020-06-08 12:21:32)

Offline

#2 2020-06-08 12:18:18

rolfie
Member
Registered: 2017-11-25
Posts: 1,046  

Re: sbin PATH problems on Beowulf [SOLVED]

Refer to the "Changes in su"  in the release notes: https://files.devuan.org/devuan_beowulf … _notes.txt

rolfie

Offline

#3 2020-06-08 12:21:06

devian
Member
Registered: 2019-11-08
Posts: 29  

Re: sbin PATH problems on Beowulf [SOLVED]

Ah, my bad. Thank you. :-)

Offline

#4 2020-09-04 15:26:21

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: sbin PATH problems on Beowulf [SOLVED]

Hello:

altoid wrote:

Would have been mine also ... 8⁷ |

I did not have /etc/default/su and generating the file and adding ALWAYS SET PATH  yes did not work.

What did work was ...

root@devuan2:/home/groucho# export PATH=$PATH:~/usr/local/sbin
root@devuan2:/home/groucho# $echo $PATH
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/usr/local/sbin: No such file or directory
root@devuan2:/home/groucho# 

Got it from https://wiki.debian.org/EnvironmentVariables:

--- snip ---
... after doing su, your PATH may not contain directories like /sbin, and many system administration commands will fail. There are several workarounds:
...

Put the system administration directories (/sbin, /usr/sbin, /usr/local/sbin) in your regular account's PATH (see EnvironmentVariables for help with this).

--- snip ---

BTW: whatever the reason for the change in how su works, I hope it is a good/justified one and not another one of Poettering's wet dreams. It is a PITA.

A.

Last edited by Altoid (2020-09-04 16:53:33)

Offline

#5 2020-09-04 18:03:11

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: sbin PATH problems on Beowulf [SOLVED]

Altoid wrote:

I did not have /etc/default/su and generating the file and adding ALWAYS SET PATH  yes did not work.

That seems to be an error in the release notes, ALWAYS_SET_PATH yes should be added to /etc/login.defs.

Or just call su correctly:

su -

^ The - is important wink

Altoid wrote:

whatever the reason for the change in how su works, I hope it is a good/justified one and not another one of Poettering's wet dreams. It is a PITA.

See https://bugs.debian.org/cgi-bin/bugrepo … bug=905409

tl;dr: /bin/su used to be supplied by the login package but it is now supplied by the util-linux package.

And is it really such a PITA to add a - after the command?


Brianna Ghey — Rest In Power

Offline

#6 2020-09-04 18:34:07

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: sbin PATH problems on Beowulf [SOLVED]

Hello:

Head_on_a_Stick wrote:

... seems to be an error ...
... should be added to /etc/login.defs.

I see.

Head_on_a_Stick wrote:

... call su correctly:

su -

^ The - is important.

Of course it is.
su won't work as intended expected without it.

Q:
Why not just get rid of the old su and let the output be command not found?

Now we have sudo, su and su - ...

Thanks for the link.

Head_on_a_Stick wrote:

... a PITA to add a - after the command?

Yes.
I forget to do it because I am very much used to su.
And I don't like sudo although it is convenient if properly used/configured.

Cheers,

A.

Offline

#7 2020-09-04 18:39:06

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: sbin PATH problems on Beowulf [SOLVED]

Altoid wrote:

Why not just get rid of the old su and let the output be command not found?

Because su can be used for things other than obtaining a root shell. Read man su wink


Brianna Ghey — Rest In Power

Offline

#8 2020-09-04 19:40:25

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: sbin PATH problems on Beowulf [SOLVED]

Hello:

Head_on_a_Stick wrote:

Because su can be used for things other ...

I see.

Head_on_a_Stick wrote:

Read man su wink

Yes, my use of su is rather limited to the basics, so I really have quite a bit of reading to do.
That's what you get from arriving to Linuxland late in life.  8^7

Thanks for your input.

Cheers,

A.

Offline

Board footer