Software Archive
Read-only legacy content
17060 Discussions

New user in MIC cluster

Bsc_Cns
Novice
448 Views

Hello,

We have a small MIC cluster and we are trying to add a new user to the system without rebooting the mpss service, is it possible? I have done all the steps needed but the user is not able to log in, here is what I do:

host# mkdir -p /home/user
host# sudo -u username ssh-keygen -P ""
host# cat /home/user/.ssh/id_rsa.pub > /home/user/.ssh/authorized_keys
host# chown -R uid.gid /home/user

$PASSWD <- user's /etc/passwd entry in the host
$SHADOW <- user's /etc/shadow entry in the host

host# ssh mic0 echo $PASSWD >> /etc/passwd
host# ssh mic0 echo $SHADOW >> /etc/shadow

host# ssh root@mic0
(/home is exported via NFS in the host)
root@mic0 # ls /home/user/.ssh/
authorized_keys config id_rsa id_rsa.pub known_hosts

Everything seems ok but the user cannot login.

user@host $ ssh mic0
Warning: Permanently added 'mic0,ip' (RSA) to the list of known hosts.
user@mic0's password:

Thank you in advance.

0 Kudos
5 Replies
Frances_R_Intel
Employee
448 Views

Did the user set a passphrase when he created his ssh key? If so have him go back and generate one without a passphrase. That will keep the coprocessor from asking for a passwd which can be problematic.

0 Kudos
Bsc_Cns
Novice
448 Views

Hi Frances,

Thanks for the answer. No, I did not set any passphrase for the user's keys. Is it possible to create a user in the coprocessor without having to restart the mpss for changes to take effect?

0 Kudos
Frances_R_Intel
Employee
448 Views

As far as I can see, what you did should have worked. But I have been playing with this myself and having the same problem. I will need to look at this some more.

0 Kudos
Frances_R_Intel
Employee
448 Views

Alright, it is working for me. (I had accidentally put the .ssh directory in the wrong location.) I followed your basic outline except that:

  • I created the user directory on the host at the same time as I ran useradd to create the user there.
  • I needed to create the directory on the coprocessor by hand - we are not NFS mounting the home directories on the machine I was using - and copied all the files over.
  • I needed to add a new entry to the /etc/group file on the coprocessor in addition to the /etc/passwd and /etc/shadow file and change the default shell for the user in /etc/passwd because the default I used on the host was not available on the coprocessor.

So, I am at a loss to explain why it didn't work for you. Did you try ssh-ing to the coprocessor as root and then su-ing to the new user to make sure there wasn't any miscopies or lost files along the way?

0 Kudos
Bsc_Cns
Novice
448 Views

Thank you again Frances! It was the default shell... sorry about that :(

0 Kudos
Reply