https://github.com/mudler/entities
:lock_with_ink_pen: Declarative modern identity manager for UNIX systems in Go
https://github.com/mudler/entities
Last synced: 2 months ago
JSON representation
:lock_with_ink_pen: Declarative modern identity manager for UNIX systems in Go
- Host: GitHub
- URL: https://github.com/mudler/entities
- Owner: mudler
- License: apache-2.0
- Created: 2020-02-22T15:44:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-17T17:34:30.000Z (4 months ago)
- Last Synced: 2025-04-09T20:11:29.843Z (2 months ago)
- Language: Go
- Homepage:
- Size: 3.68 MB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# :lock_with_ink_pen: Entities
Modern go identity manager for UNIX systems.
Entities parses includes file to generate UNIX-compliant `/etc/passwd` , `/etc/shadow` and `/etc/groups` files.
It can be used to handle identities management and honors already existing entities in the system.```
$> entities apply
$> entities delete
$> entities create```
## Entities file format
### Passwd
```yaml
kind: "user"
username: "foo"
password: "pass"
uid: 0
gid: 0
info: "Foo!"
homedir: "/home/foo"
shell: "/bin/bash"
```To use dynamic uid allocation set the `uid` field with value `-1`:
```yaml
kind: "user"
username: "foo"
password: "pass"
uid: -1
gid: 500
info: "Foo!"
homedir: "/home/foo"
shell: "/bin/bash"
````entities` will searching for the first available range specified by the env variable
`ENTITY_DYNAMIC_RANGE` or by the default the range `500-999`.To set gid with a dynamic id based by the group name you can set the `group` attribute:
```yaml
kind: "user"
username: "foo"
password: "pass"
uid: 100
group: "foogroup"
info: "Foo!"
homedir: "/home/foo"
shell: "/bin/bash"
````entities` will retrieve the `gid` from existing `/etc/group` file.
### Gshadow
```yaml
kind: "gshadow"
name: "postmaster"
password: "foo"
administrators: "barred"
members: "baz"
```### Shadow
```yaml
kind: "shadow"
username: "foo"
password: "bar"
last_changed: 1
minimum_changed: 2
maximum_changed: 3
warn: 4
inactive: 5
expire: 6
```To define `last_changed` with a value equal to current days from 1970 use `now`.
### Group
```yaml
kind: "group"
group_name: "sddm"
password: "xx"
gid: 1
users: "one,two,tree"
```To assign a dynamic gid it's possible to use the value `-1`:
```yaml
kind: "group"
group_name: "foogroup"
password: "xx"
gid: -1
users: "one,two,tree"
````entities` will searching for the first available range specified by the env variable
`ENTITY_DYNAMIC_RANGE` or by the default the range `500-999`.