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?