nazdar borci,
chcel som si pokusne rozbehnut screen, a to tak, ze jeden uzivatel nieco pise do terminalu v screene a druhy sa pripoji a pasivne pozera co ten druhy robi, isiel som na to takto
jo, mam mac os x 10.6.6, takze
xSup1-2:~ miklosovic$ screen -ls
No Sockets found in /tmp/screens/S-miklosovic.
takze spustim screen normalne
xSup1-2:~ miklosovic$ screen
potom Ctrl + : a napisem
multiuser on <enter>, napise ze ten mod je enabled
potom Ctrl + : a napisem
addacl molnarp <enter>
potom Ctrl + : a napisem
chacl molnarp -w "#"
potom detachnem screen a pozriem sa na pid
xSup1-2:~ miklosovic$ screen -ls
There is a screen on:
61988.ttys000.xSup1-2 (Multi, detached)
1 Socket in /tmp/screens/S-miklosovic.
ok takze pid je 61988, takze dam screen -r, som spat
a teraz sa lognem na druhej konzole ako
user molnarp, zadam
xSup1-2:~ molnarp$ screen -r miklosovic/61988.ttys000.xSup1-2
a proste sa nic nestane a ked sa prepnem do mojho okna tak je tam presne ta hlaska,
ze "Attach attempt with bad pid(a tuna pid)"
este som pridal setuid bit na screen
xSup1-2:~ molnarp$ ls -la /usr/bin/screen
-rwsr-sr-x 1 root wheel 628784 Nov 20 2009 /usr/bin/screen
obaja uzivatelia su v skupine wheel
xSup1-2:~ molnarp$ id
uid=503(molnarp) gid=20(staff) groups=20(staff),405(com.apple.sharepoint.group.4),404(com.apple.sharepoint.group.3),61(localaccounts),12(everyone),0(wheel),406(com.apple.sharepoint.group.5),403(com.apple.sharepoint.group.2),402(com.apple.sharepoint.group.1)
xSup1-2:~ miklosovic$ id
uid=502(miklosovic) gid=20(staff) groups=20(staff),405(com.apple.sharepoint.group.4),404(com.apple.sharepoint.group.3),61(localaccounts),12(everyone),0(wheel),406(com.apple.sharepoint.group.5),403(com.apple.sharepoint.group.2),402(com.apple.sharepoint.group.1)
diky za radu