| 1 | = User Management for Provisioned Nodes = |
| 2 | Managing users on the nodes requires generally 2 stages. The first is making sure the users home directory and environment is present on the nodes. The second is getting the users credentials and user information to the nodes. |
| 3 | |
| 4 | == User's environments == |
| 5 | This requires the home directory of the user(s) in question to be shared to the nodes. NFS is a typical solution for this, but because there are so many methods and variables for doing this we will make the assumption you have already done this in a manner that works for your environment. |
| 6 | |
| 7 | Once the user's home directory is present on the nodes, enabling passwordless ssh is as easy as generating a ssh keypair without a passphrase, and copying the public key to authorized_keys for each user as follows: |
| 8 | |
| 9 | {{{ |
| 10 | $ ssh-keygen |
| 11 | $ cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys |
| 12 | }}} |
| 13 | |
| 14 | == User credentials == |
| 15 | Managing users with the ''File'' Warewulf interface can be done as follows: |
| 16 | |
| 17 | {{{ |
| 18 | $ sudo su - |
| 19 | # wwsh file import /etc/passwd |
| 20 | # wwsh file import /etc/group |
| 21 | # wwsh provision set --fileadd passwd,group |
| 22 | }}} |
| 23 | |
| 24 | This will cause all nodes to have these two files provisioned when the boot, and updated within 5 minutes. |
| 25 | |
| 26 | Whenever updates are made to the password file (e.g. a user is added) to update the files within Warewulf, you must run: |
| 27 | |
| 28 | {{{ |
| 29 | $ sudo wwsh file sync |
| 30 | }}} |