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:~ ]# 
		     *
        	    ***
	      	   *****
	          *******

4)图形界面登录时,会显示用户列表,可以不让其显示用户列表
    

[root@client6 ~ ]#vim /etc/gconf/gconf.xml.defaults/%gconf-tree.xml
21164,27-62   51%

<entry name="disable_user_list" mtime="1526381377" type="schema" st
ype="bool" owner="gdm-simple-greeter" gettext_domain="gdm">
                                                <local_schema locale="C" short_desc="Do not show known user
s in the login window">
                                                        <default type="bool" value="false"/>     #图形界面登录时不显示用户列表
                                                        <longdesc>Set to true to disable showing known user
s in the login window.</longdesc>
                                                </local_schema>

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值