Giter VIP home page Giter VIP logo

udm_import's Introduction

udm_import

Command line import tool for Univention Corporate Server (UCS).

Allows to create, modify and delete a list of UDM objects (users, group, settings, imap folder etc) read from a CSV file.

Requires UCS version 4.3 erratum 313 or higher.

Usage

$ ./udm_import --help
Usage: udm_import [OPTIONS] UDM_MODULE ACTION FILENAME

  UDM_MODULE is the name of a UDM module like "users/user", "groups/group"
  etc. To see all possible values run "udm modules" on the command line.
  ACTION is one of "create", "modify", "remove".
  FILENAME is the CSV file to read.

Options:
  --help  Show this message and exit.

Examples:

$ ./udm_import users/user create example_users.csv
$ ./udm_import computers/windows modify example_computers.csv
$ ./udm_import groups/group remove example_groups.csv

Installation

Install required Python libraries:

univention-install python-click python-magic

Download the udm_import script and make it executable:

$ wget https://raw.githubusercontent.com/univention/udm_import/master/udm_import
$ chmod +x udm_import

That's it. If you wish to use it without typing long paths, put it in a directory that is in your shells PATH:

mv udm_import /usr/local/sbin/

File format

  • The CSV file should be UTF-8 encoded.
  • It is recommended to use the comma (,) as column sepratator.
  • It is recommended to enclose each cell in double quotes.
  • A header line is required.
  • Each column header must be a UDM property name. Run udm <module/name> to see allowed values.
  • When creating a dn column is not allowed.
  • When modifying or deleting a dn column or a column with the unique identifier (e.g. username / name) must be present.

Limitations

  • Multivalue properties are not yet supported (#1).
  • The CSV dialect is not configurable, sucessful auto-detection is required (#2).
  • Must be run as root on the DC master, as it doesn't accept LDAP credentials (#3).

Example files

Problems

If you encounter a problem or wish to contribute, please create an issue in Github: https://github.com/univention/udm_import/issues

udm_import's People

Contributors

dansan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

udm_import's Issues

Initial Update

The bot created this issue to inform you that pyup.io has been set up on this repo.
Once you have closed it, the bot will open pull requests for updates as soon as they are available.

options for LDAP credentials

Accept LDAP credentials options, so script does not need to a) run on the DC master and b) does not have to be run as root user.

[question] does it work with passwords?

hi, i am looking to exports my existing users, password to import it at a later date

I managed to see all that i can list all the needed information with udm users/user list and as expected the password are properly hashed

can i use this import tool to import the users as is, without the users noticing anything changed?

we're having ldap issues with nextcloud (the users can seemingly just log in but this is out of scope for this repo, a pointer how we can debug this would be appreciated)
we would like to restore to an earlier backup ensure that the users password remain unchanged (just in case their password was changed after our latest backup)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.