Skip to content
Snippets Groups Projects

Use logname to get the correct user to add to the dialout group

Merged Joao Azevedo requested to merge (removed):postinst-more-agnostic into main
All threads resolved!
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
#!/bin/sh
# check the username used to log in and use that username to be added to dialout
username=$(logname)
# Add the user to the dialout group for direct ttyUSB3 access
usermod -a -G dialout purism
usermod -a -G dialout "$username"
Loading