Announcement

Collapse
No announcement yet.

Sudo does not work

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

    Sudo does not work

    Installed Breezy on my home desktop yesterday. I am not able to get ANY admin access.
    On System Settings page admin button greyes out for some seconds and then returns to previous state, i.e. has no effect whatsoever. Password is right.
    If I try sudo on commandline it says something about not being able to get laane (my hostname) by gethostname(). And thats it. Checked /etc/hosts and added 'laane' to localhost row. No effect.

    Altogether, two installations, two probs with (or related to) sudo. Darn it might be safer but if it does not work there should be some way to make the machine still usable and administrable.

    #2
    Re: Sudo does not work

    Just for reference, as there is no info on this error in this forum.

    You can find plenty of info and solutions in Ubuntu forums searching for 'getbyhostname()'

    Problem is related to /etc/hosts file having an incomplete localhost item and/or /etc/hostname file being empty.

    Comment


      #3
      Re: Sudo does not work

      pleaes check this post http://kubuntuforums.net/forums/index.php?topic=445.0
      cheers!
      -=|From the desk of|=-
      «•´`•.(*•.¸(`•.¸ ¸.•´)¸.•*).•´`•»
      «•´¨*•.¸¸whoiam55.¸¸.•*¨`•»
      «•´`•.(¸.•´(¸.•* *•.¸)`•.¸).•´`•»
      Reg. Linux User # 400637

      Comment


        #4
        Re: Sudo does not work

        I had the same problem after doing a EXPERT install of Kubuntu Breezy -- here is the solution.

        When you do an expert install of Kubuntu (or Ubuntu) it actually defaults to setting up a ROOT account and forsakes the SUDO setup that happens when you do a normal install.

        to get sudo to work for your account you need to login as root.

        [prompt]>su

        type root password

        Then edit the sudo configuration file with the following command:

        [prompt]>visudo (it is one word)

        this will actually open the sudo config file with nano instead of VI under (k)Ubuntu

        go to the last line where it says:

        # User privilege specification
        root ALL=(ALL) ALL

        #and add the line:

        your_user_account_name_here ALL=(root) ALL

        #save the file and like magic sudo works for your account







        Comment


          #5
          Re: Sudo does not work

          So you are saying that if I had done expert install, I would have been saved of this miserable, broken, totally unneeded sudo BS?! Poor me.

          But this news comes too late. Yesterday I dragged my home computer to office. To use broadband (at home I have 19 kbs dialup ) , install updates and some extra software. After spending 1,5 hours getting the network set up and fighting with sudo (Knoppix to the rescue again) I managed to install updates.
          Installing extra software ended in a slew of errors from Adept. I ended up being not able to log into KDE anymore.

          I think I will stick to distros that I know, that work for me and that do not implement funny broken security schemes I do not need and that do deny my access to the computer. Having spent years on Linux Kubuntu Breezy is the first distro that has required another distro/live CD to perform simplest admin functions.

          Sorry for wasting your time (and mine).

          Comment


            #6
            Re: Sudo does not work

            Originally posted by mikeycal
            I had the same problem after doing a EXPERT install of Kubuntu Breezy -- here is the solution.

            When you do an expert install of Kubuntu (or Ubuntu) it actually defaults to setting up a ROOT account and forsakes the SUDO setup that happens when you do a normal install.

            to get sudo to work for your account you need to login as root.

            [prompt]>su

            type root password

            Then edit the sudo configuration file with the following command:

            [prompt]>visudo (it is one word)

            this will actually open the sudo config file with nano instead of VI under (k)Ubuntu

            go to the last line where it says:

            # User privilege specification
            root ALL=(ALL) ALL

            #and add the line:

            your_user_account_name_here ALL=(root) ALL

            #save the file and like magic sudo works for your account







            Hi:

            Couldn't get this to work for me. SUDO still no go, I have to log out and log back in as root in order to get anything done. I guess this is one bug they're still working on. I can live with it but it definitely is a PITA. >

            Regards.

            Comment


              #7
              Re: Sudo does not work

              I can't understand how you guys using the sudo command, just in case if you don't know the syntex is sudo command_name enter your password when prompted for password, there is no root password by default and it is advised not to enable it.
              cheers!
              -=|From the desk of|=-
              «•´`•.(*•.¸(`•.¸ ¸.•´)¸.•*).•´`•»
              «•´¨*•.¸¸whoiam55.¸¸.•*¨`•»
              «•´`•.(¸.•´(¸.•* *•.¸)`•.¸).•´`•»
              Reg. Linux User # 400637

              Comment


                #8
                Re: Sudo does not work

                at prompt:

                type:sudo passwd

                enter it once

                enter it twice

                Now use root password at screens asking for admin.

                Comment


                  #9
                  Re: Sudo does not work

                  Originally posted by whoiam55
                  I can't understand how you guys using the sudo command, just in case if you don't know the syntex is sudo command_name enter your password when prompted for password, there is no root password by default and it is advised not to enable it.
                  That's why I'm saying - it doesn't work. I've entered it just as you stated, it does not work. And it's a royal pain to have to log out and log in as root in order to edit files like fstab or others that can not be edited while in normal user mode. It would be great to type in "sudo kate /etc/fstab" then give my password and go on to edit the file. This is a bug which needs to be addressed and repaired. Hopefully it's being worked on.
                  Regards.

                  Comment


                    #10
                    Re: Sudo does not work

                    Originally posted by chscag
                    to log out and log in as root in order to edit files like fstab or others that can not be edited while in normal user mode.
                    I'm 100% certain that you have enabled the root password, type sudo passwd -l root in the shell to lock the root password again. check this like for more information. https://wiki.ubuntu.com/RootSudo
                    cheers!
                    -=|From the desk of|=-
                    «•´`•.(*•.¸(`•.¸ ¸.•´)¸.•*).•´`•»
                    «•´¨*•.¸¸whoiam55.¸¸.•*¨`•»
                    «•´`•.(¸.•´(¸.•* *•.¸)`•.¸).•´`•»
                    Reg. Linux User # 400637

                    Comment


                      #11
                      Re: Sudo does not work

                      Originally posted by whoiam55
                      Originally posted by chscag
                      to log out and log in as root in order to edit files like fstab or others that can not be edited while in normal user mode.
                      I'm 100% certain that you have enabled the root password, type sudo passwd -l root in the shell to lock the root password again. check this like for more information. https://wiki.ubuntu.com/RootSudo
                      OK, got it. Thanks, that works.

                      Regards.

                      Comment


                        #12
                        Re: Sudo does not work

                        Well...getting sudo to work after some tweaking is all fine. I have it working as well, but I do not understand why youhave to have it enabled...why not use kdesu for gui programs and sudo for non graphical commands run from konsole?

                        Comment


                          #13
                          Re: Sudo does not work

                          Thanks...worked for me!

                          Comment


                            #14
                            Re: Sudo does not work

                            Originally posted by GoldBuggie
                            Well...getting sudo to work after some tweaking is all fine.
                            My sudo worked just fine without any tweaking.

                            why not use kdesu for gui programs and sudo for non graphical commands run from konsole?
                            That's how it works already. Is your experience different?
                            Linux is ready for the desktop--but whose desktop?<br />How to install software in Kubuntu

                            Comment


                              #15
                              Re: Sudo does not work

                              I think you missunderstood me aysiu. Ppl seem to use sudo for graphical programs and that does not always work(unless you change some stuff). I wanted only to point out that one should use kdesu for graphical programs.

                              Sudo works fine unless you use graphical progams then it might not work.

                              Comment

                              Working...
                              X