does anybody her know off hand how to make the UNIX box (Freebsd 4.3) display messages when you get a login prompt? Looked everywhere and couldn't find it
Printable View
does anybody her know off hand how to make the UNIX box (Freebsd 4.3) display messages when you get a login prompt? Looked everywhere and couldn't find it
Hey dude just edit the /etc/motd file.
I DO need to change /etc/motd but what I want to do is get the box to display a message when a user sees a login prompt (ex. an unauthorised usage warning)Quote:
Oh ok heres how yah do it then
Create a file with the message you wish to display, say /etc/issue. Give it 644 permissions.
Open (as root) /etc/gettytab with a text editor and add to the section that says "default" if=/etc/issue: and save the file. Note that the entries are separated by colons and the section ends with a colon Instead of using if as in 2a, add your message to the im variable and put a \n after it for a newline. You can do this before or after the other stuff, which determines whether it will come before or after the line listing the operating system and so forth. Be sure you don't split the "default" line into more than one line; use \r, \n, and \t to format your message. Beware pico, with its automatic wrap. You should not need to get gettytab reread by restarting init, which you could do either by rebooting (a last resort) or sending init a signal to restart with kill -1 1 (init is always process 1). Note that you can't test by logging in from an existing prompt; you need to test it from the outside or by using the command telnet localhost
You can also create a message attached to the P|Pc|Pc console:\ entry in gettytab with an if=etc/issuemsg: added to the next line that will show up internally.
Ratman, you're looking for the /etc/issue file... Anything you put in there will be displayed on the login screen before you log in.
It won't display what's in that file, don't know why :(Quote:
Originally posted here by chsh
Ratman, you're looking for the /etc/issue file... Anything you put in there will be displayed on the login screen before you log in.
Then follow my post and create it.
Here's the current contents of the gettytab default line:
default:\
:cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:\
:if=/etc/issue:
and here is /etc/issue:
*******************************************************************************
WARNING: Use of this UNIX workstation is restricted to AUTHORIZED users ONLY.
Users activities may be monitored at ALL TIMES. Unauthorized useage of this
workstation WILL BE PROSECUTED!!!!!!!!
*******************************************************************************
FreeBSD 4.3/i386
So did it work?
nope....and that's what I don't get :mad: