Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #247815 > unrolled thread
| Started by | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| First post | 2022-05-02 17:40 +0200 |
| Last post | 2022-05-04 16:00 +0200 |
| Articles | 11 — 10 participants |
Back to article view | Back to linux.debian.user
Odd reproducible problem - but is it a bug? Richard Owlett <rowlett@cloud85.net> - 2022-05-02 17:40 +0200
Re: Odd reproducible problem - but is it a bug? Lucio Crusca <lucio@sulweb.org> - 2022-05-02 17:50 +0200
Re: Odd reproducible problem - but is it a bug? "Andrew M.A. Cater" <amacater@einval.com> - 2022-05-02 17:50 +0200
Re: Odd reproducible problem - but is it a bug? Greg Wooledge <greg@wooledge.org> - 2022-05-02 18:00 +0200
Re: Odd reproducible problem - but is it a bug? Michael Lange <klappnase@freenet.de> - 2022-05-02 20:00 +0200
Re: Odd reproducible problem - but is it a bug? <tomas@tuxteam.de> - 2022-05-02 20:20 +0200
Re: Odd reproducible problem - but is it a bug? Anders Andersson <pipatron@gmail.com> - 2022-05-04 05:30 +0200
Re: Odd reproducible problem - but is it a bug? tomas@tuxteam.de - 2022-05-04 07:40 +0200
Re: Odd reproducible problem - but is it a bug? Charles Curley <charlescurley@charlescurley.com> - 2022-05-04 15:10 +0200
Re: Odd reproducible problem - but is it a bug? Greg Wooledge <greg@wooledge.org> - 2022-05-04 15:40 +0200
Re: Odd reproducible problem - but is it a bug? Nicolas George <george@nsup.org> - 2022-05-04 16:00 +0200
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2022-05-02 17:40 +0200 |
| Subject | Odd reproducible problem - but is it a bug? |
| Message-ID | <EiGjw-cIS9-5@gated-at.bofh.it> |
I'm using Debian 10.7 with MATE DE [will be updated later this week]
The machine is a Lenovo T510 and is setup to login as either "richard"
or "root".
If logged in as "richard" I can execute su {+ password} and receive a
prompt indicating I'm "root".
However if I then enter "update-grub", the response is
"bash: update-grub: command not found"
as if I were the unprivileged user "richard".
All is normal if I had initially been "root" or had become "root" via
System -> Log Out richard .
Bug?
[toc] | [next] | [standalone]
| From | Lucio Crusca <lucio@sulweb.org> |
|---|---|
| Date | 2022-05-02 17:50 +0200 |
| Message-ID | <EiGtb-cIVC-13@gated-at.bofh.it> |
| In reply to | #247815 |
Il 02/05/22 17:17, Richard Owlett ha scritto:
> If logged in as "richard" I can execute su {+ password} and receive a
> prompt indicating I'm "root".
>
> "bash: update-grub: command not found"
>
> Bug?
>
No, it's only an effect of the PATH variable. Try "su -".
[toc] | [prev] | [next] | [standalone]
| From | "Andrew M.A. Cater" <amacater@einval.com> |
|---|---|
| Date | 2022-05-02 17:50 +0200 |
| Message-ID | <EiGtb-cIVC-5@gated-at.bofh.it> |
| In reply to | #247815 |
On Mon, May 02, 2022 at 10:17:06AM -0500, Richard Owlett wrote:
> I'm using Debian 10.7 with MATE DE [will be updated later this week]
> The machine is a Lenovo T510 and is setup to login as either "richard" or
> "root".
>
> If logged in as "richard" I can execute su {+ password} and receive a prompt
> indicating I'm "root".
>
> However if I then enter "update-grub", the response is
> "bash: update-grub: command not found"
> as if I were the unprivileged user "richard".
>
> All is normal if I had initially been "root" or had become "root" via
> System -> Log Out richard .
>
> Bug?
>
>
Hi Richard,
Not bug - feature. See also su -
It's in the release notes, I'm fairly sure.
All the very best, as ever,
Andy Cater
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2022-05-02 18:00 +0200 |
| Message-ID | <EiGCR-cIYO-1@gated-at.bofh.it> |
| In reply to | #247818 |
On Mon, May 02, 2022 at 03:43:41PM +0000, Andrew M.A. Cater wrote: > Not bug - feature. I disagree. Strongly. It is a CHANGE, but it is not a feature. > See also su - > > It's in the release notes, I'm fairly sure. It's also at <https://wiki.debian.org/NewInBuster#Changes>. It has also been discussed to death and beyond on this mailing list. Literally dozens, if not hundreds, of message have been posted about it over the last couple years. The fact that the OP never read any of them somehow fails to surprise me. (Almost as much as the Debian maintainers refusing to ship a one-line /etc/default/su file to fix the behavior of su fails to surprise me at this point. Fortunately, we can create that file ourselves and get things back to normal.)
[toc] | [prev] | [next] | [standalone]
| From | Michael Lange <klappnase@freenet.de> |
|---|---|
| Date | 2022-05-02 20:00 +0200 |
| Message-ID | <EiIuZ-cKcg-5@gated-at.bofh.it> |
| In reply to | #247815 |
Hi,
On Mon, 2 May 2022 10:17:06 -0500
Richard Owlett <rowlett@cloud85.net> wrote:
> I'm using Debian 10.7 with MATE DE [will be updated later this week]
> The machine is a Lenovo T510 and is setup to login as either "richard"
> or "root".
>
> If logged in as "richard" I can execute su {+ password} and receive a
> prompt indicating I'm "root".
>
> However if I then enter "update-grub", the response is
> "bash: update-grub: command not found"
> as if I were the unprivileged user "richard".
you need to do
# su -
(instead of just
# su
),
otherwise $PATH will be inherited from user "richard" and thus lack the
entry "/sbin".
Have a nice day,
Michael
.-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-.
Ahead warp factor one, Mr. Sulu.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2022-05-02 20:20 +0200 |
| Message-ID | <EiIOl-cKyg-3@gated-at.bofh.it> |
| In reply to | #247823 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, May 02, 2022 at 07:58:12PM +0200, Michael Lange wrote:
> Hi,
>
> On Mon, 2 May 2022 10:17:06 -0500
> Richard Owlett <rowlett@cloud85.net> wrote:
>
> > I'm using Debian 10.7 with MATE DE [will be updated later this week]
> > The machine is a Lenovo T510 and is setup to login as either "richard"
> > or "root".
> >
> > If logged in as "richard" I can execute su {+ password} and receive a
> > prompt indicating I'm "root".
> >
> > However if I then enter "update-grub", the response is
> > "bash: update-grub: command not found"
> > as if I were the unprivileged user "richard".
>
> you need to do
>
> # su -
>
> (instead of just
>
> # su
> ),
> otherwise $PATH will be inherited from user "richard" and thus lack the
> entry "/sbin".
Or just get used to say "/sbin/update-grub" ;-)
(No, I'm not really being serious here. But half-acquiring this
habit would have helped you to unravel the problem like in "Ah,
I have the permissions but not the $PATH..."
It's no different from the TVs of yore: is it the driver stage
to the high voltage, or did just the capacitor short? What can
I do to tell apart those two?
Cheers
--
t
[toc] | [prev] | [next] | [standalone]
| From | Anders Andersson <pipatron@gmail.com> |
|---|---|
| Date | 2022-05-04 05:30 +0200 |
| Message-ID | <EjdS9-d4n7-1@gated-at.bofh.it> |
| In reply to | #247824 |
On Mon, May 2, 2022 at 8:19 PM <tomas@tuxteam.de> wrote:
> On Mon, May 02, 2022 at 07:58:12PM +0200, Michael Lange wrote:
> > On Mon, 2 May 2022 10:17:06 -0500
> > Richard Owlett <rowlett@cloud85.net> wrote:
> > > I'm using Debian 10.7 with MATE DE [will be updated later this week]
> > > The machine is a Lenovo T510 and is setup to login as either "richard"
> > > or "root".
> > >
> > > If logged in as "richard" I can execute su {+ password} and receive a
> > > prompt indicating I'm "root".
> > >
> > > However if I then enter "update-grub", the response is
> > > "bash: update-grub: command not found"
> > > as if I were the unprivileged user "richard".
> >
> > you need to do
> >
> > # su -
> >
> > (instead of just
> >
> > # su
> > ),
> > otherwise $PATH will be inherited from user "richard" and thus lack the
> > entry "/sbin".
>
> Or just get used to say "/sbin/update-grub" ;-)
>
> (No, I'm not really being serious here. But half-acquiring this
> habit would have helped you to unravel the problem like in "Ah,
> I have the permissions but not the $PATH..."
On this note, I've always found it annoying that debian (and likely
others) don't put /sbin in the normal user's $PATH. A lot of the tools
there have uses other than modifying the system.
[toc] | [prev] | [next] | [standalone]
| From | tomas@tuxteam.de |
|---|---|
| Date | 2022-05-04 07:40 +0200 |
| Message-ID | <EjfTX-d5JH-3@gated-at.bofh.it> |
| In reply to | #247882 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, May 04, 2022 at 05:23:31AM +0200, Anders Andersson wrote: [on sbin] > On this note, I've always found it annoying that debian (and likely > others) don't put /sbin in the normal user's $PATH. A lot of the tools > there have uses other than modifying the system. I've grown accustomed to that. For example, `ifconfig' is just named `/sbin/ifconfig'. That said, the pattern seems to be dying out. Ifconfig's new and all-shiny cousin, ip, already is lodged in /bin, so there you go. My muscle memory has adapted. I don't think you can convince others to follow along, so you're better off "enhancing", e.g. your /etc/profile. That's what it's for, after all :-) Cheers -- t
[toc] | [prev] | [next] | [standalone]
| From | Charles Curley <charlescurley@charlescurley.com> |
|---|---|
| Date | 2022-05-04 15:10 +0200 |
| Message-ID | <EjmVr-dasx-3@gated-at.bofh.it> |
| In reply to | #247882 |
On Wed, 4 May 2022 05:23:31 +0200 Anders Andersson <pipatron@gmail.com> wrote: > On this note, I've always found it annoying that debian (and likely > others) don't put /sbin in the normal user's $PATH. A lot of the tools > there have uses other than modifying the system. It can be annoying, but for good reason. In a multi-user system (such as Unix), it is a good security precaution to reserve programs that can modify or even inform the user about the state of the system to trusted users, such as root or wheel. Hence regular programs for regular users go into directories called bin, and system programs go into directories called sbin, and paths are set accordingly. Even on a single user system the distinction is worth retaining. If nothing else, one occasionally needs a reminder to be careful with certain programs lest one shoot oneself in the foot. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2022-05-04 15:40 +0200 |
| Message-ID | <Ejnot-daC4-7@gated-at.bofh.it> |
| In reply to | #247893 |
On Wed, May 04, 2022 at 07:04:52AM -0600, Charles Curley wrote: > On Wed, 4 May 2022 05:23:31 +0200 > Anders Andersson <pipatron@gmail.com> wrote: > > > On this note, I've always found it annoying that debian (and likely > > others) don't put /sbin in the normal user's $PATH. A lot of the tools > > there have uses other than modifying the system. > > It can be annoying, but for good reason. In a multi-user system (such > as Unix), it is a good security precaution to reserve programs that can > modify or even inform the user about the state of the system to trusted > users, such as root or wheel. Hence regular programs for regular users > go into directories called bin, and system programs go into directories > called sbin, and paths are set accordingly. That is the most ludicrous thing I've heard in... a long time. If a command can reveal sensitive information to an unprivileged user, then "hiding" it in /sbin is not a valid security measure. The smart user will simply run /sbin/whatever, or change their PATH variable to include /sbin. Of course, your assertion that any command *could* reveal such sensitive information is laughable. Programs can only do the things allowed by their privileges. If joe tries to read the /etc/shadow file, he can't do it, because he doesn't have the correct privileges. None of the commands in /sbin are going to be able to do it either, because they run *as joe*. (Obviously, setuid or setgid programs could exist which run with elevated privileges. Those have to be written correctly. If one of them has a security hole, just hiding it in /sbin *does not count* as a security improvement on your system.) > Even on a single user system the distinction is worth retaining. If > nothing else, one occasionally needs a reminder to be careful with > certain programs lest one shoot oneself in the foot. There are several reasons why /sbin exists, historically. On some systems, the programs in /sbin are *statically linked*. That's what the 's' actually stands for -- not 's'ecure, not 's'uperuser, but 's'tatic. They're needed during boot, at a time when the file system which contains the shared libraries used by commands in /bin may not be mounted yet. HP-UX is one such system. /bin is a symlink to /usr/bin, and there are both /usr/bin/cat and /sbin/cat commands. Shell scripts which must run during the early stages of boot can use /sbin/cat (along with redirections) to copy files, or display simple messages. On most other systems, the programs in /sbin are not statically linked, but are placed there for other reasons. One reason is simply that these programs don't *do* anything useful or helpful for ordinary users. They may not even run at all. Another reason is to reduce the size of the /usr/bin and /bin directories, for performance. It's a tiny gain, but over years of operation, it could add up to something noticeable. The main reason is "because that's where it has always been". This is both for user expectations, and for backward compatibility in case some idiot hard-coded /sbin/ifconfig in a shell script. Keeping the commands in their historic locations will prevent a few badly-written scripts from breaking.
[toc] | [prev] | [next] | [standalone]
| From | Nicolas George <george@nsup.org> |
|---|---|
| Date | 2022-05-04 16:00 +0200 |
| Message-ID | <EjnHP-daPI-5@gated-at.bofh.it> |
| In reply to | #247882 |
[Multipart message — attachments visible in raw view] — view raw
Anders Andersson (12022-05-04): > On this note, I've always found it annoying that debian (and likely > others) don't put /sbin in the normal user's $PATH. A lot of the tools > there have uses other than modifying the system. I have to unpack Zip files rather often, I use unzip in command-line. It has become an automatism: “unz<tab><space>/tmp/...<tab>”. Recently, initrd-tools complained that zstd was not installed, so I installed it. The next time I had a Zip file to unpack, I typed “unz<tab>” and was confused that it did not work: “unz<tab>” had become ambiguous between “unzip(sfx)” and “unzstd”. Every program in the search path clutters the namespace and makes the shell completion less efficient. When a program is useful for a normal user once every 36th of the month, I would rather not have it in the default search path: typing “/sb<tab>” then is cheap enough for the benefit of gaining a few keystrokes for commands I use many times a day. YMMV. Regards, -- Nicolas George
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web