1833046 Members
2582 Online
110049 Solutions
New Discussion

/etc/issue

 
ramkumar
Valued Contributor

/etc/issue

hi
i want to know which command is used by getty process to display the /etc/issue file before login prompt

thanks and regards

Ramkumar
7 REPLIES 7
Sridhar Bhaskarla
Honored Contributor

Re: /etc/issue

Hi Ram,

Getty itself is responsible for displaying the contents of this file based on the definitions in /etc/gettydefs. But this is only true for console.

getty will not come into picture for telnet. You will need to add -b /etc/issue to the telnet line in /etc/inetd.conf and refresh inetd.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
ramkumar
Valued Contributor

Re: /etc/issue

hi sri

Thanks for your reply but i want to know how we can get the system name ,machine models by using escape sequences which is used in the /etc/issue .example the system name :/u
version:/n date:/d

Hope u reply

Ram
Michael Tully
Honored Contributor

Re: /etc/issue

The file /etc/issue is used by the console (from /etc/gettydefs - getty) and the telnet request. The telnet request is based on the contents of the /etc/inetd.conf file. Add this at the end of this line of the /etc/inetd.conf:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue

Don't forget to restart inetd
# inetd -c
Anyone for a Mutiny ?
Sridhar Bhaskarla
Honored Contributor

Re: /etc/issue

Hi,

I am not sure if I understood your requirement. If you have an /etc/issue file, then it will overwrite the default banner displayed by telnetd or getty. /etc/issue is the only way to overwrite the banner and you will have to hardcode the model/hostname in there. There isn't anyway you can automatically generate it as it is an ascii file. Or delete the file and the corresponding process will take care of displaying the banner with hostname/model/OS etc.,

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
ramkumar
Valued Contributor

Re: /etc/issue

hi i want to use these escape sequneces in normal shell scripts . can i use it .if so trhough which command
Sยภเl Kย๓คг
Respected Contributor

Re: /etc/issue

come to room we will discuss
Your imagination is the preview of your life's coming attractions
Muthukumar_5
Honored Contributor

Re: /etc/issue

getty is a process reads /etc/issue file display on standard console there. It can not be for user terminal connrection.

It is a read content file so that we can not use it as shell script there.

see the permission of file 444 only. So if you want to have hostname / system informations etc there, you have to enter there, it would be display when login with console right there.

Else if you want to be display for every user then, do as,

/etc/profile

# Issue file display
[[ -f /etc/issue ]] && cat /etc/issue

so that it will be displayed to everybody.

And contents on /etc/issue are as like README file there.

HTH.
Easy to suggest when don't know about the problem!