Announcement

Collapse
No announcement yet.

disabled admin rights for user in favor of root which now doesn logi

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

    disabled admin rights for user in favor of root which now doesn logi

    Hi,
    I'm new to kubuntu, just switched from another distro, and I think I messed up smth. already.

    it's about the user administrative rights...
    ...just installed kubuntu 8.04, and after a day of updating, configuring and installing the soft I need - I created a root user, (I had no idea that Kubuntu is not supposed to have one...). Well I disabled the administrative rights for the user and enabled them for the root.

    Now I can't login in the root account although the password is the correct one, and neither can I update anything through the Adept manager since it says that I do not have the administrative rights....

    can anyone suggest some solution for this situation? Or the only solution is to reinstall kubuntu again??
    I'd really appreciate if there would be another way to get rid of the root account or at least to give back the administrative rights to the user...

    thank you for your help.

    #2
    Re: disabled admin rights for user in favor of root which now doesn logi

    Copied from http://ubuntuforums.org/archive/index.php/t-150021.html

    "Use the 'Recovery Mode from the Grub menu at startup.

    Recovery mode will drop you to a root prompt. If you don't see the GRUB menu at startup then you probably have to press the ESC key to view it, as its sometimes hidden and only revealed when you hit the ESC key.

    Once at the root prompt you can use this command to edit the /etc/sudoers file..

    visudo #this command does on thing. It opens the sudoers file for editing

    My sudoers file looks like this. Note the last line where I give my user sudo privileges. This is the line that would need to be added by those who, for whatever reason, don't have sudo privileges.

    # /etc/sudoers
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the man page for details on how to write a sudoers file.
    #

    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # Defaults

    Defaults !lecture,tty_tickets,!fqdn

    # User privilege specification
    root ALL=(ALL) ALL
    mustard ALL=(ALL) ALL


    You can see my username on the bottom line. You would need to add your username to the bottom as I have done.

    Assuming your user name was "bob'', then the line that would need to be added would be..
    bob ALL=(ALL) ALL

    This is just one way of doing it. Some sudoers files are set up with an admin group called 'adm'. Users are then added to the adm group, and a line in the sudoers file that looks like this below gives members of the 'adm' group admin access.
    %adm ALL=(ALL) ALL

    If you decided to do it this way you would create the line above at the bottom of your sudoers file then do this command (substituting your username in the appropriate place)..

    adduser your_username adm"
    "A problem well stated is a problem half solved." --Charles F. Kettering
    "Sometimes the questions are complicated and the answers are simple."--Dr. Seuss

    Comment


      #3
      Re: disabled admin rights for user in favor of root which now doesn logi

      thanks a lot for the help! that was really a nice surprise to get help that fast.
      it worked. I restored the admin rights for the user and then deleted the earlier created root account...
      however now I think I have another problem...
      when I was trying to edit the sudoers file from the root recovery mode, I made some mistakes and I had to restart... well later I got the message that there is a crashed version of the sudoers file in the swap... .called .sudoers.tmp.swp and that I have to either delete it or recover it... well I didn't do it right, I just edited properly the one that was open, and saved it. Now when I want to install smth I get this message:

      dpkg: syntax error: unknown group `root' in statoverride file

      what can I do about this? I guess I should go and delete the old sudoers file... but have no idea how to do it.
      thank you again for the help.

      Comment


        #4
        Re: disabled admin rights for user in favor of root which now doesn logi

        Well, I don't understand what you mean with "I had no idea that Kubuntu is not supposed to have one..."
        Indeed, Kubuntu has one root user! Any NIX OS has a root user, can be named different, but it is not possible to work with no ID=0 user...
        If you want to see it, type 'sudo cat /etc/passwd'
        The very first line should be 'root:0:0:root:/root:/bin/bash'

        By the way, you should not delete the root user. If you did it, you should restore it.
        Anyway, I'm curious, what did you do exactly to delete the root user?

        Comment


          #5
          Re: disabled admin rights for user in favor of root which now doesn logi

          well what I meant, is that I didn't know about the ubuntu security policy of not having this division of rights between user and root... and doing things mainly through the sudo... anyway... I deleted the "root" account from the System Settings>user management, but that doesn't matter anymore, cause after that I had the upper mentioned error when trying to install stuff... I logged out and back in and there was no more internet connection... so now I'm again online from the liveCD, and heading to a full reinstall. I'll try not to mess it up next time.

          Comment


            #6
            Re: disabled admin rights for user in favor of root which now doesn logi

            I see...
            To clarify some things, [K]ubuntu has standard division between user and root as any other Linux system. I started will Red Hat, then went to Fedora, Suse, and finally adopted the deb family with Kubuntu.
            They all do the very same thing, perhaps what you meant is [K]ubuntu has more approuch with sudo, and that's right. The installation process does one special thing: the very first regular user created is configured to be a 'sudoer' -> that's a little different if you compare other distros. BTW, what is yours previous Linux?

            If the 'sudoer' thing bugs you, just create another user by yourself. That one will not be a sudoer because that has to be configured by hand. Then you delete the first user and no more sudoers on your pc.

            About the root issue, I have no idea what can result from deleting the root user. Maybe, everything could be solved with a simple
            Code:
            sudo useradd -u 0 -g 0 root -d /root
            but who knows... think a full reinstall sounds best for you

            Comment

            Working...
            X