Announcement

Collapse
No announcement yet.

How Do I Change Computer Administrator and Root?

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

    How Do I Change Computer Administrator and Root?

    I know, strange subject.

    I'm selling one of my computers to a friend and I'm trying to set it up for him and remove all indicators of my ownership from the system. I want to make him the sole administrator of the computer and have his password become the only root password. What's the easiest way to do this without a complete reinstall of the system?

    While I'm at it. How can I change the root password of a system?

    Thanks
    "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

    #2
    Re: How Do I Change Computer Administrator and Root?

    Originally posted by mhumm2
    How can I change the root password of a system?
    In a terminal console:

    Code:
    carib@ZD8000:~$ sudo passwd root

    Comment


      #3
      Re: How Do I Change Computer Administrator and Root?

      Thanks carib, but after doing some reading, I realize I really don't want to create a root password. Typing "sudo then entering the logged in user's password works just fine while keeping the system secure. Of course the user has to have administrator privileges.

      So once I know that the new user has administrator privileges by being a member of the adm group, I can just delete my user account. Is that correct?
      "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

      Comment


        #4
        Re: How Do I Change Computer Administrator and Root?

        First, add a new user. By default, only the user who installed *buntu is allowed to operate as 'root' when needed. But, any additional user added to the system can also function as 'root' (when needed) if they are included in the admin group.
        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


          #5
          Re: How Do I Change Computer Administrator and Root?

          Thanks Snowhog;

          Would I do any damage then by deleting my account (original installer) when I'm done creating his new account with admin privileges?
          "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

          Comment


            #6
            Re: How Do I Change Computer Administrator and Root?

            Originally posted by mhumm2
            Thanks Snowhog;

            Would I do any damage then by deleting my account (original installer) when I'm done creating his new account with admin privileges?
            If it were me, after adding the new user and adding that user to the admin group, I'd logout/restart and login as the new user. Then test that that user in fact can gain root access. The simplest way to test is to open a console and type:
            Code:
            sudo su -
            and type in the users pwd when prompted. If you get the # prompt then all is good. Type exit and exit. You can then safely remove your 'old' user from the system - while still logged in under the new user. In a console type:
            Code:
            sudo deluser --remove-all-files
            If you have any date in your 'old' /home/user directory, copy/save before doing this.
            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


              #7
              Re: How Do I Change Computer Administrator and Root?

              Okay, an interesting development happened.

              When I logged in, the system directed me to enter a new password for my friend which I did effectively changing his password.

              I then opened a terminal and typed sudo su

              cody@Opteron:~$ sudo su
              [sudo] password for cody:
              cody is not in the sudoers file. This incident will be reported.

              When I did it again and entered MY password the system responded with:

              cody@Opteron:~$ sudo su
              [sudo] password for cody:
              Sorry, try again.

              I'm leaning towards reinstalling at this point. Any suggestions?

              "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

              Comment


                #8
                Re: How Do I Change Computer Administrator and Root?

                You have to log in as your user to make these changes.
                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


                  #9
                  Re: How Do I Change Computer Administrator and Root?

                  Originally posted by mhumm2
                  Okay, an interesting development happened.

                  When I logged in, the system directed me to enter a new password for my friend which I did effectively changing his password.

                  I then opened a terminal and typed sudo su

                  cody@Opteron:~$ sudo su
                  [sudo] password for cody:
                  cody is not in the sudoers file. This incident will be reported.

                  When I did it again and entered MY password the system responded with:

                  cody@Opteron:~$ sudo su
                  [sudo] password for cody:
                  Sorry, try again.

                  I'm leaning towards reinstalling at this point. Any suggestions?

                  Type only sudo, not sudo su.

                  Comment


                    #10
                    Re: How Do I Change Computer Administrator and Root?

                    Originally posted by mhumm2
                    cody@Opteron:~$ sudo su
                    [sudo] password for cody:
                    cody is not in the sudoers file. This incident will be reported.
                    This tells that user cody does not have the right to use sudo. The most likely reason is that you have not yet added cody to the admin group

                    cody@Opteron:~$ sudo su
                    [sudo] password for cody:
                    Sorry, try again.
                    Sudo needs the password for cody, your original user's password is incorrect.

                    To fix it, add user cody to the admin group:
                    1.login as your original admin user
                    2. run:
                    Code:
                    sudo adduser cody admin
                    (use the password of your original admin user when prompted)
                    3. now sudo should work for cody using cody's password

                    Comment


                      #11
                      Re: How Do I Change Computer Administrator and Root?

                      Thank you Kubicle;

                      I think I'm beginning to understand just how powerful a terminal can be.

                      I've been using the graphical system settings to make these changes including adding Cody to the group: adm. I assumed this meant administrator, especially since my original account is part of that group.

                      Okay, let's see if this works...
                      "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

                      Comment


                        #12
                        Re: How Do I Change Computer Administrator and Root?

                        Originally posted by mhumm2
                        I've been using the graphical system settings to make these changes including adding Cody to the group: adm. I assumed this meant administrator, especially since my original account is part of that group.
                        adm is another administration group, used for system monitoring (reading most of the logs in /var/log, for example). It doesn't affect sudo behaviour by default. You need admin group for that.

                        Comment


                          #13
                          Re: How Do I Change Computer Administrator and Root?

                          Thanks Kubicle and the group. That's what I was doing wrong.

                          "If you're in a room with another person who sees the world exactly as you do, one of you is redundant." Dr. Steven Covey, The 7-Habits of Highly Effective People

                          Comment

                          Working...
                          X