I have run the following commands:
sudo groupadd -r testgroup sudo useradd -g testgroup -M -r testuser
-r option, which according to the
Create a system account.
Assuming I have a user account with root privileges, I then run:
sudo -u testuser cat /dev/input/mouse0
However, I get:
cat: /dev/input/mouse0: Permission denied
Running the same command as root provides the expected output (garbled output from the mouse driver).
How can I create a user with root privileges?