Announcement

Collapse
No announcement yet.

can't login as root

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

    can't login as root

    hello guys

    i know you have benn talked alot on this subject but i could not solve mine.i want to install XAMPP and need root access, when i type su or sudo -s it requests the password and when i enter it here's its answer
    when i type su :su: Authentication failure
    when i type sudo -s :
    hamed@hamed-EP31-DS3L:~$ sudo -s
    [sudo] password for hamed:
    groups: cannot find name for group ID 0
    root@hamed-EP31-DS3L:~#


    and the bold one is a new problem for me 2. i have deleted an account and then it appeared.
    Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

    #2
    To get root access for a single command in Kubuntu (or any 'Buntu) just use sudo. If you want to stay as root (not having to type sudo all the time) then it's 'sudo su'.

    With 'sudo' you have to follow it with a command:

    Code:
    rob@monsterbox:~$ sudo apt-get -s install xchat
    [sudo] password for rob: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      gconf2 libsexy2 xchat-common
    Suggested packages:
      gconf-defaults-service
    Recommended packages:
      tcl8.5 libnotify-bin xchat-indicator
    The following NEW packages will be installed:
      gconf2 libsexy2 xchat xchat-common
    0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
    Inst gconf2 (3.2.6-0ubuntu1 Ubuntu:13.04/raring [amd64])
    Inst libsexy2 (0.1.11-2build3 Ubuntu:13.04/raring [amd64])
    Inst xchat-common (2.8.8-7ubuntu2 Ubuntu:13.04/raring [all])
    Inst xchat (2.8.8-7ubuntu2 Ubuntu:13.04/raring [amd64])
    Conf gconf2 (3.2.6-0ubuntu1 Ubuntu:13.04/raring [amd64])
    Conf libsexy2 (0.1.11-2build3 Ubuntu:13.04/raring [amd64])
    Conf xchat-common (2.8.8-7ubuntu2 Ubuntu:13.04/raring [all])
    Conf xchat (2.8.8-7ubuntu2 Ubuntu:13.04/raring [amd64])
    rob@monsterbox:~$
    With 'sudo su' you become root for the session:

    Code:
    rob@monsterbox:~$ sudo su
    [sudo] password for rob: 
    root@monsterbox:/home/rob#                              <----- notice I'm now "root"
    apt-get -s install xchat                                <----- no "sudo" in front of command, it's not needed, I'm root
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      gconf2 libsexy2 xchat-common
    Suggested packages:
      gconf-defaults-service
    Recommended packages:
      tcl8.5 libnotify-bin xchat-indicator
    The following NEW packages will be installed:
      gconf2 libsexy2 xchat xchat-common
    0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
    Inst gconf2 (3.2.6-0ubuntu1 Ubuntu:13.04/raring [amd64])
    Inst libsexy2 (0.1.11-2build3 Ubuntu:13.04/raring [amd64])
    Inst xchat-common (2.8.8-7ubuntu2 Ubuntu:13.04/raring [all])
    Inst xchat (2.8.8-7ubuntu2 Ubuntu:13.04/raring [amd64])
    Conf gconf2 (3.2.6-0ubuntu1 Ubuntu:13.04/raring [amd64])
    Conf libsexy2 (0.1.11-2build3 Ubuntu:13.04/raring [amd64])
    Conf xchat-common (2.8.8-7ubuntu2 Ubuntu:13.04/raring [all])
    Conf xchat (2.8.8-7ubuntu2 Ubuntu:13.04/raring [amd64])
    root@monsterbox:/home/rob#                                 <------still root after command exits
    To get out of root you just type "exit" and hit <ENTER>.
    Hope it helps.
    Computers don't make mistakes. They only execute them.

    Comment


      #3
      tnx for your reply Dutchman

      here's my result :

      Code:
      hamed@hamed-EP31-DS3L:~$ sudo -s
      [sudo] password for hamed: 
      Sorry, try again.
      [sudo] password for hamed:

      The 2nd code:
      Code:
      hamed@hamed-EP31-DS3L:~$ sudo s
      [sudo] password for hamed: 
      Sorry, try again.
      [sudo] password for hamed:

      now what?
      Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

      Comment


        #4
        Please input the correct command: "sudo su" not "sudo -s" or "sudo s".

        I'm not sure if it's not recognising your password or it's failing because the command you input was incorrect.
        Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
        Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

        Comment


          #5
          tnx Rod J. i tested this new one and i could switch to root. but i still recive groups: cannot find name for group ID 0. what is this problem and is it important and how can i fix this ?

          hamed@hamed-EP31-DS3L:~$ sudo su
          [sudo] password for hamed:
          groups: cannot find name for group ID 0
          root@hamed-EP31-DS3L:/home/hamed#
          Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

          Comment


            #6
            Try again after restarting your computer. Someone had success doing that: http://ubuntuforums.org/showthread.php?t=909540
            Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
            Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

            Comment


              #7
              "sudo -s" works fine, it just opens a root shell. You can follow it with a command, but it works without one. "sudo -i" is more commonly used here, but both work.

              IMO the problem lies here
              i have deleted an account and then it appeared.
              Sounds like you deleted your admin user or at least your hamed account is not in the sudoers group. What's the output of groups in a terminal?

              EDIT: Also whats the output of sudo -l

              Please Read Me

              Comment


                #8
                here's the output of groups :
                hamed daemon bin sys adm tty disk lp uucp man proxy dialout cdrom sudo dip plugdev syslog scanner lpadmin sambashare
                Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

                Comment


                  #9
                  Could you have deleted the root user? user and group 0 are both root. Try cat /etc/passwd and see if this line is at the top:

                  root: x :0:0:root:/root:/bin/bash

                  (spaces added to prevent simley)

                  Please Read Me

                  Comment


                    #10
                    tnx oshunluvr!
                    i tried again typing sudo su in the terminal and it seems the problem has been solved.

                    here's what i did. i opened User management in System Setting and tried modifying my User account. and i checked everything in Priviliges and Groups Except nogroup. is this way a correct way of solving this problem?
                    Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

                    Comment


                      #11
                      yes it was in the top

                      i added a new user and in the Privileges and Groups i checked it as root ans then i deleted that account
                      Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

                      Comment


                        #12
                        Yeah, that probably caused it. I don't think you should have anyone other than root in the root group - too dangerous and very insecure. Use sudo instead.

                        Please Read Me

                        Comment


                          #13
                          ok now what shall i do?

                          i have deleted the previous account, is everything OK now?
                          Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

                          Comment


                            #14
                            If sudo is working, you should be OK.

                            Please Read Me

                            Comment


                              #15
                              thank you oshunluvr
                              Kubuntu 12.04 / KDE = Platform Version 4.8.4 (4.8.4) / Version: 0.97-29ubuntu66 / Desktop / CPU=32 bit / Intel / 2G RAM / 1 Hard Internal

                              Comment

                              Working...
                              X