User Access and Priveliges

Users can be granted various access and privelige levels.

Default Shell

The default user shell access is CLI. A user may also be granted Bash shell access.

A user with a default shell access of CLI may only use the FlexSwitch CLI. A user with Bash shell access automatically enters the Bash shell when they log in, and may also use the CLI.

Accessing the CLI from Bash

Use the following commands to access the CLI.

localhost:/# cd /opt/flexswitch/apps/cli2/
localhost:/opt/flexswitch/apps/cli2#  ./snap_cli.py 

Accessing the Bash Shell from the CLI

If you have the appropriate privileges, you can access the Bash shell by executing the shell command from the CLI.

Access Priveliges

FlexSwitch offers three levels of access.

CLI Access

This is the lowest level of access and a user with CLI access (default) can only use the CLI.

Admin Access

This access leval allows the the user to access the Bash shell from the CLI and return. The user does not have sudo access at this level.

To enter the Bash shell from the CLI:

  • execute the shell command.

To exit the Bash shell and go back to the CLI:

  • type exit at the Bash shell prompt.

Sudo Access

Users with sudo access priveliges can execute any command from the Bash prompt.

Entering and exiting the Bash shell is done in the same manner as a user with Admin access.

Configuring User Access Level and Default Shell

User Access

Use the CLI user command to configure a user's access level (CLI, Admin, or Sudo).

localhost(config)#user exampleuser
localhost(config-user)#Access CLI
localhost(config-user)#

Default Shell

Use the CLI user command to configure a user's default shell (CLI or Bash).

localhost(config-user)#DefaultShell CLI
localhost(config-user)#

Example Admin User Configuration

The following is an example of creating a Admin user with Bash as their default shell.

localhost(config)#user exampleAdminUser
localhost(config-user)#Access Admin
localhost(config-user)#DefaultShell Bash
localhost(config-user)#Password snaproute
localhost(config-user)#apply

Applying Config:
id: 1   object: User   status: APPLIED CONFIG  valid: True delete: False num user cmds: 4
 command                  attr            value               model attr      iskey    required    userprov    time provisioned         
----------------------------------------------------------------------------------------------------------------------------------------
 user exampleAdminUser    user            exampleAdminUser    Name            True     X           X           Tue Aug 15 12:59:47 2017 
 Access Admin             Access          Admin               Access          False                X           Tue Aug 15 13:00:07 2017 
 DefaultShell Bash        DefaultShell    Bash                DefaultShell    False                X           Tue Aug 15 13:00:14 2017 
 Password snaproute       Password        snaproute           Password        False    X           X           Tue Aug 15 13:00:32 2017 

sdk:createUser(exampleAdminUser,snaproute,Access=Admin,DefaultShell=Bash) result: SUCCESS: http status code: 201