Skip to main content

Create

Create a new user account:

$ osapi client node user create --target web-01 \
--name deploy --shell /bin/bash --groups sudo,docker

Job ID: 550e8400-e29b-41d4-a716-446655440000

HOSTNAME STATUS CHANGED NAME
web-01 changed true deploy

1 host: 1 changed

Broadcast to all hosts:

$ osapi client node user create --target _all \
--name deploy --shell /bin/bash --groups sudo,docker

Job ID: 550e8400-e29b-41d4-a716-446655440000

HOSTNAME STATUS CHANGED NAME
web-01 changed true deploy
web-02 changed true deploy
mac-01 skip

3 hosts: 2 changed, 1 skipped

Details:
mac-01 unsupported platform

Flags

FlagDescriptionDefault
-T, --targetTarget: _any, _all, hostname, or label (group:web)_all
--nameUsername for the new account (required)
--uidNumeric user ID (system assigns if omitted)
--gidPrimary group ID (system assigns if omitted)
--homeHome directory path
--shellLogin shell path
--groupsSupplementary groups (comma-separated)
--passwordInitial password (plaintext, hashed by the agent)
--systemCreate a system accountfalse
-j, --jsonOutput raw JSON response