Well, after a fair amount of hassle, I've worked out how to get root access to the hard disk on the system I have installed xubuntu 11.10 but the main account password is broken.
You boot the "Live CD" system and you can then mount the disk and use sudo to become root.
So, I can edit /etc/passwd and I can edit /etc/shadow but removing the password field from my main/default user in the /etc/shadow file *still* doesn't allow me to login. Grrrrr!!!
What are the requisites for a login to have no password? I thought it was a 'x' in the password field in /etc/passwd and nothing in the password field in /etc/shadow but that seems not to work.
On 17/12/11 13:30, Chris Green wrote:
What are the requisites for a login to have no password? I thought it was a 'x' in the password field in /etc/passwd and nothing in the password field in /etc/shadow but that seems not to work.
Hmm I would have thought that should have worked...you did a clean unmount of the filesystem after you changed it no ?
If all else fails you could always "borrow" the hash of a known password on another system :D
On 17/12/11 13:30, Chris Green wrote:
Well, after a fair amount of hassle, I've worked out how to get root access to the hard disk on the system I have installed xubuntu 11.10 but the main account password is broken.
You boot the "Live CD" system and you can then mount the disk and use sudo to become root.
So, I can edit /etc/passwd and I can edit /etc/shadow but removing the password field from my main/default user in the /etc/shadow file *still* doesn't allow me to login. Grrrrr!!!
What are the requisites for a login to have no password? I thought it was a 'x' in the password field in /etc/passwd and nothing in the password field in /etc/shadow but that seems not to work.
I would have thought to set no password for user xxx you would run
sudo passwd -d xxx
or have I missed something?
Nev
On Sat, Dec 17, 2011 at 04:02:49PM +0000, nev young wrote:
On 17/12/11 13:30, Chris Green wrote:
Well, after a fair amount of hassle, I've worked out how to get root access to the hard disk on the system I have installed xubuntu 11.10 but the main account password is broken.
You boot the "Live CD" system and you can then mount the disk and use sudo to become root.
So, I can edit /etc/passwd and I can edit /etc/shadow but removing the password field from my main/default user in the /etc/shadow file *still* doesn't allow me to login. Grrrrr!!!
What are the requisites for a login to have no password? I thought it was a 'x' in the password field in /etc/passwd and nothing in the password field in /etc/shadow but that seems not to work.
I would have thought to set no password for user xxx you would run
sudo passwd -d xxx
or have I missed something?
Yes, the password file I'm editing isn't the system's password file so the passwd command won't do anything to it.
After a little hunting about I found the neatest solution - when running the Live CD you do the following:-
sudo mount /dev/sda1 /mnt sudo chroot /mnt sudo passwd <whatever you need to do>
So then the passwd command *does* apply to the files on /dev/sda1.
I have now sorted things and can log in (and sudo with) the main user on the system.