Q. I made a mess with my Linux and now it asks me a password at start-up which I don't know. Is there any method to regain my Linux ?
A. Welp, yes, it's a bit trixy, but it WILL work.
Do NOT |#u(K this up though.
Go ahead a boot up a live CD, it should mount your hard disk, so you can see files in it. I believe with an Ubuntu live it will be mounted /media/hda but look around, you'll find it.
anyway once you find your drive, you can directly edit the the /etc/passwd file.
Now, you need to understand what it is you are editing, and what to do, because if you pooch it... well, it's pooched then isn't it?
You are going to replace the x in the line that corresponds to your username, with a new password. The x stands for "use an encrypted password from /etc/shadow" we are going to tell the computer to use a non encrypted password. So open up a terminal, and hit it with;
sudo nano /media/hdb/etc/passwd
(path might be different depending on how the HDD mounted)
find the line about your username. It'll look like this:
elizabeth:x:1000:1000:
elizabeth,,,:/home/elizabeth:
/bin/bash
That will all be on one line but Y!A has issues...
what you want to do is replace the first x with a short easy to remember password, (at least 6 letters though) and change NOTHING ELSE about the file.
elizabeth:mypass:1000:1000:
elizabeth,,,:/home/elizabeth
/bin/bash
we changed the x to mypass.
now save the file: (ctrl +x, Yes, Enter)
and reboot the machine. (not to the live CD)
you should be able to get in now with your user name, and the password you changed to.
Once you are in, you should really
sudo su yourself, and change the password back to an x
in /etc/passwd
then while still in su issue the command :
passwd myusername
(obviously replace this with your real user name)
and enter a new password twice.
Now you are back to being encrypted, AND you know your password. YAY!
Do NOT |#u(K this up though.
Go ahead a boot up a live CD, it should mount your hard disk, so you can see files in it. I believe with an Ubuntu live it will be mounted /media/hda but look around, you'll find it.
anyway once you find your drive, you can directly edit the the /etc/passwd file.
Now, you need to understand what it is you are editing, and what to do, because if you pooch it... well, it's pooched then isn't it?
You are going to replace the x in the line that corresponds to your username, with a new password. The x stands for "use an encrypted password from /etc/shadow" we are going to tell the computer to use a non encrypted password. So open up a terminal, and hit it with;
sudo nano /media/hdb/etc/passwd
(path might be different depending on how the HDD mounted)
find the line about your username. It'll look like this:
elizabeth:x:1000:1000:
elizabeth,,,:/home/elizabeth:
/bin/bash
That will all be on one line but Y!A has issues...
what you want to do is replace the first x with a short easy to remember password, (at least 6 letters though) and change NOTHING ELSE about the file.
elizabeth:mypass:1000:1000:
elizabeth,,,:/home/elizabeth
/bin/bash
we changed the x to mypass.
now save the file: (ctrl +x, Yes, Enter)
and reboot the machine. (not to the live CD)
you should be able to get in now with your user name, and the password you changed to.
Once you are in, you should really
sudo su yourself, and change the password back to an x
in /etc/passwd
then while still in su issue the command :
passwd myusername
(obviously replace this with your real user name)
and enter a new password twice.
Now you are back to being encrypted, AND you know your password. YAY!
How can I tell if my Linux install is in its own partition?
Q. I have a Gateway netbook with Windows 7 starter. I installed the Ubuntu 10 version of Linux. But I don't think it installed on it's its own partition, because it never asked me about the size or anything of a partition or which partition to use. So, I followed some instructions on the internet to put Linux on its own partition, but how do I know its really on there?
A. It did, but if it will make you feel better, do this:
Boot into Linux.
Open a console shell
Type 'df -h'
The partitions will be displayed. The information on the right will tell you the mount point. The one marked '/host' will be the windows partition. On the left the host partition will be /dev/sda1. All the rest are you Linux partitions.
If you want to know more about /dev/sda1, type 'fdisk -l' (be careful with fdisk).
Boot into Linux.
Open a console shell
Type 'df -h'
The partitions will be displayed. The information on the right will tell you the mount point. The one marked '/host' will be the windows partition. On the left the host partition will be /dev/sda1. All the rest are you Linux partitions.
If you want to know more about /dev/sda1, type 'fdisk -l' (be careful with fdisk).
How do you determine what Linux file system your using?
Q. When you log onto a Linux system and get to the command prompt, how can you determine which of the many file systems supported in Linux you are using? Is there a command that will identify it?
A. Use fsck with the N option which just show what would have been done, but also show you what type of filesystem it is.
fsck -N /dev/(device-name)
e.g.
fsck -N /dev/hdc2
The 'mount' command wont help if the filesystem isn't mounted, and looking in /etc/fstab wont help because you cant be sure that information can be trusted.
fsck -N /dev/(device-name)
e.g.
fsck -N /dev/hdc2
The 'mount' command wont help if the filesystem isn't mounted, and looking in /etc/fstab wont help because you cant be sure that information can be trusted.
Powered by Yahoo! Answers
No comments:
Post a Comment