Announcement

Collapse
No announcement yet.

question about SU

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    question about SU

    Is there a way to install the ability to to use the su command?

    I ask because my buddy when installing mint(which is based on ubuntu) asked if he wanted to create a root account and enable su commands. Further more with a little bit of reading it turns out the server version of ubuntu supports su.

    Soooo... am I far off in guessing there is a will or way to getting su to work in kubuntu?

    #2
    Re: question about SU

    What does su offer that sudo or kdesudo don't? I'm not familiar with su.

    Comment


      #3
      Re: question about SU

      It took me a while to get used to using sudo too...

      I am used to su (which logs you in as superuser) or simply logging out and logging back in as root, with a different (root) password.

      So far I am getting used to sudo tho... it sucks to have to type it in all the time, but it could be worse.

      Comment


        #4
        Re: question about SU

        "sudo su" will get you a root terminal; "passwd" at a root terminal will allow you to change the root password (so you can just "su" in future), (this is not recomended, so don't blame me if you sc*ew your OS).

        "su" is "substitute user" (not "super user" as many call it), it allows temporary user switching (any user, not just root), by default (with no user specified) the substituted user is root.

        The root log-in password is deliberately hidden in *buntu, pretty much everything "su" allows access to can be done with "sudo", but "sudo" has the advantage of reminding new users that they are doing something which *could* prove fatal.

        I find both "su" and "sudo" usefull, "sudo" for single line commands, and "su" when I need something a bit more involved.

        Comment


          #5
          Re: question about SU

          When I need to issue more than a couple of commands requiring root access, I execute simply sudo bash. This runs a shell with root privileges that simply can be closed by typing "exit" This way, you don't need to alter default Ubuntu assumptions (such as root password etc)

          Comment


            #6
            Re: question about SU

            Just a note that saves a lot of typing. Ctrl-D is a shortcut for "exit".

            Comment


              #7
              Re: question about SU

              great info on su... I have never used it to switch to any user but root.

              I think there are advantages to having a root user that you can log into (the old desktops used to be red with large graphics of bombs in the corners so you would not forget you were logged in as root) and there are also advantages to using sudo.

              At this point I'm used to sudo so I don't feel the need to su or log in as root from the get-go.

              It took some time but I got used to it.

              Comment


                #8
                Re: question about SU

                Sometimes when setting up or installing third party applications it is just easier to have a root shell. Besides having to sudo every command... I had to chmod the hell out of folders to get the installer access to place that the sudo command did not address/grant permission to.

                or

                Sometimes you just want a root File Manager/Dolphin which I cant seem to figure out.

                Which would all be solved If I had a root account.


                ps. Thank you guys for all the info!

                Comment


                  #9
                  Re: question about SU

                  Typing Alt-F2 and then "kdesudo dolphin" should get you Dolphin with root permissions. If not, that's a problem that should be diagnosed.

                  Comment


                    #10
                    Re: question about SU

                    Originally posted by Nate
                    Typing Alt-F2 and then "kdesudo dolphin"
                    Actually, pressing Alt+F2 and then typing kdesudo dolphin

                    The danger in operating as root using su username from within a console: you have no visible indication that you are operating as root. By this, I mean that the normal prompt ($) doesn't change to the root prompt (#) using this command. Therefore, you can forget you are operating as root and, while still in the console, begin to execute actions within your user home directory and really screw things up!

                    That's why, from a console, if one requires the privileges of root to do something, you use sudo command instead (execution of a non-GUI command within the console environment) or kdesudo command (execution of a GUI command/application).
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Re: question about SU

                      Originally posted by Snowhog
                      The danger in operating as root using su username from within a console: you have no visible indication that you are operating as root.
                      if you su to root, the prompt should change to the root prompt (of course if you su to a user other than root, it won't change to a root prompt).

                      That said, 'su' is redundant in (k)ubuntu as a root terminal can be opened with 'sudo -i' or 'sudo -s' ('man sudo' to see the difference between the two, if you're interested)

                      EDIT: and yes, you can 'sudo' to a user other than root as well, like 'sudo -i -u username'

                      Comment


                        #12
                        Re: question about SU

                        paul@laptop:~$ su root
                        Password:
                        su: Authentication failure
                        paul@laptop:~$ su paul
                        Password:
                        paul@laptop:~$
                        It isn't possible, without enabling the root account, to "su to root" as shown above. When you su username, also as shown above, you gain superuser privileges, but the prompt doesn't reflect this, thus my comment on gaining superuser privileges in this manner.
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: question about SU

                          Originally posted by Snowhog
                          When you su username, also as shown above, you gain superuser privileges, but the prompt doesn't reflect this, thus my comment on gaining superuser privileges in this manner.
                          su username shouldn't give you superuser privileges, just switch to that user (with no elevated root powers). In your example, after 'su paul' you're just paul (not root), and the prompt reflects that.

                          Comment


                            #14
                            Re: question about SU

                            Ah, I see said the blind man. Really, I should have known that. :P Thanks for clarifying that.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment

                            Working...
                            X