Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 62

Thread: Become su in Terminal - HowTo

  1. #11
    palladium NNTP User

    Default Re: Become su in Terminal - HowTo

    > That might be because my paths for root and non-root tend to be the same

    which is the way mine is also...but the n00b with an as born newly
    installed openSUSE will run into NOT finding any executable in /usr/sbin

    so, there are *lots* of things that won't run without the -

    of course, the instructions could be changed to export that directory
    to the user path, and then su..

    but, it is a whole lot easier to just type

    su -

    ymmv

    --
    palladium
    Have a lot of fun..

  2. #12
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Become su in Terminal - HowTo

    Quote Originally Posted by palladium View Post
    > That might be because my paths for root and non-root tend to be the same

    which is the way mine is also...but the n00b with an as born newly
    installed openSUSE will run into NOT finding any executable in /usr/sbin

    so, there are *lots* of things that won't run without the -

    of course, the instructions could be changed to export that directory
    to the user path, and then su..

    but, it is a whole lot easier to just type

    su -

    ymmv

    --
    palladium
    Have a lot of fun..
    Really?

    Code:
    neutrino@neutrino:~> su
    Password:
    neutrino:/home/neutrino # echo $PATH
    /usr/lib64/mpi/gcc/openmpi/bin:/home/neutrino/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin:/opt/kde3/bin:/opt/kde3/bin
    neutrino:/home/neutrino # which iptables
    /usr/sbin/iptables
    neutrino:/home/neutrino #
    This is default and I've changed absolutely nothing

  3. #13
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,733
    Blog Entries
    20

    Default Re: Become su in Terminal - HowTo

    Trouble is there is always another or different approach -
    Sod's Law is if you mention One, a bunch of other folk will give better alternatives.
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  4. #14
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Become su in Terminal - HowTo

    Quote Originally Posted by caf4926 View Post
    Trouble is there is always another or different approach -
    Sod's Law is if you mention One, a bunch of other folk will give better alternatives.
    And Sturgeon's Law is that virtually everything is crud

  5. #15
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,071

    Default Re: Become su in Terminal - HowTo

    On Mon, 02 Nov 2009 07:51:58 +0000, palladium wrote:

    > ymmv


    And indeed it does. :-)

    Jim
    --
    Jim Henderson
    openSUSE Forums Moderator

  6. #16
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,071

    Default Re: Become su in Terminal - HowTo

    On Mon, 02 Nov 2009 11:06:01 +0000, caf4926 wrote:

    > Trouble is there is always another or different approach - Sod's Law is
    > if you mention One, a bunch of other folk will give better alternatives.


    Not always better, if it comes to that. I know one person who uses "sudo
    su" - and I've never understood why. I should ask him someday.

    Jim

    --
    Jim Henderson
    openSUSE Forums Moderator

  7. #17
    Join Date
    Jun 2008
    Location
    where I am is where I am
    Posts
    1,164

    Default Re: Become su in Terminal - HowTo

    Well, I for one didn't know about the Terminal being available Dolphin until today.
    That's what I get for not RTM.
    I'm just a curious cat
    My 64 bit: RADEON RX 570 |CPU AMD - Ryzen 5 1600
    MOTHERBOARD B450M D53H GGABYTE
    Opensuse Tumbleweed Plasma 5

  8. #18
    palladium NNTP User

    Default Re: Become su in Terminal - HowTo

    > This is default and I've changed absolutely nothing

    well, then i guess i'm wrong...but, i've not actually used 11.x past a
    few days...so..

    so, hmmmmmm..

    well, i guess all i was going by was the 'wise' (?) advice of bunch of
    old 'main frame' guys (see: <http://tinyurl.com/6ry6yd>)

    maybe it is time i 'let go' of that old wives tale...i'll drop it for
    now...unless i find good reason to speak up again..

    --
    palladium
    Have a lot of fun..

  9. #19
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Become su in Terminal - HowTo

    Quote Originally Posted by palladium View Post

    well, then i guess i'm wrong...but, i've not actually used 11.x past a
    few days...so..
    I don't think it will magically change by itself the more you keep using the system
    I've never had to change anything on various SUSE versions and it has always been like that so I never had problems with 'su' which would force me to use a login shell with 'su -'

  10. #20
    palladium NNTP User

    Default Re: Become su in Terminal - HowTo

    > unless i find good reason to speak up again..

    below are a baker's dozen quotes followed by a cite all from
    opensuse.org sources (i'll look outside our walls later, if i remember):

    1. "There is a problem starting YaST with the new Qt/KDE if you don't
    have a login shell as root (in other words, if you do "su" instead of
    "su -" for example). The symptom is that YaST does not show any Qt UI
    (note the control center works, just launching any YaST module
    hangs)." <http://en.opensuse.org/KDE/KDE4>


    2. "I found out this:
    su
    yast2
    does not work.
    But:
    su - (please not the 'minus' sign)
    yast2
    does work."
    <http://forums.opensuse.org/applications/422058-failed-attach-process.html#post2044599>


    3. "Not sure exactly what or why that extra hyphen works, but it did,
    so thank you!"
    <http://forums.opensuse.org/applications/407723-cant-launch-editor-root-2.html#post1944136>
    in reply to
    <http://forums.opensuse.org/applications/407723-cant-launch-editor-root-2.html#post1944110>

    4. "For ifconfig etc the reason is not that they cannot be run as
    root, but that their location /sbin or /usr/sbin is not in the default
    search path of ordinary users. And this search path doesn't change if
    you do su. What you have to do is su - which goes through root's
    normal login, then it will be in the search path."
    <http://forums.opensuse.org/archives/sf-archives/archives-network-internet/324821-where-ifconfig-iwconfig.html#post1505686>

    5. "@acecraft: Yes, there are SLES forums you should head to now, but
    I want point out that the reason you don't find ifconfig or modprobe
    on your path is probably because you didn't do su - instead of plain
    su. su - gets root's environment as if logging in, which normally adds
    /sbin to the $PATH, where ifconfig and modprobe are."
    <http://forums.opensuse.org/network-internet/417715-realtek-rtl8139-suse-enterprise-server-edition.html#post2009721>

    6. "Just open a konsole and su - to root user if there is mail you
    will get a notification in the konsole session." <moderator
    malcolmlewis in
    http://forums.opensuse.org/applications/398214-how-get-cron-send-me-email-notifications.html#post1887437>

    7. "Did you try to open a terminal and type su - to get in the root
    environment? Unless you put the file holding these commands in your
    path, you have to type absolute path or do a su - to get it to work.
    The - is critical as it is what puts you in the users environment.
    Hope this helps you understand Linux a little more."
    <http://forums.opensuse.org/network-internet/400760-opensuse-11-0-wired-network-problems-realtek-8186b.html#post1902381>

    8. "Well, to clarify su means SwitchUser and not SuperUser

    so there is no difference between logging in as root and su'ing to
    root with the "-" parameter.
    So logging in as root is equal to:
    su -

    su just takes root as the default user to switch to, so "su -
    username" is the correct syntax. The "-" just sets that the
    environment of the user "username" is set."
    <http://forums.opensuse.org/archives/sf-archives/archives-software/310512-superuser-vs-root.html#post1429524>

    9. "Thanks. Using "su -" worked great. I think it auto detected my
    card anyway. Thanks a lot."
    <http://forums.opensuse.org/network-internet/392861-kiwi-ltsp-zimbra.html#post1857479>
    in response to "But have you tried su - instead of plain su? "
    <http://forums.opensuse.org/network-internet/392861-kiwi-ltsp-zimbra.html#post1857390>

    10. "With sudo you are still using your $PATH and will not get
    programs that are in /sbin and /usr/sbin as those are in root's
    $PATH....What I often do on machines using the sudo method, e.g.
    *buntu, is: sudo su -"
    <http://forums.opensuse.org/applications/386424-cannot-start-gparted.html#post1821387>

    11. "The PATH is still "my" PATH. I do not know if this is correct (as
    said, I never realy studied sudo). But I always stick to
    Code: su -
    (mind the - ) or a real log in (as with the terminal) because it gives
    root its own environment. Much better for scurity. The user PATH can
    contain all sorts of places (like ./ ) where a program may have the
    same name as a tool you want to use as root!"
    <http://forums.opensuse.org/applications/405254-sudo-whatever-command-not-found-2.html#post1929115>

    12. "Make sure you are root. If you logged in as a normal user, make
    sure you became root using "su -" to get the full login environment.
    "su" alone misses some things."
    <http://lists.opensuse.org/opensuse-security/2002-02/msg00391.html>

    13. "You need to be root user with roots environment, did you add the
    minus sign after the su command?"
    <http://forums.opensuse.org/install-boot-login/396020-display-settings-disappeared.html#post1875017>

    --
    palladium
    Have a lot of fun..

Page 2 of 7 FirstFirst 1234 ... LastLast

Tags for this Thread

Posting Permissions

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