zoukankan      html  css  js  c++  java
  • proxmox更改登陆banner

    修改pve banner 参考http://blog.jason.tools/2019/05/proxmox-ve-ip-banner.html

    /etc/systemd/system/getty.target.wants/pvebanner.service 内容如下:
    [Unit]
    Description=Proxmox VE Login Banner
    ConditionPathExists=/usr/bin/pvebanner
    DefaultDependencies=no
    After=local-fs.target
    Before=console-getty.service

    [Service]
    ExecStart=/usr/bin/pvebanner
    Type=oneshot
    RemainAfterExit=yes

    [Install]
    WantedBy=getty.target

    /usr/bin/pvebanner内容如下:

    #!/usr/bin/perl
    
    use strict;
    use PVE::INotify;
    use PVE::Cluster;
    
    my $nodename = PVE::INotify::nodename();
    my $localip = PVE::Cluster::remote_node_ip($nodename, 1);
    
    my $xline = '-' x 78;
    
    my $banner = '';
    
    if ($localip) {
        $banner .= <<__EOBANNER;
    
    $xline
    
    Welcome to the Proxmox Virtual Environment. Please use your web browser to
    configure this server - connect to:
    
      https://${localip}:8006/
    
    $xline
    
    __EOBANNER
    
    }
    
    open(ISSUE, ">/etc/issue");
    
    print ISSUE $banner;
    
    close(ISSUE);
    
    exit (0);
    

    首先 cp /usr/bin/pvebanner /usr/bin/pvebanner.bak
    然后修改下面这段内容

    Welcome to the Proxmox Virtual Environment. Please use your web browser to
    configure this server - connect to:
    
      https://${localip}:8006/
    

    修改完毕后,需要systemctl restart pvebanner 然后exit console既可以立即看到效果, 推荐将 https://${localip}:8006/ 行去掉避免被看到访问的入口。

  • 相关阅读:
    框架集。样式表
    2017.11.23知识点整理
    HTML5的标签
    HTML5大体概括截图
    2017.11.21 通用标签及属性
    2017.11.21 课程随记
    JavaScript数组
    JavaScript语句
    javascript基础知识
    不用alert提示的非空表单验证
  • 原文地址:https://www.cnblogs.com/weihua2020/p/13845976.html
Copyright © 2011-2022 走看看