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/ 行去掉避免被看到访问的入口。

  • 相关阅读:
    聚合查询2.0
    分词器2.0
    搜索和查询2.0
    Mapping2.0
    索引的CRUD2.0
    微信小程序:一则iOS下用video播放mp4文件问题排查
    flutter——android报错Manifest merger failed : Attribute application@allowBackup value=(false)
    HTML-meta
    HTML-实体
    html-vscode-liveServer
  • 原文地址:https://www.cnblogs.com/weihua2020/p/13845976.html
Copyright © 2011-2022 走看看