← FAQ

La FAQ est rédigée en anglais et en néerlandais ; elle est affichée en anglais.

FAQ

Network adapters and USB ports on a PC

FAQ › EUZOS Desktop › Ports · Nederlands

What is it?

A PC can switch off its network adapters, its USB ports (one by one, a USB 2 + USB 3 connector as one) and whole USB classes such as storage (no USB sticks or disks, while keyboard and mouse keep working). It is the same code as on EUZOS Server: what is off is kept in \EOS\FW\PORTS.TXT on the boot volume and applies from boot. On a PC only a logged-in admin may change it: in the console with ports, and on a page Ports in Settings. The full design: docs/PORTS.md; the server side: Server › Ports.

How do I…?

How do I see what is on and off?

In the console: ports (anyone may look). It lists the adapters (PCI address, name, MAC, link, address), the USB ports and the USB classes, with notes such as "boot stick", "keyboard", "same connector as …", "driver starting".

Who may change it?

An admin at the PC: someone who is logged in and whose signed profile has the admin policy ports (beheer=…,ports, set by the admin of the organisation on the profile server, e.g. euzos-profielserver admin-policy <email> console,ports). In a test build without a policy everyone may; in a production build nobody without that policy, and never without a logged-in session.

How do I change it in the console?

ports net pci:02:00.1 off
ports usb 3 off
ports usb-class storage off
ports usb 3 on

When a safety rule asks for a confirmation (the last adapter, the only keyboard), the reply says why; repeat the line with confirm at the end.

Where is the Ports page in Settings?

Open Settings (mega menu › Configuration): the last section in the sidebar is Ports. It is only there for an admin who is logged in at the PC (policy ports); everyone else does not see it at all. It shows the same three groups (network adapters, USB ports, USB device classes) with a switch per row and the notes of the listing; a switch that will be refused (the admin connection, the boot stick) is drawn dimmed. Every switch asks first, and a safety rule that needs a confirmation asks a second time with the reason; a refusal shows as a red notice at the top of the page, a change as a green one. Enter confirms the question, Esc cancels it.

Why is my change refused or asked twice?

The same safety rules as on a server: the adapter of an active admin connection (SSH) and the port of the boot stick can never be switched off; the last adapter that is on, the port with the only keyboard and the class hid without another keyboard need a confirmation.

Reference

ItemValue
Config file\EOS\FW\PORTS.TXT (see Server › Ports)
Consoleports (view), ports net|usb|usb-class <what> on|off [confirm] (admin policy ports)
Admin policybeheer=…,ports in the signed profile (euzos_profile::console::Admin::Ports)
SettingsSettings › Ports, the last section of the sidebar (admins only)
Codelibs/ports, kernel/src/ports.rs (settings, settings_run, command), libs/ui/src/apps/ports_settings.rs, libs/ui/src/apps/settings.rs

See also