Personally I would have tried and fixed the "corrupted" userID before I
would have deleted the user.  That should always be the very last option
when all else fails.  But at this point it's a bit late for that huh? :0)

Never go through an just vi /etc/passwd, or whatever editor you use.
Learn basic movements in vi and use the command vipw.  It's a command
that all *nix systems.  It will edit the /etc/passwd and then make sure
it's propigated to /etc/passwd.master, or whatever the system decides to
call that database.

>From there delete the line that contains the userID.  Then use vigr and
remove the line with the userID there as well.  It will do the same thing
about updating /etc/group.

>From there change the permissions to the /home directories.  I'm assuming
you'd like to keep those.  Change them to root. chown root:root -R
/home/$USER.

Then create the user using adduser.  The syntax would look like adduser
userID.  Set the passwd, and then change the permissions to the home
directory.  chown userID:userID -r /home/$USER.  From there make sure
everything in the directory is owned by the "NEW" userID. 

Now su - userID.  Make sure you can move through, run a few commands and
make sure you don't have .*rc files that don't have access to things like
/tmp or something like that.

Make sure you correct all those issues and then login.  It's a bit of
work around, but at this point it appears to be the only way you can
really accomplish what you want here.

Hopefully that leads you in a better direction.
tdh

--
T. Holmes
-----------------
UNIXTECHS.org
[EMAIL PROTECTED]
-----------------
"Real Men Use Vi!"

Uptime:
  --------------------------------------------------------------------
  9:07am  up 4 days,  9:34,  8 users,  load average: 0.00, 0.00, 0.00
  --------------------------------------------------------------------
| Hi,
| I am trying to delete a user account (mine) which got corrupted.
| userconf gave an error, so I deleted manually every thing I could find
| relating to this account (in retrospect, probably a mistake)
| Now when I go to  recreate the account (adduser cj) I get vipn
| lockfile (etc/ptmp) is present.
| I mchecked that file, but it doesn't appear to have any reference to
| the account.
| Any suggestions on how I can fix this ?
| 
| ================================================================
| Colin Jenkins
| ICQ: 650611  Voice: +61 97351410 Mob: 0409196144
| "You can't get the wood, you know." --Minni Bannister
| ================================================================  
| 
  ------------------------------------------------------------------ 

Reply via email to