zoukankan      html  css  js  c++  java
  • 主机管理+堡垒机系统开发:审计回顾(八)

    一、创建用户并授权

    1、创建用户、设置密码

    [root@localhost CrazyEye]useradd  audit
    [root@localhost CrazyEye]# passwd audit
    Changing password for user audit.
    New password: 
    BAD PASSWORD: The password is shorter than 8 characters
    Retype new password: 
    passwd: all authentication tokens updated successfully.

    2、sudoers授权

    $cat /etc/sudoers
    %crazy_audit    ALL=NOPASSWD:ALL #/usr/bin/strace,/usr/bin/python3

    3、给文件夹授权

    chown -R audit.audit /opt/CrazyEye/

    二、安装必要工具

    1、安装sshpass

    curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz 
    tar xvzf sshpass-1.06.tar.gz 
    cd sshpass-1.06
    ./configure
    make && sudo make install

    2、安装django

    [root@localhost CrazyEye]# su audit
    [audit@localhost CrazyEye]$ pwd
    /usr/local/Python-3.5.3/bin
    ./pip3  install --upgrade pip
    ./pip3 install django -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

    3、后台授权机器

    三、实战测试

    1、启动程序

    [audit@localhost CrazyEye]$ pwd
    /opt/CrazyEye
    [audit@localhost CrazyEye]$ python manage.py runserver 0.0.0.0:9000

    2、登陆截图

    1、登陆堡垒机

    2、连接到目标主机

    3、目标主机操作命令

    3、部分日志展示

    四、nifty模板介绍

    1、引子

    1、模板选择的网站

    https://wrapbootstrap.com/theme/nifty-light-dark-admin-template-WB0048JF7

    2、国内的有名的是模板堂

    https://www.ecmoban.com/

    3、nifty和bootstrap比较

    1、扁平化
    2、有很多组件

    2、nifty部分功能截图

    1、首页

    2、侧边框

    3、Form表单

    4、Widgets1

    5、Buttons

    6、ui-alerts-tooltips.html

     

     

  • 相关阅读:
    HDU 6096 String (AC自动机)
    [leetcode-771-Jewels and Stones]
    [leetcode-766-Toeplitz Matrix]
    [leetcode-763-Partition Labels]
    [leetcode-762-Prime Number of Set Bits in Binary Representation]
    [leetcode-738-Monotone Increasing Digits]
    [leetcode-760-Find Anagram Mappings]
    [leetcode-744-Find Smallest Letter Greater Than Target]
    [leetcode-753-Open the Lock]
    [leetcode-748-Largest Number At Least Twice of Others]
  • 原文地址:https://www.cnblogs.com/luoahong/p/9497678.html
Copyright © 2011-2022 走看看