How to enable "banner" for a user in solaris?

Password:
Using keyboard-interactive authentication.
Do you agree with the banner terms (y/n)?: y

You can add this condition in your default profile file(~/.profile or ~/.kshrc or ~/.cshrc)
Since when the user login profile gets executed.

1 Like

The "banner" should show up after typing the password. Anyone could help adding the condition to (~/.profile or ~/.kshrc or ~/.cshrc ).

Adding condition to above files, is it a temporary one ( or ) permanent one

In Unix, how do you turn off the banner? - Knowledge Base

Be careful that you stop the user just escaping at this point by pressing CNTL-C or CNTL-Z. Usually an stty -isig can acheive this, but, of course, it may affect later functionality. You can turn it back on with stty isig

We acheived this by adding the following to /etc/profile:-

GROUP=`id -gn`
[ -f /usr/local/bin/$GROUP.startup ] && . /usr/local/bin/$GROUP.startup

This allows you to set up processing based on primary group. You could introduce a loop looking at all groups by changing it to id -Gn but that may produce unwanted results I suppose if people with more groups run several startup scripts and the order may not be predictable.

You will have to check the output of id for you operating system as this can vary.

Robin
Liverpool/Blackburn
UK