Add user alongside the Root account on Sangoma Linux 7

After loging with a fresh new account created with:
useradd -g 0 -MN myNewUserLogin ; passwd --stdin myNewUserLogin
then issuing SSH connection I got :

PHP Warning: include_once(/etc/freepbx.conf): failed to open stream: Permission denied in /var/lib/asterisk/bin/fwconsole on line 12
PHP Warning: include_once(): Failed opening ‘/etc/freepbx.conf’ for inclusion (include_path=‘.:/usr/share/pear:/usr/share/php’) in /var/lib/asterisk/bin/fwconsole on line 12
PHP Fatal error: Uncaught Error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php:11
Stack trace:
#0 /var/lib/asterisk/bin/fwconsole(66): include()
#1 {main}
thrown in /var/www/html/admin/libraries/FWApplication.class.php on line 11

The command line stills usable till now.
How to use more than the Root user for admin tasks: fwconsole, etc?

Best regards.

Normally having multiple users able to exercise root privileges is done using the sudo command.

Thank you david55 for your quick reply so nothing to deal with specific freepbxdistro’s command to add a user with Root privileges. Is it fair to ignore messages (in the previous post) after login?

Best regards.

The fwconsole motd command is run as part of the overall system profile. If your user isn’t part of the asterisk group then you will get those warnings.

so either add your user to the asterisk group or get the fwconsole motd command out of your system profile.

1 Like

I haven’t analysed the precise cause of the messages. If you have created an alias of use 0 group 0, it would need to have the same home directory and shell as the standard one to behave the same way.

Yep I did like that: same homedir and shell.
Its worked after adding MyNewUserLogin into the same group as the asterisk’s user:

usermod -a -G asterisk MyNewUserLogin

then no more warnings after login prompt.

Great thanks to @billsimon .
Thanks all. Best Regards.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.