Delete current user and dir, adding new user
I would like to create a new normal user and delete the current normal user along with its files.
This operation I do as root I know. I think the code would be: sudo useradd [newusername] sudo userdel -r [currentusername] Is this the correct position for the -r? I assume options like -r go after the command userdel but before the username? Any help appreciated. |
Yes, usually, it is options before the arguments. Many commands just don't care. Others do. Play it safe and do it just as you have it here.
|
In LinuxMint, look for Users and Groups in the menu.
|
1 Attachment(s)
Quote:
screenshot attached I want to delete this user and add a new one. I assume the new username will belong to all the same groups, since I did nothing to groups configuration. If I can't delete the user in the graphical interface, I am back to using the terminal. |
[/COLOR]
Quote:
Add your new user using the add+ item. Then highlight the old one and use delete to erase it. Not sure about the files but they can be removed through File Manager. Robert Robert |
1 Attachment(s)
I just tried the command through the terminal and got the following response. since the response is to the username I tried to delete, I guess it means I was unsuccessful.
The response gives me usage code, but none of them seem to contradict or help what I wanted to do. If this does not work, I will try delete both user and files through the graphical interface. screenshot attached. |
Quote:
The first username is the one I created when I installed Linux Mint. It is administrative. This may be the reason it cannot be deleted. I may have to remove administrative status from that username --sonylinux--before I can delete it. Nope, I just deleted admin from the groups the first username has but still cannot delete the username. |
Well, if you'd actually told sudo to fire the userdel cmd ... ;)
|
All times are GMT -5. The time now is 04:00 PM. |