From owner-freebsd-questions Wed Jul 17 15:26:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 060B537B400 for ; Wed, 17 Jul 2002 15:26:16 -0700 (PDT) Received: from ws4-4.us4.outblaze.com (205-158-62-105.outblaze.com [205.158.62.105]) by mx1.FreeBSD.org (Postfix) with SMTP id 6C44543E4A for ; Wed, 17 Jul 2002 15:26:15 -0700 (PDT) (envelope-from rafter@linuxmail.org) Received: (qmail 30732 invoked by uid 1001); 17 Jul 2002 22:26:15 -0000 Message-ID: <20020717222615.30731.qmail@linuxmail.org> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [80.197.219.206] by ws4-4.us4.outblaze.com with http for rafter@linuxmail.org; Thu, 18 Jul 2002 06:26:15 +0800 From: "Rafter Man" To: freebsd-questions@freebsd.org Date: Thu, 18 Jul 2002 06:26:15 +0800 Subject: Re: Telnetd X-Originating-Ip: 80.197.219.206 X-Originating-Server: ws4-4.us4.outblaze.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Daniel Bye" > > > 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