After creating the user for me. I noticed that after logging into it, I could not even execute ls or pwd commands. There were a couple for problems here I think, I did the following things to get things working:
1- Make my user a sudoer. Did this by editing /etc/sudoers file. Added the following line,
bhushit ALL=(ALL) ALL
After this I was able to execute commands using sudo (eg. sudo ls) but still not able to execute regular commands. So I added my user to pi group
4- Authorizing self (sounds dumb but used to ssh after nfs is mounting /home on workers)
cd ./.ssh/
cat id_rsa.pub > authorized_keys
5- Password-less ssh from myUser
#Copy public key of my_user to home of worker pi
sftp pi@work1
put ./.ssh/id_rsa.pub
exit
#Cat and remove the copied public key of _myUser_
ssh pi@work1
cat id_rsa.pub >> ./.ssh/authorized_keys
rm id_rsa.pub
exit
#Test
ssh pi@work1
I think you guys will have to repeat the above steps or something better & similar.
I am not sure if we have to create users on the workers too.
Update: I think the step two is not required. The mistake I was doings is that I was running the command as
sudo su bhushit from user pi whereas I should be running sudo su - bhushit
After creating the user for me. I noticed that after logging into it, I could not even execute
ls
orpwd
commands. There were a couple for problems here I think, I did the following things to get things working:1- Make my user a sudoer. Did this by editing
/etc/sudoers
file. Added the following line,After this I was able to execute commands using sudo (eg. sudo ls) but still not able to execute regular commands. So I added my user to
pi
group2- Add myUser to
pi
group,3- Now generating the ssh-key,
4- Authorizing self (sounds dumb but used to ssh after nfs is mounting /home on workers)
5- Password-less ssh from myUser
I think you guys will have to repeat the above steps or something better & similar.
I am not sure if we have to create users on the workers too.