The situation is the following.
- I have FreeBSD user
M, which is an alias for
root, i.e., its UID equals to 0.
- I have a daemon started as
M(as a shell for an autologin console, if it matters).
- The daemon should start
screennon-interactively. And it actually does, but here's the quirk:
screenalso starts as
M, thus its socket file is placed to
/tmp/screens/rootwhere I actually need it to be able to attach as root while still leaving
screenin single-user mode).
I've tried the following without success:
USER=root /usr/local/bin/screen ...
sudo /usr/local/bin/screen ...
How does it detect the actual username? How can I force it to think it's really
root and not