QubeMobileServer uses its own user management. While it may be possible to tie into your existing authentication system, doing so is unsupported and will require modifying the source code.
Next to qubeMobileServer[.py], you will find qubeMobileServerUserAdmin[.py]. This utility allows you to add, remove and list current users. To change a user's password, simply re-add them to the database. Once users are added, a username and hashed password will be added the to password file. By default, this file is .passwd in the root of the distribution package. The file can be moved either by changing the config file or giving a command line argument. If the latter, the same argument must be used for starting the server or running the user admin utility.
Command-line options for qubeMobileServerUserAdmin[.py] are as follows:
- -h, --help: show this help message and exit
- --settings-file=SETTINGS_FILE: Location of the qbms.conf file.
- Default: ./config/qbms.conf
- --password-file=PASSWORD_FILE: Location of the server-created password file (the .password file user by qubeMobileServer.
- Default: './.passwd'
- -a, --add: Add a user. You can provide both or neither the username and/or password.
- -d, --drop: Drop a user. You can optionally provide username or names, separated by spaces.
- --hashed: The given password is already hashed (as is the case of a password that has been run through qbhash)
- --list: List all users in the database then exit.
To list users:
BKMac:qubeMobileServer briank$ ./qubeMobileServerUserAdmin --list
+--------+------------------------------------------------------------------+
| User | Encrypted password |
+--------+------------------------------------------------------------------+
| briank | 0beb67d7b7f353f26398eff9b3bf02222aa8c2896ef0662facd9cacda6598ee4 |
| thelma | 031d73dc8c001cbac2553c8b8de126c816d3d01746135c3302b8e1cb91133c67 |
+--------+------------------------------------------------------------------+
2 users in database
To add a user:
BKMac:qubeMobileServer briank$ ./qubeMobileServerUserAdmin -a louise
Password:
Confirm:
+--------+------------------------------------------------------------------+
| User | Encrypted password |
+--------+------------------------------------------------------------------+
| briank | 0beb67d7b7f353f26398eff9b3bf02222aa8c2896ef0662facd9cacda6598ee4 |
| thelma | 031d73dc8c001cbac2553c8b8de126c816d3d01746135c3302b8e1cb91133c67 |
| louise | 00921df728b25f5c836543bca8b1c77bbfd19e6f3c62062d745d7e4608d9b886 |
+--------+------------------------------------------------------------------+
3 users in database. (1 user(s) added)
To remove users:
BKMac:qubeMobileServer briank$ ./qubeMobileServerUserAdmin -d thelma louise
+--------+------------------------------------------------------------------+
| User | Encrypted password |
+--------+------------------------------------------------------------------+
| briank | 0beb67d7b7f353f26398eff9b3bf02222aa8c2896ef0662facd9cacda6598ee4 |
+--------+------------------------------------------------------------------+
1 users in database. (2 user(s) removed)