• Root, sudo and installing packages [WAS Re: user is not in the suder's

    From Andrew M.A. Cater@21:1/5 to All on Wed Feb 5 20:30:01 2025
    [Follow-up suggested to the mailing list at debian-user@lists.debian.org]

    On Wed, Feb 05, 2025 at 11:50:44AM -0600, K0LNY ?? wrote:
    Hi Andrew,
    How is Debian different with regard to apparently there not being a problem installing things as root?
    I know that there are issues if some packages are installed with root privileges on other systems.
    Thanks.

    Glenn

    Hi Glenn,

    I'm not quite sure I understand what you mean here. Root can do most things: sudo is effectively allowing an unprivileged user to "become" root for
    a few commands (and a few minutes - there's a time out and then you may
    have to put a password in again).

    Installing a Debian .deb package effectively requires super user powers.

    You should always be careful when installing packages that you know what
    you are installing. Similarly, Debian packages from Debian are preferred
    as easier to deal with within the system if there are no third party
    packages. Packages not produced by Debian and sourced from third parties may create problems.

    See also: https://wiki.debian.org/DontBreakDebian

    If you are not sure of Linux commands and Debian administratin - you
    might try installing the package debian-handbook

    This is a handbook outlining various aspects of system administration on
    a Debian system based round the needs of a fictional factory. The
    standard package provides an html structure in /usr/share/doc/debian-handbook

    Hope this helps,

    Andrew Cater
    (amacater@debian.org)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K0LNY ??@21:1/5 to All on Wed Feb 5 21:40:02 2025
    Hi Andrew,
    Using other distros, like Ubuntu and Raspbian, I would get tired of typing
    sudo in front of everything, so I would just do sudo su and become root for everything, so I wouldn't have to constantly be reminded that as a regular user, I can't do something, and I had been told that installing things as
    root will cause problems.
    I was told that if I install things as root, that another package may not
    have permissions to use something I installed as root.
    Thanks.

    Glenn
    ----- Original Message -----
    From: "Andrew M.A. Cater" <amacater@einval.com>
    To: <debian-accessibility@lists.debian.org>
    Cc: <debian-user@lists.debian.org>
    Sent: Wednesday, February 5, 2025 1:28 PM
    Subject: Root, sudo and installing packages [WAS Re: user is not in the
    suder's file]


    [Follow-up suggested to the mailing list at debian-user@lists.debian.org]

    On Wed, Feb 05, 2025 at 11:50:44AM -0600, K0LNY ?? wrote:
    Hi Andrew,
    How is Debian different with regard to apparently there not being a
    problem
    installing things as root?
    I know that there are issues if some packages are installed with root privileges on other systems.
    Thanks.

    Glenn

    Hi Glenn,

    I'm not quite sure I understand what you mean here. Root can do most things: sudo is effectively allowing an unprivileged user to "become" root for
    a few commands (and a few minutes - there's a time out and then you may
    have to put a password in again).

    Installing a Debian .deb package effectively requires super user powers.

    You should always be careful when installing packages that you know what
    you are installing. Similarly, Debian packages from Debian are preferred
    as easier to deal with within the system if there are no third party
    packages. Packages not produced by Debian and sourced from third parties may create problems.

    See also: https://wiki.debian.org/DontBreakDebian

    If you are not sure of Linux commands and Debian administratin - you
    might try installing the package debian-handbook

    This is a handbook outlining various aspects of system administration on
    a Debian system based round the needs of a fictional factory. The
    standard package provides an html structure in
    /usr/share/doc/debian-handbook

    Hope this helps,

    Andrew Cater
    (amacater@debian.org)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Ritter@21:1/5 to All on Wed Feb 5 22:40:01 2025
    K0LNY ?? wrote:
    Using other distros, like Ubuntu and Raspbian, I would get tired of typing sudo in front of everything, so I would just do sudo su and become root for everything, so I wouldn't have to constantly be reminded that as a regular user, I can't do something, and I had been told that installing things as root will cause problems.
    I was told that if I install things as root, that another package may not have permissions to use something I installed as root.


    Being root means having root privileges active; that can happen from
    several different methods:

    - logging in as root
    - running su
    - running sudo
    - running doas
    - booting the system and interrupting the boot in a particular
    way

    In all cases, you then have root privileges, either for the length of
    a session or for one command. Installing OS packages -- at least on
    Debian -- requires root privileges at the time that you do that.

    The caution that you should have been given is not "don't install things
    as root". You should have been told:


    Doing things as root without a good reason will lead to trouble,
    because you can cause problems that cannot be recovered from.


    sudo is a way of becoming root for just the things you need it for,
    so it's safer than staying around as root and doing other things.

    Ultimately, it's up to you. You can do anything you want with
    it. But if people hear that you were warned against poking the
    bear, they may not feel as much desire to rescue you.

    -dsr-

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew M.A. Cater@21:1/5 to All on Wed Feb 5 23:00:01 2025
    On Wed, Feb 05, 2025 at 01:38:17PM -0600, K0LNY ?? wrote:
    Hi Andrew,
    Using other distros, like Ubuntu and Raspbian, I would get tired of typing sudo in front of everything, so I would just do sudo su and become root for everything, so I wouldn't have to constantly be reminded that as a regular user, I can't do something, and I had been told that installing things as root will cause problems.

    Hi Glenn,

    sudo su is an anti-pattern, but it's one that's seen a great deal in
    advice on the 'Net.

    If you want to run several commands without typing sudo in front of each
    then, as suggested, a better way might be to run

    sudo -i

    which will open an interactive session for the sudo user that will last as
    long as that session is open.

    I was told that if I install things as root, that another package may not have permissions to use something I installed as root.
    Thanks.


    If you're installing Debian packages, then they're all, effectively, *installed* by a root-equivalent process. [That's part of the security
    and values screening process for aspiring Debian maintainers, in some
    sense: whatever they package might be installed on many thousands of
    machines by something with root privileges, potentially, so we have
    to be able to trust them.]

    The permissions will be whatever they are: there are a few packages
    normally intended to be run by root/root equivalent (usually under sbin)

    Packages are normally relatively independent of one another so permissions
    to run one application shouldn't impact others.

    I think Dan Ritter has responded similarly.

    All the very best, as ever,

    Andrew Cater
    (amacater@debian.org)

    Glenn
    ----- Original Message -----
    From: "Andrew M.A. Cater" <amacater@einval.com>
    To: <debian-accessibility@lists.debian.org>
    Cc: <debian-user@lists.debian.org>
    Sent: Wednesday, February 5, 2025 1:28 PM
    Subject: Root, sudo and installing packages [WAS Re: user is not in the suder's file]


    [Follow-up suggested to the mailing list at debian-user@lists.debian.org]

    On Wed, Feb 05, 2025 at 11:50:44AM -0600, K0LNY ?? wrote:
    Hi Andrew,
    How is Debian different with regard to apparently there not being a
    problem
    installing things as root?
    I know that there are issues if some packages are installed with root privileges on other systems.
    Thanks.

    Glenn

    Hi Glenn,

    I'm not quite sure I understand what you mean here. Root can do most things: sudo is effectively allowing an unprivileged user to "become" root for
    a few commands (and a few minutes - there's a time out and then you may
    have to put a password in again).

    Installing a Debian .deb package effectively requires super user powers.

    You should always be careful when installing packages that you know what
    you are installing. Similarly, Debian packages from Debian are preferred
    as easier to deal with within the system if there are no third party packages. Packages not produced by Debian and sourced from third parties may create problems.

    See also: https://wiki.debian.org/DontBreakDebian

    If you are not sure of Linux commands and Debian administratin - you
    might try installing the package debian-handbook

    This is a handbook outlining various aspects of system administration on
    a Debian system based round the needs of a fictional factory. The
    standard package provides an html structure in
    /usr/share/doc/debian-handbook

    Hope this helps,

    Andrew Cater
    (amacater@debian.org)


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Green@21:1/5 to glenn@ervin.email on Thu Feb 6 09:00:01 2025
    K0LNY ?? <glenn@ervin.email> wrote:
    Hi Andrew,
    Using other distros, like Ubuntu and Raspbian, I would get tired of typing sudo in front of everything, so I would just do sudo su and become root for everything, so I wouldn't have to constantly be reminded that as a regular user, I can't do something, and I had been told that installing things as root will cause problems.

    I do 'sudo -i' to become root for a long series of things that require
    root. It changes the prompt so I am reminded that I am root.

    I have also put 'export TMOUT=900' in root's .profile so that a root
    login that's idle for 15 minutes automatically logs out.

    --
    Chris Green
    ยท

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)