Window Managing User Accounts

in Linux 💻

Adding New User Accounts 🆕👤

To add a new user, we'll use the computer management tool. Under "Local Users and Groups", right-click and select "New User". 🖱️

Here, we'll set a username, full name, and a default password. Remember to check the "User must change password at next logon" box to ensure good password practices. 🔒

Let's create a new user account for Elizabeth. 💻

Deleting User Accounts 🗑️👤

To remove a user, right-click on their account and select "Delete". 🖱️

This will give a warning that user names are unique, and even if you delete the user and give them the same name, they won't be able to access their old resources. 🚫

Command Line User Management 💻🔤

You can also manage user accounts using the command line.

To add a new user using the net command, use the /add parameter:

net user andrea * /add

To flag the user's account to require a password change at next login, use the /logonpasswordchange:yes parameter:

net user andrea /logonpasswordchange:yes

You can combine these commands to create a new account that requires a password change on first login:

net user cesar "a password" /add /logonpasswordchg:yes

To delete a user account, use the /delete parameter:

net user andrea /delete

Alternatively, you can use the Remove-LocalUser PowerShell cmdlet to delete accounts:

Remove-LocalUser -Name Cesar

Remember, as you learn new CLI commands, you'll start to notice patterns that can help you discover and remember new ways to manage user accounts. 🤓💻

Managing User Accounts in Linux 👥💻

Adding New User Accounts 🆕👤

To add a new user in Linux, you can use the useradd command:

sudo useradd juan

This will set up the basic configurations for the user and create a home directory. 🏠

You can also combine this with the passwd command to make the user change their password on first login:

sudo useradd juan
sudo passwd juan

Deleting User Accounts 🗑️👤

To remove a user, you can use the userdel command:

sudo userdel juan

And just like that, the user is no longer on the list. 📜

Great work! 👏💻

Last updated