*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 ...
8th December 2009, 01:16 PM #1
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.
8th December 2009, 01:28 PM #2
- Rep Power
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.
Originally Posted by richard_s
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.
8th December 2009, 02:46 PM #3
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/groupEdit "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...
8th December 2009, 05:56 PM #4
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.
Originally Posted by apaton
9th December 2009, 10:04 AM #5
- Rep Power
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
Type 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.
kernel /boot/vmlinuz-2.6.15-26-386 root=/dev/hda1 ro quiet splash
If this doesn't work then I would go with the live cd to edit /etc/shadow as well.
Thanks to llawwehttam from:
apaton (9th December 2009)
9th December 2009, 10:27 AM #6
I like this method, Just tried in on my Ubuntu 9.10Server (VirtualBox) and it worked a treat!!
Originally Posted by llawwehttam
By Jonny_sims in forum Windows
Last Post: 26th September 2011, 10:12 PM
By matte53 in forum O/S Deployment
Last Post: 13th October 2009, 09:27 PM
By DreddMetal in forum MIS Systems
Last Post: 27th April 2009, 08:34 PM
By linkazoid in forum Windows
Last Post: 16th May 2008, 02:27 PM
By fafster in forum Windows
Last Post: 27th February 2008, 10:01 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)