Howto Import Users And Groups To UCS

How To Import Users And Groups To UCS

There is no import functionality build-in in UCS. You will have to script an import on your own. As some help to do so here are some basic steps you need to perform.

Note: Use the following as a rough sketch and fit it for your needs.

Option 1

Step 1

Create a csv file which i.e. contains usernames an further attributes:
john,doe,jdoe,jdoe@multi.ucs,password,Domain Users

Step 2

Read this file within you script and create the users through command line tool udm:

udm users/user create --ignore_exists \
  --superordinate cn=users,dc=internal,dc=mydomain,dc=de \
  --set overridePWHistory=1 \
  --set overridePWLength=1 \
  --set username=jdoe \
  --set uidNumber=12345 \
  --set firstname=Jane \
  --set lastname=Doe \
  --set unixhome=/home/jdoe \
  --set shell=/bin/bash \
  --set password=ThisIsTheNewPasswordInPlaintext \
  --set 'primaryGroup=cn=Domain Users,cn=groups,dc=internal,dc=mydomain,dc=de' \
  --set e-mail=jdoe@mydomain.de \
  --set PasswordRecoveryEmail=jdoe@mydomain.de

Step 3

Adding users to existing groups. Please use this article

Option 2.

Use an available import tool (untested!)

2 Likes
Mastodon