FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

LinkBack Thread Tools
Old 07-24-2008, 09:40 PM
Default Consent Banner

There was a similar email a little while ago. Here are the most useful
ideas (bottom is most recent in the response).

Well, you *could* do the "acceptance by logging in" thing... or

force them to type [yes|no]. Here's how I accomplish that.

Firstly, thanks for the help.

I've done this on a test platform, and I end up with a dialog
box when

log into the GUI, but hitting the cancel button still lets me in.

I DO NOT get a prompt when I ssh, nor do I get one from the text
or tty consoles (ctl+F1 through ctl+F6).

Any ideas on implement this in those circumstances?

Have you tried implementing this by replacing the user's shell (in
/etc/passwd or equivalent) with your own wrapper script?

Hmmm...replace bash (or leave bash alone and replace the login
shell in
/etc/passwd) with a script that calls bash if they say OK? No, I
thought of that. I'll try it on my test platform, and report back.

be interesting to see how Windows programs like putty and winscp


We did a somewhat-similar task at a place where I used to work. We
everyone's login shell to a locally-written perl script. That perl
did things such as ensure that the user had permission to log in to
system (checking against user database), check the user's quota,
print out
a blurb, then exec( )'d tcsh. It needed some interupt handling,
though, to
fit what you want to do. I don't have the code anymore, but this

give you an idea of what direction to go. (Would you need to record
user's answers to your question in a database for future
reference? This

might give you that ability.)

This worked with all of the SSH clients we had around (OpenSSH,

TeraTerm, maybe PuTTY).

On Jul 24, 2008, at 1:52 PM, Paul Whitney wrote:

Hash: SHA256

Hello all,

I have created a consent banner and wrote a script that I want
called after
the banner has been displayed. The user is then forced to enter "y"
or "n"

to the consent statement.

How do I invoke the script after the banner has been displayed?

For example, /etc/ssh/sshd.conf has /etc/banner defined. So when I
ssh into
the local box, I see the banner. I want to take it a step further
and prompt

a yes or no answer.

I tried putting it in /etc/profile, that did not work because GDM
could not

start. I tried /etc/bashrc, but that did not work well either.

Thanks in advance,

Paul W

Version: PGP Desktop 9.8.3 (Build 4028)
Charset: US-ASCII

wsBVAwUBSIjrqbdVg+viRqgEAQjF8wf+IhLDqxSBArFqhhWijf rWYpvFTaVQUumW
aSINuJfzpCFswnw0UekOB6E2ZgQXC0G7ElaVZz2jFvI+250HLQ HsLQ5czrHtk3I3
BT8cBosyD9KLON07fIREyPu7aqXweTxvIHTAx+EHBG2+8aKe2c dEtmAFtvNVgZiI
oAnP4zrPijWq8tuEAIyhc0IU0l1J62hCTBvojfkz32HlzbOQjk Y0Fw==

redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe

redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe

Thread Tools

All times are GMT. The time now is 10:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org