User Management
Manage user account in windows
To manage user accounts in Windows, you can use the built-in tools provided by the operating system. Here's a guide on how to do it:
-
Open User Accounts Settings:
- Press
Windows Key + R
to open the Run dialog. - Type
control userpasswords2
and press Enter. - This will open the User Accounts window.
- Press
-
Add a New User Account:
- In the User Accounts window, click on "Add...".
- Follow the prompts to create a new user account.
- You can set the user's name, password, and account type (Standard or Administrator).
-
Modify an Existing User Account:
- In the User Accounts window, select the user account you want to modify.
- Click on "Properties".
- Here you can change the user's name, password, and account type.
-
Delete a User Account:
- In the User Accounts window, select the user account you want to delete.
- Click on "Delete...".
- Follow the prompts to confirm the deletion.
-
Change an Account Type:
- In the User Accounts window, select the user account whose type you want to change.
- Click on "Properties".
- Under the "Group Membership" tab, you can change the account type between Standard and Administrator.
-
Command Line Management:
- You can also manage user accounts via the command line using
net user
commands. For example:net user username password /add
to add a new user.net user username /delete
to delete a user.net localgroup Administrators username /add
to add a user to the Administrators group.
- You can also manage user accounts via the command line using
-
Local Users and Groups (for Professional and Enterprise editions):
- For more advanced user management, you can use the Local Users and Groups tool.
- Press
Windows Key + R
to open the Run dialog. - Type
lusrmgr.msc
and press Enter. - This will open the Local Users and Groups management console where you can manage users and groups more extensively.
Manage user account in windows
Managing user accounts in Linux can be done through various command-line tools and configuration files. Here's a basic guide on how to manage user accounts in Linux:
-
Add a New User:
- You can add a new user using the
adduser
oruseradd
command:This command will prompt you to set a password and provide additional information about the user.sudo adduser username
- You can add a new user using the
-
Delete a User:
- To delete a user, you can use the
userdel
command:You can also use thesudo userdel username
deluser
command, which removes the user's home directory and mail spool:sudo deluser --remove-home username
- To delete a user, you can use the
-
Modify User Properties:
- You can modify user properties using the
usermod
command. For example, to change a user's primary group:To change the username itself, you would need to use thesudo usermod -g newgroup username
usermod
command along withusermod -l newusername oldusername
.
- You can modify user properties using the
-
Change User Password:
- You can change a user's password using the
passwd
command:This command will prompt you to enter the new password for the specified user.sudo passwd username
- You can change a user's password using the
-
View User Information:
- To view information about a specific user, you can use the
id
command:This command will display the user's UID (User ID), GID (Group ID), and supplementary groups.id username
- To view information about a specific user, you can use the
-
Grant Sudo Privileges:
- To grant sudo privileges to a user, you can add the user to the
sudo
orwheel
group. This allows them to execute commands with superuser privileges.orsudo usermod -aG sudo username
After adding the user to thesudo usermod -aG wheel username
sudo
orwheel
group, they will need to log out and log back in for the changes to take effect.
- To grant sudo privileges to a user, you can add the user to the