The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to Single user mode? gkreddy UNIX for Dummies Questions & Answers 1 10-25-2007 10:31 PM
single user mode kekanap UNIX for Advanced & Expert Users 5 07-29-2005 09:06 AM
single user mode - user accounts passwords orestis UNIX for Dummies Questions & Answers 2 03-09-2005 06:54 AM
single-user mode zorro81 UNIX for Dummies Questions & Answers 2 04-06-2002 04:10 PM
Single user mode merlin UNIX for Dummies Questions & Answers 2 01-15-2002 07:48 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-12-2001
guest100's Avatar
Banned
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
single user mode

Hi all,

why "vi" acts differently is single user mode?
Does anyone help ?
I am using "x" to delete and it keeps messing up.
Please help

Thanks
Forum Sponsor
  #2  
Old 12-12-2001
LivinFree's Avatar
Goober Extraordinaire
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Hmm... is your terminal defined correctly? That's the first thing that popped in my mind...

Another way to do it is with ed / ex. The following is courtesy of "Unix Hints and Hacks":
Code:
># cp /etc/passwd /etc/passwd.bak

># ed /etc/passwd
1p
s/:.............:/::/
1p
w
q
>#
This will make a backup of the passwd file, just in case. Then, edit it, go to and print the first line, then substitute the first occurance of a 13-character field to a zero character field (there HAS to be 13 "."'s in there). Then it should print again, just to make sure, then write the file out, then quit.

After this, you should be able to log in without any problems and change the passwd.

NOTE: This will only work with "traditionally" crypt'd passwords. They have 13 characters in the password field.
  #3  
Old 12-12-2001
guest100's Avatar
Banned
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
Thanks LivinFree
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0