Lando Posted October 16, 2006 Report Share Posted October 16, 2006 I had problems with my user name so I've deleted the user login account using the command "userdel -r myname"... Then I've tried the "adduser myname" (so I'll have a cleaner user situation)...and I get "the user already exist...." I've read that after a userdel I've to delete this user name in some hidden places...Is there a guide to search these places ? Thanks a lot. Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 16, 2006 Report Share Posted October 16, 2006 The first thing is do you weant to delete the home dir? (you don't have to and you can even just rename it and then copy stuff later...) /etc/passwd and /etc/group and /etc/shadow are the likely places Just remove that user name ... then recreate.... Quote Link to comment Share on other sites More sharing options...
Lando Posted October 16, 2006 Author Report Share Posted October 16, 2006 The first thing is do you weant to delete the home dir? (you don't have to and you can even just rename it and then copy stuff later...) yes, userdel -r usrname ....delete it. /etc/passwd and /etc/group and /etc/shadow are the likely placesJust remove that user name ... then recreate.... the usrname is already missing in these files.... Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 16, 2006 Report Share Posted October 16, 2006 I don't know of any "hidden" places. I'd say post the contents of /etc/passwd and /etc/group but that means we'd know all the users on your system. I'd suggest doing: userdel username again. It should definitely not exist, and you can then just run useradd again after this. I don't know why you seem to have a problem if it doesn't exist in /etc/passwd. But re-run it again to make sure. Quote Link to comment Share on other sites More sharing options...
arctic Posted October 16, 2006 Report Share Posted October 16, 2006 Hmm... just out of curiosity: Why haven't you used the MCC for adding/removing users? Quote Link to comment Share on other sites More sharing options...
Gowator Posted October 16, 2006 Report Share Posted October 16, 2006 (edited) Hmm... just out of curiosity: Why haven't you used the MCC for adding/removing users? Well I'm presuming his user was screwed up and wouldn't log into X but its a bit academic really since useradd and userdel are the correct way to add/remove users... but also how would he do this? Log in as root or log in as the user he was trying to delete? However userdel shouldn't delete the home directory or mail spool entries without the -r option being specified .... However if it was then presumably it has left the spool dir ? or perhaps some zombie processes are syill running? This can happen with the -f option (which also deletes home and spool BUT will do so wether the user is logged in or not...) anyway. run a ps -ef and look for processes with a UID instead of a user name....(probably 500) Edited October 16, 2006 by Gowator Quote Link to comment Share on other sites More sharing options...
Lando Posted October 16, 2006 Author Report Share Posted October 16, 2006 (edited) The remove / add has worked in MCC ! (Though the user entry displayed in MCC was correct I got access denied when I logged in ) . Many thanks to all of you ( I hope this expression be correct :..). Edited October 16, 2006 by Lando Quote Link to comment Share on other sites More sharing options...
arctic Posted October 16, 2006 Report Share Posted October 16, 2006 Well I'm presuming his user was screwed up and wouldn't log into X but its a bit academic really since useradd and userdel are the correct way to add/remove users... but also how would he do this? Log in as root or log in as the user he was trying to delete?In case he has only one user, then: press ctrl+alt+F1, log in as root, type "mcc" and use the interface. When everything's finished, press ctrl+alt+F7. Quite easy, eh? ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.