Saturday, 22 February 2020

Veyon (Part 1) - Introduction and my system setup

Please note this is a draft and will be altered as necessary


In this series of blogs I'm working through setting up and using Veyon. Later blog posts will include configuring Veyon from the CLI and integrating Veyon with LDAP.

From the website: Veyon is a free and Open Source software for computer monitoring and classroom management supporting Linux and Windows.

1. Veyon (Part 1) - Introduction and my system setup (this blog post).
2. Veyon (Part 2) - Configure basic setup and authentication keys.
3. Veyon (Part 3) - Using the CLI (coming soon).
4. Veyon (Part 4) - Using LDAP (coming soon).

I will update these blog posts as and when I learn more or realise that I assume too much or have just got it all plan wrong.

Introduction


In this post I'm going to show how to install Veyon, on both Linux and Windows.

I’m using Zorin OS 15 Ultimate for the master and a mixture of Windows 10 and Zorin OS 15 Education.

Veyon has two pieces of software, the configurator and the master. The configurator is used to configure Veyon on the master, or teachers, computer. The master is the Veyon runtime software and is used on the master computer to monitor and control the classroom computers.

Veyon Configurator application

 

Download Veyon for Windows and Linux


Downloads for Windows, mac and Linux can be found here.

Download the software for your operating system.

Windows

Download the latest stable version for Windows, usually 64 bit, but a 32 bit version is available.

When installing Veyon as a client on a Windows machine you need to deselect “Veyon Master”

Veyon client installation on Windows

Linux


Some distributions have Veyon available via their package managers.

Search for Veyon via your Linux package manager or from the command line.
apt list veyon
You should get something like this back.
 veyon/bionic,now 4.3.0-1~bionic amd64
To install run the following and after a while you will be returned to the command prompt and be able to start confguring Veyon. 
sudo apt install -y veyon
If Veyon isn’t listed in your package manager then you can do one of two things.

1. Add the Veyon PPA repository to apt and install Veyon 
sudo add-apt-repository ppa:veyon/stable
sudo apt install -y veyon
2. You can go to here and download Veyon manually for your respective Linux distribution.

Authentication keys and Linux/Windows groups


As I'm going to be using authentication keys as part of this setup I will need to either create groups to control access to the Veyon Configurator or use built-in groups.

As part of my setup I'm going to use two groups whilst configuring and running Veyon.

I will create the group veyon-master, only on the master machine, and will allow access to Veyon's master software. On client machines I will create the group veyon-client on the client machines and add users to the group or set it as a default group that every user will receive.

A quote from the documentation.
Then an access group must be set for both private and public keys. Only users who are to be allowed to access computers using Veyon Master should be member of the access group set for private keys. The public key should be assigned to a global access group so that the key is readable for all users and the operating system.

Linux - Master


As root run the following commands to create the group and add your user to the group.
groupadd veyon-master
usermod -aG veyon-master $USER
 You will have to logout and back in again to get the group membership. You can test that you have the new group membership by typing id.

To enable us to specify the public keys group we will need to create the veyon-client group on the master as well, see below.

Linux - Client


On the client, as root, we will create the client group and then alter the system to add that group, by default, to any new user create on the system.
groupadd veyon-client
usermod -aG veyon-client $USER
We can create a new user and add our group from the command line using the following command.
useradd client1 -G veyon-client

If we instead use the adduser command we can automate the inclusion of the new group by default to all new users. The file we need to alter, for Debian based Linux distributions, is /etc/adduser.conf. We can either edit the file and alter the settings or use sed to script the changes.

The two lines we need to alter or add are ADD_EXTRA_GROUPS and EXTRA_GROUPS. From the comments in /etc/adduser.conf.

ADD_EXTRA_GROUPS -  If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS option will be default behaviour for adding new, non-system users.

EXTRA_GROUPS - This is the list of groups that new non-system users will be added to.
So uncomment both lines and add veyon-client to the list of groups in EXTRA_GROUPS.

As I enjoy using the command line and sed, you can use the following command to edit the above file, assuming that the lines in the file haven't already been altered.
sed -i -e 's/#ADD_EXTRA_GROUPS=.*/ADD_EXTRA_GROUPS=1/g' -e '/#EXTRA_GROUPS="/s/#EXTRA_GROUPS="/EXTRA_GROUPS="veyon-client /' /etc/adduser.conf
EXTRA_GROUPS should now read something like this.
EXTRA_GROUPS="veyon-client dialout cdrom floppy audio video plugdev users games"

You can now go ahead and test this by creating a new user, using adduser not useradd, and checking that it automatically has the veyon-client group membership.

grep veyon /etc/group

Now we have Veyon installed we can move onto part 2, configuring Veyon master and configuring the client.

Oracle CPU downloader

Every quarter I have to go through and download numerous patches for the Oracle CPU (Critical Patch Update). You have to view the CPU docume...