Re: lock(1) to lock all virtual terminals?

Previous thread: Re: OBSD's perspective on SELinux by Jason Dixon on Saturday, September 22, 2007 - 10:48 am. (1 message)

Next thread: Internet slowdown when pf is enabled? Running on i386 -current by Reza Muhammad on Saturday, September 22, 2007 - 2:45 pm. (1 message)
From: Douglas A. Tutty
Date: Saturday, September 22, 2007 - 11:33 am

I tried Screen on Debian briefly.  I'm not good at remembering magic
keystrokes.  If necessary, I'll try again.  However, since I'm trying to
get used to the OBSD way of doing things, and since this seemed like a
security issue, I wanted to see how to solve this using what is in OBSD
base.  

Thanks,

Doug.

From: Todd Alan Smith
Date: Sunday, September 23, 2007 - 4:11 pm

Does "lock -nv" not work? I just read about this in "BSD Hacks" last
night, oddly enough.

-Todd

From: Chris Kuethe
Date: Sunday, September 23, 2007 - 4:23 pm

# lock -nv
lock: unknown option -- v
usage: lock [-np] [-a style] [-t timeout]

-np will at least lock the terminal with your password and no timeout....

CK

-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?

From: Douglas A. Tutty
Date: Sunday, September 23, 2007 - 7:54 pm

Right, but I want it to prevent me from changing to another virtual
terminal.  

From: Todd Alan Smith
Date: Sunday, September 23, 2007 - 8:35 pm

Referring back to the "BSD Hacks" book (page 22) by Dru Lavigne, I see
now that the lock command to which she refers comes with FreeBSD,
although she states that it's available for NetBSD and OpenBSD.

I'm an OpenBSD newbie, so I'd enjoy learning why a different version
of lock is employed in OpenBSD. If anyone in the know wants to
elaborate, that'd be great.

From: Darren Spruell
Date: Monday, September 24, 2007 - 11:27 am

It's not necessarily a different version; all BSDs document in the
lock(1) manual page that the implementation came from the 3.0BSD
release. Indeed, all of them implement similar options with slight
variance in the additional command line switches:

FreeBSD adds a -v option to prevent switching virtual terminals during
a lock. It notes that only syscons(4) terminals are supported here.
(Note it's not saying that all other terminals are locked, just that
you can't switch to them. So under OpenBSD you might workaround for
similar behavior by logging into a single terminal session and running
screen(1) or similar to load others, then locking one in essence locks
them all.)

http://www.freebsd.org/cgi/man.cgi?query=lock&apropos=0&sektion=0&manpath=...

OpenBSD doesn't support -v, but it doesn't use syscons either so
that's not really a consideration. But it does add a -a option to
extend authentication using the BSD auth subsystem, giving you
additional flexibility.

http://www.openbsd.org/cgi-bin/man.cgi?query=lock&apropos=0&sektion=0&manp...

NetBSD is the least featureful of the implementations as it has
neither a -v nor a -a option.

http://netbsd.gw.com/cgi-bin/man-cgi?lock++NetBSD-3.0

DS

From: Todd Alan Smith
Date: Monday, September 24, 2007 - 5:55 pm

Darren, thanks for expounding on the subject. Funny, I just read about
screen(1) on merdely's blog last night.

http://erdelynet.com/tech/openbsd/my-gnu-screen-config/

Previous thread: Re: OBSD's perspective on SELinux by Jason Dixon on Saturday, September 22, 2007 - 10:48 am. (1 message)

Next thread: Internet slowdown when pf is enabled? Running on i386 -current by Reza Muhammad on Saturday, September 22, 2007 - 2:45 pm. (1 message)