Announcement

Collapse
No announcement yet.

Linux says: No you sudon't.

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

    Linux says: No you sudon't.

    A lot of the instructions I come across rely on use of the "sudo" command to prevent having to enter the root password when doing admin-ish things.

    Problem is, the default account I created when setting up Kubuntu apparently doesn't have superuser privileges, and I can't figure out how to make it so. Can someone walk me through it step by step, or point me to where someone has done this? Every time I try to "sudo" anything, I get a message telling me I'm not in the superusers group, and "this incident will be reported" (to whom?).

    #2
    Re: Linux says: No you sudon't.

    Ubuntu et al sets up the 'initial' user account with sudo rights which can be accessed when required.

    If, when in a console shell, you need sudo rights, you would preface the command you need to execute with:
    Code:
    sudo [command]
    You will be prompted for a password, which will by your password.

    If in the shell, you wanted to run the Kate editor 'as root' you would type:
    Code:
    kdesu kate
    This launches the Kate editor as root. [kdesu is used from the console when you are launching GUI applications.]
    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


      #3
      Re: Linux says: No you sudon't.

      Is "sudo -i" identical to "su"? (I can't su on my system, says "Authentication failure") If not, what are the differences?

      Comment


        #4
        Re: Linux says: No you sudon't.

        Originally posted by mivo
        Is "sudo -i" identical to "su"?
        # http://www.penguin.ch/dokuwiki/doku....ics#super_user
        # http://www.penguin.ch/dokuwiki/doku....o#root_revival

        Comment


          #5
          Re: Linux says: No you sudon't.

          Maybe it is the translation or just the author trying to be witty, but I did not find that very helpful. I do appreciate you pointing it out.

          Comment


            #6
            Re: Linux says: No you sudon't.

            Originally posted by mivo

            Is "sudo -i" identical to "su"?
            In a word, NO.

            According to Beginning Ubuntu Linux by Keir Thomas, p.223, "sudo" is short for "superuser do". It is the command by which the non-super user temporarily becomes the superuser for one command.

            If you need to "become" the super user, aka "root user", for a series of commands or operations, you can enter
            Code:
            sudo su
            and your password and you'll find yourself at the
            Code:
            /home/user#
            prompt, fully empowered to destroy.

            Comment


              #7
              Re: Linux says: No you sudon't.

              But what does sudo -i do in comparison? It seems to behave like su. But I really lack experience here. I only used a handful of commands over the past few years when I needed to log into my employer's server to restart a database or grep some logs, and it's just now that I switched to Linux for my workstation, When I mounted my external disk, I used sudo -i, then proceeded by typing in commands as root. (I followed instructions only.)

              Comment


                #8
                Re: Linux says: No you sudon't.

                Originally posted by mivo
                But what does sudo -i do in comparison?
                sudi -i

                -i The -i (simulate initial login) option runs the shell specified in
                the passwd(5) entry of the user that the command is being run as.
                The command name argument given to the shell begins with a - to
                tell the shell to run as a login shell. sudo attempts to change to
                that user’s home directory before running the shell. It also ini‐
                tializes the environment, leaving TERM unchanged, setting HOME,
                SHELL, USER, LOGNAME, and PATH, and unsetting all other environment
                variables. Note that because the shell to use is determined before
                the sudoers file is parsed, a runas_default setting in sudoers will
                specify the user to run the shell as but will not affect which
                shell is actually run.
                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