+ Post New Thread
Results 1 to 6 of 6
*nix Thread, Reset Password Ubuntu Server in Technical; We are looking at taking over the IT support for a local firm who have a basic Ubuntu file server ...
  1. #1
    richard_s
    Guest

    Reset Password Ubuntu Server

    We are looking at taking over the IT support for a local firm who have a basic Ubuntu file server installed. The problem is that the previous support firm will not give the client the password for the server which means no one can access it to do either maintenance or any other work on it that needs doing.

    I have some knowledge of linux but removing a password is beyond my capabilities without help.

  2. #2

    Join Date
    Nov 2008
    Posts
    41
    Thank Post
    8
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Quote Originally Posted by richard_s View Post
    We are looking at taking over the IT support for a local firm who have a basic Ubuntu file server installed. The problem is that the previous support firm will not give the client the password for the server which means no one can access it to do either maintenance or any other work on it that needs doing.

    I have some knowledge of linux but removing a password is beyond my capabilities without help.
    If you boot from a Linux CD (the original Ubuntu CD will do it) it should mount all pre-existing drives including the one which holds the /etc directory. Supposing it mounts the drive in location /mnt/drive1, you would need to go edit (as root) the /mnt/drive1/etc/shadow file to remove the root passwd.

    root:$1$b62f6698$5Xrs/t0cxojBTrgyEXOVc1:14547:0:99999:7:::

    becomes

    root::14547:0:99999:7:::

    Then you should be able to reboot without the CD and log in as root without giving a password. Then type "passwd" at a shell and enter a new one.

    I used to use Knoppix for this, but that was a few years ago.

    --
    Simon

  3. #3
    apaton's Avatar
    Join Date
    Jun 2009
    Location
    Kings Norton
    Posts
    283
    Thank Post
    54
    Thanked 106 Times in 87 Posts
    Rep Power
    37
    m0nty's is correct, but usually root is locked out on Ubuntu so you may need to find the admin user.

    Use live cd, Knoppix/Ubuntu....
    Mount existing root drive to /mnt/drive1
    List all admin users
    $ grep admin /mnt/drive1/etc/group
    "admin:x:123:andyp"
    Edit "andyp" password in /mnt/drive1/etc/shadow as suggested by m0nty.

    Reboot and log in as the admin user "andyp" and you will be able to use sudo etc...


    Andy

  4. #4

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,772
    Thank Post
    1,308
    Thanked 804 Times in 698 Posts
    Rep Power
    246
    Quote Originally Posted by apaton View Post
    but usually root is locked out on Ubuntu
    Well, root is given a random password, which you can change if you want. On a new Ubuntu install, the first thing I generally do is "sudo bash" then "passwd" to change the root password to I can log in as root via SSH. By default you can't log in as root from the GUI, but I think you can overide that, too.

    --
    David Hicks

  5. #5
    llawwehttam's Avatar
    Join Date
    Nov 2008
    Location
    Birmingham
    Posts
    223
    Thank Post
    56
    Thanked 3 Times in 3 Posts
    Blog Entries
    2
    Rep Power
    15
    Well why not use the old way and see if it works. I guess your using GRUB as your bootloader so when you see grub being used as the system is booting up stop it there. Got to the latest kernel in the list and press 'e' for edit. You can then edit the line which should look something like
    Code:
    kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
    Type
    Code:
    init=/bin/bash
    at the end. Press enter to save it and then press 'b' to boot. It should then boot into single user mode where you can just use the password command 'passwd' to change your root password.

    If this doesn't work then I would go with the live cd to edit /etc/shadow as well.

  6. Thanks to llawwehttam from:

    apaton (9th December 2009)

  7. #6
    apaton's Avatar
    Join Date
    Jun 2009
    Location
    Kings Norton
    Posts
    283
    Thank Post
    54
    Thanked 106 Times in 87 Posts
    Rep Power
    37
    Quote Originally Posted by llawwehttam View Post
    Well why not use the old way and see if it works. I guess your using GRUB as your bootloader so when you see grub being used as the system is booting up stop it there. Got to the latest kernel in the list and press 'e' for edit. You can then edit the line which should look something like
    Code:
    kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
    Type
    Code:
    init=/bin/bash
    at the end. Press enter to save it and then press 'b' to boot. It should then boot into single user mode where you can just use the password command 'passwd' to change your root password.

    If this doesn't work then I would go with the live cd to edit /etc/shadow as well.
    I like this method, Just tried in on my Ubuntu 9.10Server (VirtualBox) and it worked a treat!!



SHARE:
+ Post New Thread

Similar Threads

  1. bulk password reset
    By Jonny_sims in forum Windows
    Replies: 10
    Last Post: 26th September 2011, 11:12 PM
  2. [Fog] Reset Fog Password
    By matte53 in forum O/S Deployment
    Replies: 3
    Last Post: 13th October 2009, 10:27 PM
  3. Reset Sysman password
    By DreddMetal in forum MIS Systems
    Replies: 6
    Last Post: 27th April 2009, 09:34 PM
  4. Specops Password Reset
    By linkazoid in forum Windows
    Replies: 7
    Last Post: 16th May 2008, 03:27 PM
  5. reset admin password
    By fafster in forum Windows
    Replies: 11
    Last Post: 27th February 2008, 11:01 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •