Announcement

Collapse
No announcement yet.

[SOLVED] Can't get packages to install, error with sudo?

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

    [SOLVED] Can't get packages to install, error with sudo?

    Any time I try to install something, let's say Firefox, KDE Sudo asks for my password, right? So I enter my password and there comes an error message saying, "Your user name is unknown to Sudo!" But I don't get it. If I personally installed Kubuntu, then how doesn't know my user name? Even if I try regular Sudo or apt-get it will say something similar(I don't remember what.)

    Here is some information *Just* in case you need it:

    I have Kubuntu 9.04, on PLAYSTATION(R) 3 Console;
    It seems that reinstalling Kubuntu doesn't work. Already tried it 4 times; >

    Please help.

    #2
    Re: Can't get packages to install, error with sudo?

    That's odd -- probably something simple (but non-obvious).

    You know that entries in the Linux console are case-sensitive, right? That goes for both the user name and the password. So you have to make sure you either don't have Caps Lock on when you're installing, or if you do, then you're doomed to enter your user name and password with Caps Lock on every time thereafter. Best bet is to make user names and passwords all lower case, period, unless stringent (organizational) security rules require "complex" passwords. I would suspect that the user name you THINK you entered during installation is not the same as the one you are using to run the console commands.


    There is a way to edit the sudoers file to change the name of a user, with visudo. But that really is an exercise that (a) should not be necessary on a new installation, and (b) is not user-friendly, especially for a new Linux user. If you want to go that route, enter a search on "visudo" and you should find prior threads on the topic.

    Another possibility is that your keyboard is misbehaving -- doing "bounces" in which a keystroke actually is doing a double-entry sometimes. There is a Linux utility that can translate your keystrokes to values that you can read in the console (scratching my head and trying to remember it .......). Ahh -- "xev" in the console runs it, and then you press a key and see the ASCII value, I think ... the same keys need to always give the same values.

    Comment


      #3
      Re: Can't get packages to install, error with sudo?

      Thanks for the info. I will run tests on my keyboard to make sure nothing is what it shouldn't be. And- the caps lock shouldn't be a problem. If it was I wouldn't be able to log in to Kubuntu!But thanks anyway for the info

      Comment


        #4
        Re: Can't get packages to install, error with sudo?

        By default, *buntu systems give permissions to use sudo to users that are in the admin group.

        The error message you're getting suggests that either:
        1. /etc/sudoers file does not properly set up the admin group to use sudo
        or:
        2. your username is not part of the admin group

        (during installation, /etc/sudoers should have been properly set up, and the installing user should have been included in the admin group...but it is possible something went wrong during the installation)

        Both problems are fixable, though, with a little tinkering:
        1. run
        Code:
        id
        command in a console window, it will list your username and groups you belong to. Check for group (admin). If it's present the problem is likely #1, if not the problem is #2.

        To solve either problem you need root privileges so if you can't use sudo, you need to boot into recovery mode.

        Once logged in as root, to solve problem #1 you need to edit /etc/sudoers to include the line:
        %admin ALL=(ALL) ALL
        (You can put this below 'root ALL=(ALL) ALL')
        You can edit /etc/sudoers with the 'visudo' command.

        To solve problem #2, simply run:
        Code:
        adduser [YOURUSERNAME] admin
        (replace [YOURUSERNAME] with your actual username)
        This will add the user into the admin group.

        Comment


          #5
          Re: Can't get packages to install, error with sudo?

          Thanks, I owe you one i will try it later since i'm not home.

          Comment


            #6
            Re: Can't get packages to install, error with sudo?

            ok. I'm making progress. Found out that kubuntu was greedy and only installed root in sudoers Now, how do I solve problem #2?

            EDIT: Sorry. It's neither problem. It seems that I'm not even in the sudoers file. Now, how do I get in recovery mode with an alternate install disc?

            Comment


              #7
              Re: Can't get packages to install, error with sudo?

              Originally posted by Buntuners
              Now, how do I get in recovery mode with an alternate install disc?
              I'm not sure you can do it with the alternate disc, can't check it ATM, though. You could probably run the livecd, mount your harddrive and edit the files on that hardrive (/<mountpoint>/etc/sudoers and /<mountpoint>/etc/group) by hand from the live session, but the easiest way to get to recovery mode is hitting Esc in the beginning of a normal boot when prompted, and choose recovery mode from the grub boot menu.

              Comment


                #8
                Re: Can't get packages to install, error with sudo?

                ok. i will try.

                Comment


                  #9
                  Re: Can't get packages to install, error with sudo?

                  Thanks, it's working now!

                  Comment

                  Working...
                  X