Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for users

December 23, 2020

Adding New Users in Powershell

Here’s an easy way to add Windows users in Powershell.

net user username 'password' /add

net user username 'password' /add

Passwords must meet requirements. While you are at it, give it Admin rights.

net localgroup Administrators username /add

net localgroup Administrators username /add

July 7, 2019

Sudo With No Password

If you’re the only user on your system, you don’t need to be prompted every time you run the sudo command.

Add yourself to the sudoers file.

# create a new file
sudo visudo -f /etc/sudoers.d/users

# create a new file sudo visudo -f /etc/sudoers.d/users

Add this line.

# add your username
username ALL=(ALL) NOPASSWD:ALL

# add your username username ALL=(ALL) NOPASSWD:ALL

Exit and try again.

# exit out and login again
exit
# try to sudo again
sudo -i
# there's no password prompt for sudo this time

# exit out and login again exit # try to sudo again sudo -i # there's no password prompt for sudo this time

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021