06linux登录前提示与登录后提示配置文件

linux登录前提示与登录后提示配置文件

1)cat /etc/issue 

登录前提示  添加登录时间,当前终端,主机名   nano /etc/issue  hostname:\n   tty:\l  time:\t

  1. [root@centos7:/etc ]# cat /etc/issue  
  2. hostname:\n  
  3. tty:\l  
  4. time:\t  
  5. \S  
  6. Kernel \r on an \m  


[root@centos7:~ ]# man issue
ISSUE(5)                                                                       Linux Programmer's Manual                                                                       ISSUE(5)

NAME
       issue - prelogin message and identification file

DESCRIPTION
       The  file  /etc/issue is a text file which contains a message or system identification to be printed before the login prompt.  It may contain various @char and \char sequences,
       if supported by the getty-type program employed on the system.

FILES
       /etc/issue

SEE ALSO
       motd(5), agetty(8), mingetty(8)

COLOPHON
       This  page  is  part  of  release  3.53  of  the  Linux  man-pages  project.   A  description  of  the  project,  and  information  about  reporting  bugs,  can  be  found   at
       http://www.kernel.org/doc/man-pages/.

Linux                                                                                  1993-07-24                                                                              ISSUE(5)
 Manual page issue(5) line 1/24 (END) (press h for help or q to quit)
[root@centos7:~ ]# man 8 agetty
AGETTY(8)                                                                        System Administration                                                                        AGETTY(8)

NAME
       agetty - alternative Linux getty

SYNOPSIS
       agetty [options] port [baud_rate...]  [term]

DESCRIPTION
       agetty opens a tty port, prompts for a login name and invokes the /bin/login command. It is normally invoked by init(8).
       ……
       Example: On my system, the following /etc/issue file:

              This is \n.\o (\s \m \r) \t

       displays as

              This is thingol.orcan.dk (Linux i386 1.1.9) 18:29:30

FILES
       /var/run/utmp
              the system status file.

       /etc/issue
              printed before the login prompt.

       /etc/os-release
 Manual page agetty(8) line 218 (press h for help or q to quit)


2)/etc/gdm/custom.conf  配置自动登录

(可省略登录用户名和密码)修改启动选项,可自动登录。在daemon下面添加AutomaticLoginEnable=true    AutomaticLogin=root


3) /etc/motd开机登录后启动提示

rz   cat /etc/motd    secureCRT查看windows文件并加入  motd文件为开机登录后启动提示。motd文件可以随意设置图形等。如下图的示例:

[root@centos7test:~ ]# cat /etc/motd
      		     *
        	    ***
	      	   *****
	          *******

[root@centos7test:~ ]# 
Last login: Thu Jun 21 20:35:22 2018 from 172.18.118.99
      		     *
        	    ***
	      	   *****
	          *******


[root@centos7test:~ ]# 


猜你喜欢

转载自blog.csdn.net/csdn_immortal/article/details/80753361
今日推荐