UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have a Ubuntu server box installed by someone i know and only a root user is created on it. He nearly showed me the root password by showing the keyboard but im not able login. I own the box but cant reach the person who installed so i need to find /hack/change etc the password. I did on some Fedora boxes for a long time but cant remember how to on Ubuntu.
Thanks for the answer i sometimes forget this simple thing. I have booted the server with the Knoppix 5.1.1 CD, but it couldnt find and mount the harddisk of the server, though it found and automaticly founded and mount the usb stick. I opened the Qparted and saw there /dev/cciss/c0d0 ...d1 ..d2 etc entiries . So i made a directory called disk with mkdir and used mount /dev/dev/cciss/c0d0,1,2,3 whatever to /mnt/disk but it always said that there is no such device. Its HP server box , so how can i find the root parition and mount it?
If the boot process is via grub, you should be able to interrupt the process at the menu, hit escape to edit, select the entry you'd normally boot, hit e to edit, add "single" without the quotes at the end of the kernel line, then b to boot.
That should drop you in the shell and allow you to edit shadow. I haven't tried it on Ubuntu though, so no guarantee. Keys from memory too!!!
If you can boot into single-user mode, all you have to do is enter "passwd root".
Surprising to see a Ubuntu system with ONLY a root account. They normally start with an "Alpha user" who has full admin privileges, and NO root account. If the alpha user tries to do something, they are asked for THEIR password and not root's.
I opened the Qparted and saw there /dev/cciss/c0d0 ...d1 ..d2 etc entiries . So i made a directory called disk with mkdir and used mount /dev/dev/cciss/c0d0,1,2,3 whatever to /mnt/disk but it always said that there is no such device.
If you really entered 'mount /dev/dev/cciss/c0d0,1,2,3' then you should only use one instance of /dev . . . eg 'mount /dev/cciss/c0d1'
The easiest way I can think of to figure it out is to open the device with cfdisk and figure out which one it is by the size of the partition.
If you use sudo to gain root privileges, and do not have the root account enabled (which is not recommended in Ubuntu anyway), then here is how to reset your password: http://www.psychocats.net/ubuntu/resetpassword
I still have a problem to get my passwords right, here is my problem:
My laptop is Dell Inspiron Mini (this means no CD, floppy, etc. and I have no external HDD). Ubuntu automatically logs in with user account (user1). During installation password was entered but not remembered and now I can not recall it. It would be no problem to do password reset with recovery mode, but I can not access GRUB. After computer start screen, I see MBR letters flashing and after that Ubuntu splash screen appears loading system. If I press ESC in any other moment before Ubuntu loading I have this on screen: "MBR 2FA:" (pressing 1 at this moment enters system testing mode).
I need help with solutions I can think of:
1. How can I find what is the password of User1 (I am already logged in).
I think it should be easiest way, but I dont know where to look.
2. How can I set up GRUB to make it accessible on boot?
Actually, is it GRUB or other boot loader, how can I check?
3. Any other way?
Re-install is very problematic and I hope to avoid it
1. How can I find what is the password of User1 (I am already logged in).
I don't think that is possible.
Quote:
Originally Posted by Doinkxs
2. How can I set up GRUB to make it accessible on boot?
Actually, is it GRUB or other boot loader, how can I check?
Ubuntu uses grub. Hitting the Esc during boot before Ubuntu starts to load should display the grub menu. I don't why it does not in your case.
To make the grub menu visible when you boot, open /boot/grub/menu.lst using gedit text editor with gksudo like this:
Code:
gksudo gedit /boot/grub/menu.lst
This will open menu.lst in the gedit text editor with sudo privileges. Scroll down to this section:
Code:
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
Put a comment (#) in front of the word hiddenmenu that I have in bold there. Then save and exit. Then when you reboot the grub menu should be visable on boot. http://members.iinet.net.au/~herman5...ml#hidethemenu
Also, right above the hiddenmenu section there is the timeout section:
Quote:
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
Make sure the timeout is set to 10, so you have time to select recovery mode when Ubuntu boots.
Then boot Ubuntu and select recovery mode from the grub menu and reset the super user password as per this article: http://www.psychocats.net/ubuntu/resetpassword
To edit menu.lst you will need sudo privileges, which requires the password. If you are asked for the root password when you run gksudo gedit and don't know it, this will be a problem. In that case boot from a live CD, mount your Ubuntu partition and cd into /mnt/boot/grub/ and edit menu.lst, Then reboot into recovery mode.
About GRUB you are hundred percent right. I can open /boot/grub/menu.lst and see that timeout is 0 and hiddenmenu is on. That is why I do not see menu. Unfortunately, I am asked for 'your' password , which I do know and I am unable to edit this file.
This 'your' password is only user1 password or you can enter root password as well (if it is enabled)? How can I check if root is enabled or not?
I have no CD drive or other device), but biggest stick I have at the moment is 256 MB, is there any option how can I boot from such small stick and than mount Ubuntu partition and edit this file?
I can open /boot/grub/menu.lst and see that timeout is 0 and hiddenmenu is on. That is why I do not see menu.
First, try hitting the Esc as soon as you push the power button to turn on the computer. Since the timeout in grub is 0, you will have to be really quick with the Esc key. If you can catch it fast enough you may be able to get into the grub menu and choose recovery mode.
Quote:
Originally Posted by Doinkxs
I have no CD drive or other device), but biggest stick I have at the moment is 256 MB, is there any option how can I boot from such small stick and than mount Ubuntu partition and edit this file?
You can use UNetbootin to create a bootable usb stick that you can use to boot into like a live CD. You should then be able to edit the grub menu once you mount your root partition. http://unetbootin.sourceforge.net/
A 256mb usb stick is not big enough for Ubuntu. UNetbootin supports a number of mini distros like Puppy, DSL, and SliTaz. All of those should fit on the 256mb usb stick.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.