• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Linux Add user problem

bepejet

Member
I have delete an account on the linux. But I cannot add a user with the same user name which is the same as the one I deleted. I know the old one has been marked somewhere in linux file. But I don't know how to get it, and make it work.
Any one has any advise? Thanks
 
How did you delete the user? userdel usually does it. If you just blew away their home directory then the user still has an entry in /etc/passwd. I would try userdel <username> if that doesn't work then see if you can delete the entry from the /etc/passwd file.
 
I just use userdel.. it delete the user. but I can not add another user with same name. There should be a way to do it. I want to learn it. Please anymore suggestions?
 
Do a &quot;grep <username> *&quot; in the /etc directory and see where else it might be. When you find it, delete it and you should be able to re-add the new account. Regards
 


<< Do a &quot;grep <username> *&quot; in the /etc directory and see where else it might be >>


Err...grep the username from the /etc directory? I'm not quite sure what you're after there but I don't see what that would accomplish. If you want to grep for something then grep <username> /etc/passwd, but not in the entire directory.

To remove the ex-users former /home directory it should be as simple as rm -rf /home/<username>.

Now, for GOD's be very careful, VERYcareful whenever issuing a rm -rf because it will wipe everything, recursive, without asking.

I'll never forget the day I witnessed a dumbass issue rm -rf /. I tried to stop it but the fsking command had already wiped the kill command, so there wasn't much I could do at that point.
 
I did grep <username>.. the computer just keep run without answering.
Well, certainly I did remove the user director under /home.
But still I can't add it back again.
I think there is a file that contains the ids that have been generated everytime I add a user or delete a user.
I think the user would be delete from the systme login, but not for the file. It's one of those prevent reuse of deleted names. But I don't need this feature at home. And I want to figure out away of adding the name that I delete.
Help?

 
Of course it's going to sit there if you just do grep <username> it's waiting for you to tell it where (e.g. what file to grep from).

Did you grep <username> /etc/passwd?
 
Back
Top