- Create a virtual user.
- Provide that user access to a screen window file.
- Create their screen session.
- Grant access for root.
Bonus 5. Create a vim session file.
eg /etc/screen.dev.lst
for a development list of windows.
screen -t vim
screen -t git
screen -t log
screen -t job
screen -t db
and make it world readable
chmod 0444 /etc/screen.dev.lst
eg for the virtual user 'feed' and the project 'proj123':
mkdir /srv/proj123
chown feed:feed /srv/proj123
su - feed
cd /srv/proj123 # 'home' for this project
script /dev/null # work around tty for virtual user
. /opt/perl/5.28.1.env # set up whatever env
export PERL5LIB=$(pwd)/lib:/srv/feed/v6/lib/perl5
screen -c /etc/screen.dev.lst -S proj123
then test exit/reentry with <ctrl><a>, <d>
then
screen -dr proj123
In the session as feed
Set multi-user: <ctrl><a>
then :multiuser on
.
Grant access: <ctrl><a>
then :acladd root
.
Then <ctrl><d>
repeatedly till you are back as 'root'.
Now back in the shell as root
You should be able to see the session is available via
screen -ls feed/
and then enter the session with
screen -dr feed/proj123
ToDo Set a password!