Managing without sudo
Each device can have one operator, a local user who may run every juist command on it without sudo. You set the operator once, as root.
Who may do what #
On each device, the daemon juistd does the work, and the juist command
sends it requests. The daemon decides who may ask for what:
| Who | May |
|---|---|
| root | everything, including choosing the operator |
| the operator | everything else: list devices, invite, approve, use an exit node, and so on |
| any other local user | only juist status and juist health, which show other devices as member 1, member 2 and so on |
The operator is the local user chosen for this device, usually you, the
person who uses it. Once there is an operator, you no longer type sudo
before each command.
Changes to the network, such as admitting a device, also need an
admin key. It lives in your own keystore,
~/.config/juist, so you run those commands as yourself, not with sudo.
Setting the operator #
Usually there is nothing to do:
juist create, run as yourself, asks once to runsudo juist setand makes you the operator.sudo juist join …makes the user who ran sudo the operator, unless--operatornames another.
If the device has no operator yet, or you want to change it, set it by hand.
Make your user the operator:
sudo juist set --operator=$USERIt prints operator alice. From now on, every juist command works on this
device without sudo.
To remove the operator:
sudo juist set --operator=""It prints operator cleared.
Good to know #
- Each device has one operator per network. Only root can choose it with
juist set --operator. The operator may change the otherjuist setoptions, such as those for networks that only pass HTTPS. - In a terminal, a command that needs the operator asks
not the operator; run sudo juist set --operator=alice? [Y/n]and, if you agree, runs it. - On Linux, a few commands change the host itself and still ask for sudo once:
juist exit serve,juist subnet serve, and creating or joining a second network on the same device. - On a device in several networks, name the network:
sudo juist set work --operator=$USER. juist resetforgets the operator along with the network.
Troubleshooting #
juist health, run by a user who is not the operator, ends with:
$ juist health
…
hint: read-only; to manage this device: sudo juist set --operator=alice
Run that command once. If a command cannot ask, as in a script, it fails
with juist: operator only and the same hint.
See also Status and devices and Troubleshooting.