Skip to main content

Update

Update an existing user account:

$ osapi client node user update --target web-01 \
--name deploy --shell /bin/zsh

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

STATUS CHANGED ERROR NAME
ok true deploy

Lock or unlock an account:

$ osapi client node user update --target web-01 --name deploy --lock
$ osapi client node user update --target web-01 --name deploy --unlock

The --lock and --unlock flags are mutually exclusive. At least one of --shell, --home, --groups, --lock, or --unlock must be specified.

Broadcast to all hosts:

$ osapi client node user update --target _all \
--name deploy --shell /bin/zsh

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 to update (required)
--shellNew login shell path
--homeNew home directory path
--groupsSupplementary groups (replaces existing)
--lockLock the accountfalse
--unlockUnlock the accountfalse
-j, --jsonOutput raw JSON response