The situation is the following.
- I have FreeBSD user
M, which is an alias forroot, 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 asM, thus its socket file is placed to/tmp/screens/M, not/tmp/screens/rootwhere I actually need it to be able to attach as root while still leavingscreenin single-user mode).
I've tried the following without success:
USER=root /usr/local/bin/screen ... and
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 M?
inittabflagged withrespawn.