Remote Console as non-root
How to change user when connecting to a remote console?
When qbee-agent is started, it reads the optional environment file under /etc/default/qbee-agent, so it is possible to change the default remote console behaviour by setting the SHELL variable in this file.
Present a login screen
Setting the SHELL to /bin/login will present the login screen when opening the device's console from qbee.
To do that:
-
Create a file under
/etc/default/qbee-agentwith the following content:SHELL=/bin/login - Restart the qbee-agent (see bottom of this page for details).
Authenticate as non-root user
You can also execute a custom scripts that will open a console as a given user.
To do that:
-
Create a script file with the following content:
#!/usr/bin/env bash su - qbee -
Make the script executable:
chmod +x /usr/local/bin/qbee-console -
Set the SHELL variable to the script's path:
SHELL=/usr/local/bin/qbee-console
When you restart the qbee-agent (see below), this will open the console passwordless for the user 'qbee'.
Updated 9 days ago
Did this page help you?
