How-to: Setup Linux users and directories for Pineapple clients

Pineapple contains plugins which starts processes in the OS for execution of silent installation of software etc. The following setup ensures that a Pineapple client has the required OS privileges to execute, e.g. starting OS processes, without resorting to running the client as root.

The setup defines a dedicated user, group and directories for Pineapple.

Default installation

Users and groups

Create as root:

  • The group pineapple which will be used as the group for executing Pineapple.
  • The user pineapple which will be used as the user for executing Pineapple. The user should be member of the pineapple group.

Example:

/usr/sbin/groupadd pineapple
/usr/sbin/useradd -g pineapple pineapple        

Directories

Create as root:

  • The directory /opt/pineapple for installation of Pineapple.
  • The directory /var/pineapple as the Pineapple home directory for placement of runtime files (configuration, modules, reports etc.).
  • The directory /var/log/pineapple for placement of Pineapple log files.

All directories should be owned by pineapple:pineapple with access rights 775.

Example:

mkdir -p /opt/pineapple
chown -R pineapple:pineapple /opt/pineapple
chmod -R 775 /opt/pineapple

mkdir -p /var/pineapple
chown -R pineapple:pineapple /var/pineapple
chmod -R 775 /var/pineapple

mkdir -p /var/log/pineapple
chown -R pineapple:pineapple /var/log/pineapple
chmod -R 775 /var/log/pineapple