Distributed Linux user management using etcd
Switch branches/tags
Clone or download
Latest commit 9cbcdcc Sep 19, 2018
Permalink
Failed to load latest commit information.
.circleci Opt in to Go modules Sep 18, 2018
agent Opt in to Go modules Sep 18, 2018
bin Opt in to Go modules Sep 18, 2018
cli Implement planned features (#1) Jun 11, 2018
cmd update docs Aug 21, 2018
debian/DEBIAN [circleci] upload deb to GitHub Releases Jul 25, 2018
mtest Opt in to Go modules Sep 18, 2018
syncer Remove home directory when removing user. Jul 4, 2018
.gitignore Implement planned features (#1) Jun 11, 2018
CHANGELOG.md Opt in to Go modules Sep 18, 2018
LICENSE Initial commit Jun 7, 2018
Makefile Opt in to Go modules Sep 18, 2018
README.md [etcdutil] Use external package to refactor etcd config and client Aug 6, 2018
RELEASE.md update docs Aug 21, 2018
SPEC.md [etcdutil] Use external package to refactor etcd config and client Aug 6, 2018
client.go Implement planned features (#1) Jun 11, 2018
config.go Implement planned features (#1) Jun 11, 2018
config_test.go Implement planned features (#1) Jun 11, 2018
constants.go Do not use path.Join Jun 12, 2018
control [circleci] upload deb to GitHub Releases Jul 25, 2018
database.go Do not use path.Join Jun 12, 2018
database_test.go Do not use path.Join Jun 12, 2018
errors.go Implement planned features (#1) Jun 11, 2018
etcd_config.go [etcdutil] Add NewEtcdConfig() Aug 6, 2018
etcdpasswd.yml.example [etcdutil] Use external package to refactor etcd config and client Aug 6, 2018
go.mod Opt in to Go modules Sep 18, 2018
go.sum Opt in to Go modules Sep 18, 2018
group.go Do not use path.Join Jun 12, 2018
group_test.go Do not use path.Join Jun 12, 2018
lock.go Do not use path.Join Jun 12, 2018
lock_test.go Do not use path.Join Jun 12, 2018
main_test.go [etcdutil] Add an argument to etcdutil.NewConfig() Aug 6, 2018
sync.go Implement planned features (#1) Jun 11, 2018
user.go Do not use path.Join Jun 12, 2018
user_test.go Do not use path.Join Jun 12, 2018
validation.go Implement planned features (#1) Jun 11, 2018
version.go Bump version to 0.5 Sep 3, 2018

README.md

GitHub release GoDoc CircleCI Go Report Card

etcdpasswd

etcdpasswd manages Linux users and groups with a central database on etcd. This repository provides following two programs:

  • ep-agent: a background service that watches etcd database and synchronize Linux users/groups.
  • etcdpasswd: CLI tool to edit the central database on etcd.

Build

$ go get -u github.com/cybozu-go/etcdpasswd/...

Installation

  1. Prepare an etcd cluster.

  2. Create /etc/etcdpasswd.yml.

    This file provides parameters to connect to the etcd cluster.
    A sample configuration looks like this:

    endpoints:
      - http://12.34.56.78:2379
    username: cybozu
    password: xxxxxxxx
  3. Run ep-agent.

    A sample systemd unit file is available at cmd/ep-agent/ep-agent.service. Use it to run ep-agent as a systemd service as follows:

    $ sudo cp $GOPATH/bin/ep-agent /usr/local/sbin
    $ sudo cp ep-agent.service /etc/systemd/system
    $ sudo systemctl daemon-reload
    $ sudo systemctl enable ep-agent.service
    $ sudo systemctl start ep-agent.service
  4. Use etcdpasswd to initialize the database.

    $ etcdpasswd set start-uid 2000
    $ etcdpasswd set start-gid 2000
    $ etcdpasswd set default-group cybozu
    $ etcdpasswd set default-groups sudo,adm

Usage

See cmd/etcdpasswd/USAGE.md.

Specifications

Read SPEC.md.

License

MIT