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

Was this helpful?