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

STATUS CHANGED ERROR NAME
ok true deploy

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 ERROR NAME
web-01 ok true deploy
web-02 ok true deploy
mac-01 skipped false 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