Table of Contents | ||
---|---|---|
|
Create administrator account
...
Login to the machine with the ece-li-admin account.
Add the new user account:
Code Block sudo adduser username<username> --disabled-password --gecos ""
Enter any relevant information for the user account.
Add the user to the sudo group:
Code Block sudo usermod -aG sudo username<username>
To test the new account, logout and log back in using the new user account.
...
Run
visudo
.Code Block sudo visudo
Find the sudo group entry. It will look like the following:
Code Block %sudo ALL=(ALL:ALL) ALL
Add a no-password rule:
Code Block your_username ALL=(ALL:ALL) NOPASSWD:ALL
If you wish to remove the sudo password requirement for all users:
Code Block %sudo ALL=(ALL:ALL) NOPASSWD:ALL
Exit
visudo
and save by pressingCTRL+X
, thenY
, and thenENTER
.
...
Create
~/.ssh/config
file.Code Block sudo nano ~/.ssh/config
Add entry for server. For example,
Code Block Host openedx-01 Hostname ece-openedx-01.eng.uwaterloo.ca User d24lau IdentityFile /Users/d24lau/.ssh/id_rsa_d24lau_01
Exit and save.
Load the key into the SSH Agent. For example,
Code Block sudo chmod 600 ~/.ssh/id_rsa_d24lau_01 ssh-add ~/.ssh/id_rsa_d24lau_01
Remove password
If an account was enabled with a password, but now the password is to be removed (i.e. for SSH key access only):
Code Block |
---|
sudo passwd -l <username> |