Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: How to make gnomesu command shorter?

  1. #11
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: How to make gnomesu command shorter?

    Quote Originally Posted by nrickert View Post
    I would prefer:
    Code:
    ln -s /usr/bin/gnomesu $HOME/bin/hurpderp
    That way, the alternative name is available only to me, and won't confuse all of the other users of the system (all zero of them, as it happens). It seems better to make such changes local rather than global.
    I concur to your conclusion. But specialy because it is not true that there are zero other users on he system. There more then twenty of them (look in /etc/passwd) and some of them (specialy root) are used for running prcocesses (deamons or other). So changing/adding names that may be used by those users (specialy when they are executables found in the PATH of such users) can be harmfull.
    Henk van Velden

  2. #12
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to make gnomesu command shorter?

    On 2014-10-01 13:56, hcvv wrote:

    > I concur to your conclusion. But specialy because it is *not* true that
    > there are zero other users on he system. There more then twenty of them
    > (look in /etc/passwd) and some of them (specialy root) are used for
    > running prcocesses (deamons or other). So changing/adding names that may
    > be used by those users (specialy when they are executables found in the
    > PATH of such users) can be harmfull.


    Good point.


    And that reminds me, that "/usr/local/bin/" is not always in the path, specially for root.
    Also, there are many scripts that specify the full path to whatever they call.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  3. #13
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: How to make gnomesu command shorter?

    Quote Originally Posted by robin_listas View Post
    And that reminds me, that "/usr/local/bin/" is not always in the path, specially for root.
    It should never be in root's PATH. Same for any other "system" user.

    And btw this is one of the security issues when you use
    Code:
    su
    instead of
    Code:
    su -
    Wrong PATH (and maybe intervening aliases, and .........)
    Henk van Velden

  4. #14

    Default Re: How to make gnomesu command shorter?

    On 10/01/2014 08:18 AM, Carlos E. R. wrote:
    > On 2014-10-01 13:56, hcvv wrote:
    >
    >> I concur to your conclusion. But specialy because it is *not* true that
    >> there are zero other users on he system. There more then twenty of them
    >> (look in /etc/passwd) and some of them (specialy root) are used for
    >> running prcocesses (deamons or other). So changing/adding names that may
    >> be used by those users (specialy when they are executables found in the
    >> PATH of such users) can be harmfull.

    >
    > Good point.
    >
    >
    > And that reminds me, that "/usr/local/bin/" is not always in the path,
    > specially for root.
    > Also, there are many scripts that specify the full path to whatever they
    > call.
    >


    Which is why using a local .alias file is the best approach to creating
    your own "shortcut" commands.

    Ken

  5. #15
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to make gnomesu command shorter?

    On 2014-10-01 14:46, hcvv wrote:
    >
    > robin_listas;2667371 Wrote:
    >>
    >> And that reminds me, that "/usr/local/bin/" is not always in the path,
    >> specially for root.
    >>

    > It should never be in root's PATH. Same for any other "system" user.


    Well, it is where programs I build locally go to, and I need them.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))

  6. #16

    Default Re: How to make gnomesu command shorter?

    Quote Originally Posted by robin_listas View Post
    On 2014-10-01 13:56, hcvv wrote:

    > I concur to your conclusion. But specialy because it is *not* true that
    > there are zero other users on he system. There more then twenty of them
    > (look in /etc/passwd) and some of them (specialy root) are used for
    > running prcocesses (deamons or other). So changing/adding names that may
    > be used by those users (specialy when they are executables found in the
    > PATH of such users) can be harmfull.


    Good point.


    And that reminds me, that "/usr/local/bin/" is not always in the path, specially for root.
    Also, there are many scripts that specify the full path to whatever they call.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" (Elessar))
    /usr/local/bin is in the PATH for system wide users including root ( at least in my system it is )

    It is where local scripts/binary/executable that sysadmins/users and not for packages AFAIK, kinda like /etc/systemd for local purposes and /usr/libsystemd/system for packages ( i hope )
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  7. #17
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to make gnomesu command shorter?

    On 2014-10-02 00:06, jetchisel wrote:

    > /usr/local/bin is in the PATH for system wide users including root ( at
    > least in my system it is )
    >
    > It is where local scripts/binary/executable that sysadmins/users and not
    > for packages AFAIK, kinda like /etc/systemd for local purposes and
    > /usr/libsystemd/system for packages ( i hope )


    Not users: only the sysadmin can install there. :-)

    Thus, if you build, say, "bash" locally, without creating an rpm, and
    install it, it goes to /usr/local by default. All users would run that
    version instead of the distribution version. Root would still run the
    distribution version - because of the ordering of path for both.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  8. #18
    Join Date
    Sep 2014
    Location
    Shah Alam, Malaysia
    Posts
    68

    Default Re: How to make gnomesu command shorter?

    Oh wow. thanks people!
    I learn lots of things I never have a thought before from every post you made.

  9. #19
    Join Date
    Sep 2014
    Location
    Shah Alam, Malaysia
    Posts
    68

    Default Re: How to make gnomesu command shorter?

    Quote Originally Posted by hcvv View Post
    Create a file .alias in your home directory and put a line like
    Code:
    alias g='gmomesu'
    in it.

    But I realy wonder how many times a day you are usuing this. Running things as root must be an exception in a normal stable system.
    Im deploying lots of PC for some proof-of-concept project spanning several computer lab; where there are multiple type of PC with different configurations that I need to install one by one before full deployment from disk image.

  10. #20
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,157

    Default Re: How to make gnomesu command shorter?

    Quote Originally Posted by razirazo View Post
    Im deploying lots of PC for some proof-of-concept project spanning several computer lab; where there are multiple type of PC with different configurations that I need to install one by one before full deployment from disk image.
    Sounds more like something to be done from the CLI, on the real console and no login in the GUI at all. But this comment is only made without knowing any details about what you are doing.

    My original remark was based on my own experiences (with can of course differ widely from your's) and on using KDE. I use YaST from the KDE menu as important tool for actions to be done as root (thus no kdesu (the KDE equivalent of gomesu), just clicking. And for CLI actions I use Terminal in Superuser Mode (or similar wording, it starts Konsole with an su -) from the KDE menu. Again only click.

    Apart for the fact that I use the CLI for checking/testing actions to post here when answering people, I do not use it very much. About the same for YaST. In a system that is in production, I will do YaST about once a week for updating software. So even when I had to use gnomesu, it wouldn'd be worth for me to make an alias.
    Henk van Velden

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •