Advertisement
metalx1000

Untitled

Apr 1st, 2012
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. resume other user's screen session via su, without pty error
  2. by dmmst19
  3. 1 person liked this
  4. $ # su - <user> ; script /dev/null ; screen -r
  5. Normally, if you su to another user from root and try to resume that other user's screen session, you will get an error like "Cannot open your terminal '/dev/pts/0' - please check." This is because the other user doesn't have permission for root's pty. You can get around this by running a "script" session as the new user, before trying to resume the screen session. Note you will have to execute each of the three commands separately, not all on the same line as shown here.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement