Go Back   Technibble Forums > Operating Systems > Linux

  Technibble Sponsor

Reply
 
Thread Tools Display Modes
  #1  
Old 04-27-2012, 12:32 AM
compnet compnet is offline
 
Join Date: Feb 2012
Posts: 757
compnet will become famous soon enough
Default reset ubuntu passwords

This one is killing me.. I've tried everything google has to offer to no avail..

I've tried;

booting to recovery = doesn't work because it has root password
booting to single user (replace ro with rw and add init=/bin/bash on kernel line) = Authentication token manipulation after passwd command and password is unchanged

so reading up on the token error, I tried mount -o, remount, rw / (also added -n) = same token error

Then tried booting from the live cd, and doing chown, and I'm getting the same token error..


The only thing I haven't tried is some googling mention comparing /etc/password and /etc/shadow, but the don't go into any detail of what to compare or how to actually do it..

I'm mostly a linux noob, about to throw in the towel..
Reply With Quote
  #2  
Old 04-27-2012, 01:36 PM
rjframe rjframe is offline
 
Join Date: Jan 2012
Location: Indiana
Posts: 236
rjframe will become famous soon enough
Default

Boot a livecd or slave the drive to another PC. Find and open /etc/shadow (make a copy first). It will have a list of entries that look something like this:

username:$6$QR3drPrQ$JLolPKyiVuXvea1F2IpbPx9F9PEV0 s/IGcNCpm6ZrBA6AFDvwHPQG7EsTQHuUqxfCvlsuKRb.O7w5RLPy j8nS/:15129:0:99999:7:::

The random-looking text between the first and second colons are your password. Find the user you want, then delete the password:

username::15129:0:99999:7:::

Reboot the PC.
__________________
I am not absentminded. It is the presence of mind that makes me unaware of everything else.

G.K. Chesterton
Reply With Quote
  #3  
Old 04-27-2012, 04:53 PM
iisjman07's Avatar
iisjman07 iisjman07 is offline
 
Join Date: Jul 2009
Location: South End Of The UK
Posts: 3,045
iisjman07 has a spectacular aura aboutiisjman07 has a spectacular aura about
Default

Quote:
Originally Posted by rjframe View Post
Boot a livecd or slave the drive to another PC. Find and open /etc/shadow (make a copy first). It will have a list of entries that look something like this:

username:$6$QR3drPrQ$JLolPKyiVuXvea1F2IpbPx9F9PEV0 s/IGcNCpm6ZrBA6AFDvwHPQG7EsTQHuUqxfCvlsuKRb.O7w5RLPy j8nS/:15129:0:99999:7:::

The random-looking text between the first and second colons are your password. Find the user you want, then delete the password:

username::15129:0:99999:7:::

Reboot the PC.
Nice tip, thanks for sharing
__________________
put that in your pipe and grep it
Reply With Quote
  #4  
Old 04-30-2012, 07:10 PM
compnet compnet is offline
 
Join Date: Feb 2012
Posts: 757
compnet will become famous soon enough
Default

Finally got back around to this one. there are 2 partitions, one has all the system files, the other has all the username folders. on the system partition there is no shadow folder or password folder in the /etc folder.

I'm just gonna give the computer back. I think the user either took measures to prevent normal password resetting procedures from working, or the install is somehow corrupt.. I've spent way too much time on this already.
Reply With Quote
  #5  
Old 04-30-2012, 09:21 PM
codegreen codegreen is online now
 
Join Date: Mar 2011
Location: New Brunswick, Canada
Posts: 1,317
codegreen is a jewel in the roughcodegreen is a jewel in the roughcodegreen is a jewel in the rough
Default

Quote:
Originally Posted by compnet View Post
Finally got back around to this one. there are 2 partitions, one has all the system files, the other has all the username folders. on the system partition there is no shadow folder or password folder in the /etc folder.
/etc/passwd (note the spelling) and /etc/shadow are not folders; they are text files. How did you look for the files? Did you boot from a livecd? If so, did you remember to mount the hard drive and look for the files there?
__________________
Stephen Gilbert

Code Green Technology:
Fredericton Computer Repair
Reply With Quote
  #6  
Old 04-30-2012, 09:40 PM
compnet compnet is offline
 
Join Date: Feb 2012
Posts: 757
compnet will become famous soon enough
Default

Quote:
Originally Posted by codegreen View Post
/etc/passwd (note the spelling) and /etc/shadow are not folders; they are text files. How did you look for the files? Did you boot from a livecd? If so, did you remember to mount the hard drive and look for the files there?
:facepalm:

Next problem, I don't have permissions to open the shadow file... Also, what would I open them with on an ubuntu live cd?? open office?


edit:
typing mount in terminal give me this for the partition I'm looking at

/dev/sda6 on /media/(hash) type ext2 ( rw,nosuid, no dev,uhelper=udisks)

Last edited by compnet; 04-30-2012 at 09:47 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:52 PM.


Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Technibble.com is based out of MELBOURNE, AUSTRALIA.