Create admin user from command line



As an IT administrator, you may need to create an Admin user from the command line. This can be done in several ways, depending on the operating system and the privileges you have been granted.

The first step when creating an admin user from the command line is to determine the operating system you are using. On Windows systems, you will need to open a command prompt and type the following: net user /add [username] [password] /add. This command will create a new user with the desired username and password. To set the user as an admin, you can use the command: net localgroup Administrators [username] /add.

On Linux systems, the process is slightly different. First, you need to open a terminal and enter the command: sudo useradd -G admin [username] -m. This command adds a user with the desired username to the admin group. Then, you can set the user's password by entering the command: sudo passwd [username].

For Mac systems, the process is slightly different again. This time, you will need to open a terminal window and enter the command: sudo dscl . -create [path/to/user] User Shell [username]. This command creates a user with the desired username. Then, you can set the user's password by entering the command: sudo dscl . -passwd [path/to/user] [password].

Finally, if you are using a virtual machine such as VirtualBox, you can create an admin user from the command line by using the command: VBoxManage user add [username] --admin. This command will create a new user with the desired username and set it as an admin.

Creating an admin user from the command line can be a useful tool for IT administrators. It can be used to quickly add new users to a system without having to manually enter information into a graphical user interface. By following the steps outlined above, you should be able to quickly create a new user with the desired username and password.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo