Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glasswalk3r/posix2ldap
Migration of POSIX databases to OpenLDAP
https://github.com/glasswalk3r/posix2ldap
golang migration openldap posix
Last synced: about 1 month ago
JSON representation
Migration of POSIX databases to OpenLDAP
- Host: GitHub
- URL: https://github.com/glasswalk3r/posix2ldap
- Owner: glasswalk3r
- License: gpl-3.0
- Created: 2022-08-29T02:04:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-07T22:48:33.000Z (7 months ago)
- Last Synced: 2024-06-21T09:58:02.488Z (5 months ago)
- Topics: golang, migration, openldap, posix
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# posix2ldap
![Unit tests](https://github.com/glasswalk3r/posix2ldap/actions/workflows/unit.yml/badge.svg?branch=main)
Migration of POSIX databases to OpenLDAP.
# Description
This is a CLI to migrate users and groups from a Linux POSIX database to a
OpenLDAP server by creating LDIF files.It is mostly based on the
[migrationtools](https://gitlab.com/future-ad-laboratory/migrationtools) code,
more specifically the `migrate_common.ph`, `migrate_group.pl` and
`migrate_passwd.pl`. Although the code from there is pretty archaic (even for
Perl long tradition of backwards compatibility), the definitions for OpenLDAP
seems to be pretty solid though.This CLI **does not** supports Samba or NIS handling, only the regular files to
manage users and groups (`/etc/passwd` and `/etc/group`).This CLI **does** supports `/etc/gshadow`, which is not included in the
[migrationtools](https://gitlab.com/future-ad-laboratory/migrationtools) already
mentioned files.## Requirements
The minimal expected schemas to be available in the OpenLDAP server are:
- cosine
- nis
- inetorgperson
- misc## Usage
See the CLI program help:
```
$ posix2ldap --help
Usage of ./posix2ldap:
-base-dn string
Specify the base DN, default to dc=foobar,dc=org (default "dc=foobar,dc=org")
-dns-domain string
Specify the DNS domain to use, default to foobar.org (default "foobar.org")
-ignore-gid-above int
Specify the maximum GID to consider retrieving, default is 2000 (default 2000)
-ignore-gid-below int
Specify the minimum GID to consider retrieving, default is 1000 (default 1000)
-ignore-uid-above int
Specify the maximum UID to consider retrieving, default is 2000 (default 2000)
-ignore-uid-below int
Specify the minimum UID to consider retrieving, default is 1000 (default 1000)
-mail-host string
Optional, define inetLocalMailRecipient attributes if provided
-save-to string
Optional, path to a file to save LDIF result if provided
-use-extended
Uses the LDAP inetOrgPerson class for extended attributes, otherwise Account will be used by default
```### Development requirements
- see `go.mod` for minimum Golang version and modules required to compile and run
tests.
- GNU Make.
- [golangci-lint](https://golangci-lint.run/usage/install/) is required to run
validations.See the `Makefile` for the available targets.
## Install
See the project [releases](https://github.com/glasswalk3r/posix2ldap/releases)
to download the binary.## References
- [migrationtools project repository](https://gitlab.com/future-ad-laboratory/migrationtools)