Posts

Showing posts with the label usermod

https://www.vultr.com

The Everywhere Cloud

Deploy an instance.
Accelerate your application.


Running Home Assistant on Linux Servers

Image
Home Assistant is an open-source home automation system powered by Python, primarily intended to run on single-board computers like the Raspberry Pi. The following procedure shows how to run Home Assistant Core on common Debian-based Linux servers, in either physical or virtual machines. ========== 1. PREPARING THE SERVER 1.1. Update the package list and upgrade the existing packages. user@host: $ sudo apt-get update && sudo apt-get dist-upgrade -y 1.2. Install Python and required packages. user@host: $ sudo apt-get install python3 python3-dev python3-venv libffi-dev libssl-dev autoconf 1.3. Create a system account (-r) with a dedicated home directory (-m). user@host: $  sudo useradd -r -m homeassistant 1.3.1. If groups for hardware input/output are present, append the system account. Else, skip this step for now. user@host: $ sudo usermod -a -G dialout,gpio,i2c homeassistant 1.4. Ensure that only the system account and members of its group...

Add or Remove Users in Linux Groups

Image
After setting appropriate permissions and "www-data" ownership to files and directories in the www folder, authorized users can be added as needed to the "www-data" group to enable viewing and editing. Such users can then be removed when the tasks are done. ========== 1. Add a user to the "www-data" group. user@host: $ sudo usermod -a -G www-data username 2. Check if such user has been added to the group. user@host: $ groups username 3. The added user needs to log out and log in again for the changes to take effect. Alternatively, such user can log in to the new group in the current command-line session, without logging out the user account, using the following command. user@host: $  newgrp www-data 4. Remove a user from the "www-data" group. user@host: $ sudo gpasswd -d username www-data ==========