Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jul 2002 06:26:15 +0800
From:      "Rafter Man" <rafter@linuxmail.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Telnetd
Message-ID:  <20020717222615.30731.qmail@linuxmail.org>

next in thread | raw e-mail | index | archive | help
----- Original Message ----- 
From: "Daniel Bye" <dan@slightlystrange.org>
> > > I have a system running telnetd and sshd
> > > Some users may NOT use telnet to login, they have to login via sshd
> > > (using passwords).

> Perhaps you can take advantage of the $SSH_TTY variable that gets set
> for all ssh logins?  A shell rc file can test for the presence (or
> absence, as you prefer) of this variable in the user's evironment and
> take the appropriate action (continue, or kill the shell and log the
> user off again.)
> 
> At least one problem comes to mind, though, in that you would have to 
> be quite draconian about ownership and permissions on the rc files,
> or users can simply edit or remove them.
> 
> Maybe provide a standard one that performs the test, then if the 
> session is permitted, make its last action to source another rc file
> that the user can edit (called, say, .login.local).  You can then use 
> "chflags schg" on the one YOU want control over.
> 
> Haven't tried it, though, and it would involve writing variants of
> the file for Bourne-style shells and C-style shells.
> 
> Then again, there may be more elegant ways of doing it...

Not a bad idea, thanks for your input :-)

Best regards
Rafter
-- 
Get your free email from www.linuxmail.org 


Powered by Outblaze

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020717222615.30731.qmail>