Running Monyog as unprivileged user

By default, Monyog runs under the 'root' account in Linux. This may be a security nightmare for some.

Here's how you can create and use a user account exclusively for running Monyog:

  • First add a new user and group; replace <GID>, with the group ID, and <PASSWORD>:

         # groupadd monyog

         # useradd -g <GID> -p <PASSWORD> monyog

  • Copy the original files to the new location and change the file ownership.

         # cp -r /usr/local/MONyog/. /home/monyog/

         # chown -R monyog:monyog /home/monyog

  • Next, we need to change the initialization script. Be sure to make a backup first!

        # cp /etc/init.d/MONyogd /etc/init.d/MONyogd.orig

        # vi /etc/init.d/MONyogd

  • Change the following lines for the new path.

         PREFIX="/home/monyog"

        MONYOGBIN="$PREFIX/bin/MONyog"

  • Also you need to update the start command to the following.

         # Start MONyog.

       ...

       else

       action "`su - monyog -c \"$MONYOGBIN -s\"`" /bin/true

       fi

  • Now you need to alter the configuration file.

        # vi /home/monyog/MONyog.ini

  • Change the data path to the new directory.

         Data_path=/home/monyog/data

After this you should be able to start Monyog running as an unprivileged user.

         # service MONyog start

Still need help? Contact Us Contact Us