Adding a user in Ubuntu environment
Adding a user in Ubuntu environment
Login too Ubuntu environment as sudo user.
sudo -i
1) adduser newuser
this will ask a series of questions about user details, password. etc.
2) we need to create a directory for him to add his key :
mkdir -p /home/yatish/.ssh
touch /home/yatish/.ssh/authorized_keys
If you wish to add the user as sudo user then :
usermod -aG sudo yatish
3) add user's public key in authorized_keys folder :
vi /home/yatish/.ssh/authorized_keys
Login too Ubuntu environment as sudo user.
sudo -i
1) adduser newuser
this will ask a series of questions about user details, password. etc.
2) we need to create a directory for him to add his key :
mkdir -p /home/yatish/.ssh
touch /home/yatish/.ssh/authorized_keys
If you wish to add the user as sudo user then :
usermod -aG sudo yatish
3) add user's public key in authorized_keys folder :
vi /home/yatish/.ssh/authorized_keys
Esc + : + wq
4) Ask user to login
Comments
Post a Comment