Difference between revisions of "Users and Groups"

From wiki
Jump to: navigation, search
(Users)
Line 17: Line 17:
 
Then setup an ssh key for logging into the nodes.
 
Then setup an ssh key for logging into the nodes.
  
Login a user and execute
+
Then, as root user, login a user via
 +
su - <newuserid>
 +
 
 +
and execute
 
  ssh-keygen
 
  ssh-keygen
 +
 
and just accept all the suggestions.
 
and just accept all the suggestions.
 
  .ssh/id_rsa and .ssh/id_rsa.pub, then get created.
 
  .ssh/id_rsa and .ssh/id_rsa.pub, then get created.
 +
 
then
 
then
 
  cp .ssh/id_rsa.pub .ssh/authorized_keys
 
  cp .ssh/id_rsa.pub .ssh/authorized_keys
 +
 
and
 
and
 
  chmod 600 .ssh/authorized_keys
 
  chmod 600 .ssh/authorized_keys
then ssh node1 should log in to node1 without password.
+
 
 +
then ssh node1 should log in to node1 without password (no need to test other nodes).
  
 
==Groups==
 
==Groups==

Revision as of 14:06, 29 January 2018

Introduction

Some, though not all, of the tips here are for setting up users and groups.

The tool of choice is smbldap.

Usage

Users

  • To create a new user(s)

Root has a script in bin/creasu.sh, so as root:

sh bin/creasu.sh <user> <user1> <user2>

will create groups, accounts, home folder and all relevant files into the new home folder. Then you need to setup passwords with:

smbldap-passwd <user>

for each of the users.

Then setup an ssh key for logging into the nodes.

Then, as root user, login a user via

su - <newuserid>

and execute

ssh-keygen

and just accept all the suggestions.

.ssh/id_rsa and .ssh/id_rsa.pub, then get created.

then

cp .ssh/id_rsa.pub .ssh/authorized_keys

and

chmod 600 .ssh/authorized_keys

then ssh node1 should log in to node1 without password (no need to test other nodes).

Groups

  • To create a new group
smbldap-groupadd -a <newgrpname>
  • To add users to a certain group (note that this seems to take some time to propagate, as well as only working on fresh logins)
smbldap-groupmod -m <list,of,users> <targetgroup>