Controller: Shell

API Controller /nodeworx/shell
Required Permissions ["SWACCOUNTS"]
Action Description
changeshell Change the user's shell.
disable Disable the specified shell user.
enable Enable the specified shell user.
listSiteworxUsers Lists the SiteWorx shell users.
listSystemUsers Lists the System shell users.
password Change a shell user password.
shellOptions Change the default shell.

Action: changeshell (Added in version 4.8.0-393)

Change the user's shell.

Input Parameters

Name Type Notes Required?
users struct (string)
Example Values
mydomain, example, nfsnobody, axfrdns
Yes
shell string
Example Values
/bin/sh, /bin/bash, /sbin/nologin, /bin/tcsh, /bin/csh, /bin/ksh
Example Default Value
/sbin/nologin
No*
* indicates that it's actually required, but probably already has a valid default value

Action: disable (Added in version 4.8.0-393)

Disable the specified shell user.

Input Parameters

Name Type Notes Required?
users struct (string)
Example Values
mydomain, example, nfsnobody, axfrdns
Yes

Action: enable (Added in version 4.8.0-393)

Enable the specified shell user.

Input Parameters

Name Type Notes Required?
users struct (string)
Example Values
mydomain, example, nfsnobody, axfrdns
Yes

Action: listSiteworxUsers (Added in version 4.8.0-393)

Lists the SiteWorx shell users.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'shell' => '/sbin/nologin',
      'home' => '/home/mydomain',
      'info' => '',
      'gid' => '500',
      'uid' => '500',
      'x' => 'x',
      'user' => 'mydomain',
      'pass' => '!!',
      'disabled' => true,
      'siteworx' => 'mydomain.com',
      'history' => false,
    ),
    1 => 
    array (
      'shell' => '/sbin/nologin',
      'home' => '/home/example',
      'info' => '',
      'gid' => '560',
      'uid' => '560',
      'x' => 'x',
      'user' => 'example',
      'pass' => '!!',
      'disabled' => true,
      'siteworx' => 'example.com',
      'history' => false,
    ),
  ),
)

Action: listSystemUsers (Added in version 4.8.0-393)

Lists the System shell users.

Example Output

array (
  'status' => 0,
  'payload' => 
  array (
    0 => 
    array (
      'shell' => '/bin/bash',
      'home' => '/root',
      'info' => 'root',
      'gid' => '0',
      'uid' => '0',
      'x' => 'x',
      'user' => 'root',
      'pass' => '$FkdFdW/c$OZJiH9VGle8UizgLfz7wc0',
      'disabled' => false,
      'history' => true,
    ),
    1 => 
    array (
      'shell' => '/sbin/nologin',
      'home' => '/var/lib/nfs',
      'info' => 'Anonymous NFS User',
      'gid' => '65534',
      'uid' => '65534',
      'x' => 'x',
      'user' => 'nfsnobody',
      'pass' => '!!',
      'disabled' => true,
      'history' => false,
    ),
    2 => 
    array (
      'shell' => '/bin/bash',
      'home' => '/home/axfrdns',
      'info' => '',
      'gid' => '502',
      'uid' => '502',
      'x' => 'x',
      'user' => 'axfrdns',
      'pass' => '!!',
      'disabled' => true,
      'history' => false,
    ),
  ),
)

Action: password

Change a shell user password.

Input Parameters

Name Type Notes Required?
user string
Example Values
root, nfsnobody, mydomain, axfrdns, example
Yes
current_password string
Help Entry
The current password, used to authenticate changes.
Yes
password string Yes
confirm_password string
Help Entry
Confirm the password field by providing it again. Must match the password provided.
Yes

Action: shellOptions (Added in version 4.8.0-393)

Change the default shell.

Input Parameters

Name Type Notes Required?
shell string
Example Values
/bin/sh, /bin/bash, /sbin/nologin, /bin/tcsh, /bin/csh, /bin/ksh
Example Default Value
/bin/bash
No*
* indicates that it's actually required, but probably already has a valid default value