如何使之linux login 前后的欢迎页面

上一篇 / 下一篇  2011-05-04 11:18:30 / 个人分类:linux

linux中由2个文件用来设置login前的欢迎页面,另外由一个文件用来设置login成功后的欢迎页面 

1.login前欢迎页面
修改/etc/issue 和 /etc/issue.net
往里面写入文本,就能使得用户在login前得到相应的提示,这将有助于用户分辨自己正在连接哪里的主机

/etc/issue and /etc/issue.net files can be used to print any logon messages to users logging on to a Linux machine, the message appears BEFORE the login prompt of the login console.

Many escape sequences can also be used in these files to print important information about the system onto the console

The issue.net file has same features and properties the only difference being that the /etc/issue.net file holds the information that is display to users logon in via telnet

 some escape characters that can be used are mentioned in the table below

Character

Description

\d

Insert the current date.

\o

Insert the domain name of the system.

\r

Insert the release number of the kernel, e.g., 2.4.20.

\s

Insert the system name, the name of the operating system.

\t

Insert the current time.

\u

Insert the number of current users logged in.

v

Insert the version of the OS.

\n

Insert the node name of the machine, also known as the hostname.

\m

Insert the architecture identifier of the machine, e.g., i686

 

You must remember one thing that /ect/issue.net file only effects the logons via telnet and any access via SSH is not controlled by the issue.net file

这是我从网上截下来关于issue和issue.net的使用说明,很简单只要懂一点英语就能看懂
特别要说明一下的是
a. issue.net只支持telnet登录的用户,不支持ssh登录的用户
b. issue支持本地登录的用户,不支持ssh登录的用户

2.login成功后欢迎页面
修改/etc/motd
motd的意思是message of the today

/etc/motd is MESSAGE of the DAY which is displayed to users logging onto a linux system.

the /etc/motd file has text format and you can put any information/announcement/rules in it as per your requirements. 

the difference between /etc/issue and /etc/motd is that the text in motd is display AFTER the user successfully logs on to the system.


特别要说明一下的是
a.这个是能支持ssh登录的用户,我确定
b.不支持issue\d \o等一系列的参数,我也确定



TAG: Linux linux 欢迎页面

 

评分:0

我来说两句

Open Toolbar