----- Original Message ----- 
From: "Daniel Bye" <[EMAIL PROTECTED]>
> > > 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to