陈木宁吧 关注:7贴子:611
  • 5回复贴,共1

【那些年丶】看过来唉唉唉

只看楼主收藏回复

想了想还是都传一下


1楼2017-11-29 11:00回复
    这个是FTP
    2017/11/21
    vi etc/sysconfig/network
    【hostname=cn201611214】
    reboot
    (cmb)ipconfig / all
    (桥接——编辑连接)
    ping 192.168.42.29 -c 4
    ping 192.168.81.110 -c 4
    service network restart
    (cmd) ping 192.168.81.110
    useradd cn
    passwd cn
    chmod 640 /etc/sudoers
    gedit /etc/sudoers
    【cn ALL=(ALL) ALL】
    chmod 440 /etc/sudoers
    su cn
    rpm -qa|grep vsftpd
    sudo rpm -ivh v(tab)/f(tab)
    sudo setenforce 0
    (关闭防火墙)
    sudo service vsftpd start
    (cmd)ftp 192.168.42.29
    ()anonymous
    ()ls
    ()bye
    ls /var/ftp
    (cmd)ftp 192.168.42.29
    ()cn
    ()cd /
    ()ls -l
    ()bye
    cd ~
    pwd
    mkdir -p ftpserver/upload
    sudo chown ftp ftpserver/upload/
    ls ftpserver/ -l
    vi ftpserver/wenjuan01.txt
    【cn201611214
    chushi wenjuan】
    ls ftpserver/ -l
    cd /etc/vsftpd/
    ls -l
    sudo cp vsftpd.conf vsftpd.conf.bak
    sudo gedit vsftpd.conf
    【】
    sudo useradd cn01
    sudo passwd cn01 MM111111 MM222222
    ls /home
    sudo vi chroot_list
    【cn01】
    sudo service vsftpd restart
    ftp 192.168.42.29
    cn
    111111
    cd /
    ls
    ftp 192.168.42.29
    cn01
    222222
    ls
    cd /
    ls
    bye
    ftp 192.168.42.29
    anonymous
    111111
    ls
    cd /
    ls
    get wenjuan01.txt /home/cn/aa.txt
    (打开终端)
    su cn
    ls
    cd ~
    ls
    cat aa.txt
    vi aa.txt
    【cn201611214
    wancheng wenjuan】
    mv aa.txt wancheng-wenjuan01-cn.txt
    ls
    ls -l
    (回终端)
    ls
    cd upload
    ls
    put /home/cn/wancheng-wenjuan01-cn.txt wancheng-wenjuan01-cn.txt
    ls
    (打开软件 先调试anonymous 再调试cn)


    2楼2017-11-29 11:01
    回复
      同FTP
      2017/11/15
      (桥接)
      ping 192.168.42.29 -c 3
      ping 192.168.81.110 -c 3
      ping http://www.sina.com.cn -c 3
      (把两个包移进来)
      rpm -ivh ftp(tab)
      rpm -ivh vsftpd(tab)
      useradd cn
      passwd cn MM111111
      chmod 640 /etc/sudoers
      gedit /etc/sudoers

      cn ALL=(ALL) ALL

      chmod 440 /etc/sudoers
      su cn
      sudo setenforce 0 111111
      (打开防火墙ftp)
      sudo service vsftpd start
      sudo service vsftpd restart
      ftp 192.168.42
      (ftp) anonymous MM111111
      ls
      bye
      sudo vi /var/ftp/pub/diaochawenjuan01.txt
      【suibiandadian】
      ls -l /var/ftp/pub/diaochawenjuan01.txt
      (cmd)
      ()ping 192.168.42.29
      ()ftp 192.168.42.29
      anonymous
      MM111111
      ls
      cd pub
      ls
      get diaochawenjuan01.txt d:\aa.txt
      (打开D盘,有aa.txt在里面)
      cd ~
      mkdir ftpserver/upload -p
      pwd
      sudo chown ftp ftpserver/upload/ MM111111
      ls ftpserver/ -l
      vi ftpserver/upload/wenjuan02.txt
      【wenjuan02】
      ls ftpserver/upload/ -l
      cd /etc/vsftpd
      ls
      ls -l
      sudo cp vsftpd.conf vsftpd.conf.bak
      sudo gedit vsftpd.conf

      anonmous_enable=yes
      anon_root=/home/cn/ftpserver
      anon_upload enable =yes
      hide_ids=yes
      anon_max_rate=102400
      anon_world_readable_only=yes
      (去引号)chown_uploads=yes
      (去引号)chown_username=cn

      (cmd)bye
      ftp 192.168.42.29
      cn MM111111
      (打开另一个终端)
      ftp 192.168.42.39
      cn
      111111
      ls
      cd /
      ls
      bye
      cat /etc/passwd
      (打开终端,仍然在gedit界面内)
      (去引号)chroot_local_user=yes
      (去引号)chroot_list_enable=yes
      (qyh)chroot_list_file=/etc/vsftpd/chroot_list
      (打开另一个终端)
      ls /etc/vsftpd/
      su cn
      sudo vi /etc/vsftpd/chroot_list MM111111
      【cn01】
      (打开终端,仍然在gedit界面内)
      pam_service_name=vsftpd
      userlist_enable=yes
      tcp_wrappers=yes
      max_clients=5
      max_per_ip=5
      (打开另一个终端)
      sudo service vsftpd restart
      (cmd)ftp 192.168.42.29
      anonymous
      ftp 192.168.42.81
      anonymous MM111111
      ls
      (打开软件)
      主机:192.168.42.29 用户名:anonymous
      主机:192.168.42.29 用户名:cn 密码:111111
      (打开终端)
      bye
      ftp:192.168.42.81
      cn MM111111
      ls
      (打开软件)
      主机:192.168.42.29 用户名:cn01 密码:111111
      (打开终端)
      cd /
      ls
      bye
      ftp:192.168.42.81
      cn01 MM111111
      cd /
      ls


      3楼2017-11-29 11:02
      回复
        这个是SAMBA
        2017/11/7 -----2017/11/8
        (桥接,编辑网关)
        ping 192.168.42.1 -c 3
        ping 192.168.81.110 -c 3
        (cmd)ping 192.168.42.29
        rpm -qa|grep samba
        rpm ivh samba(Tab)
        rpm -qa|grep samba
        useradd cn
        passwd cn MM111111
        service smb start
        smbpasswd -a cn MM222222
        (查找\\192.168.42.29,输入账户和密码)
        su cn
        cd /home/cn
        ls
        mkdir 201611214
        ls -l
        vi 201611214/cn.txt
        【陈柠201611214】
        ls 201611214/cn.txt -l
        su root MM123456
        //service smb restart
        //mkdir /home/samba
        //touch /home/samba/hello
        //chown -R cn /home/samba/
        cd /etc/samba
        ls
        //ls /home/cn
        cp smb.conf smb.conf.bak
        gedit smb.conf

        workgroup = workgroup
        netbios name = cn'sSERVER
        ;[homes]
        ; comment = Home Directories
        ; browseable = no
        ; writable = yes
        ; valid users = %S
        ; valid users = MYDOMAIN\%S
        ;[printers]
        ; comment = All Printers
        ; path = /var/spool/samba
        ; browseable = no
        ; guest ok = no
        ; writable = no
        ; printable = yes
        ; [public]
        ; comment = cn's samba server
        ; path = /home/cn/201611214
        ; public = yes
        ; writable = yes
        ; printable = no
        ; write list = +staff
        [share201611214]
        comment = cn's samba server
        path = /home/samba; public = no
        writable = yes
        valid users = cn,@cn

        sentenforce 0
        【禁用或勾选防火墙两个选项】
        service smb restart
        \\testparm [enter]
        smbclient -L 192.168.42.29 -U cn
        ls /mnt
        df
        mount //192.168.42.81/share /mnt -o username=cn
        df
        ls /mnt
        cp smb.conf /mnt
        ls /mnt
        (关防火墙)
        停止SAMBA服务器:1-(去分号)hosts allow = 127. 192.168.41.
        2-service smb restart
        3-\\192.168.42.29
        开启SAMBA服务器:1-(去分号)hosts allow = 127. 192.168.41. 192.168.42.
        2-service smb restart
        3-\\192.168.42.29.


        4楼2017-11-29 11:03
        回复
          【不知道】
          2017/10/18
          ls -l;df;free
          echo "asdf \
          > asdfasdf"
          asdf asdfasdf
          mkdir /tmp/shell
          cd /tmp/shell/
          ls
          vi data ——#! /bin/sh
          echo "Mr.$USER,Today is :"
          echo &date "+%B%d%A"
          echo "wish you have a lucky day!"——
          ./data
          bash data
          data
          chmod +x data
          ls
          ./data
          export PATH=/tmp/shell:$PATH
          data
          useradd cn
          passwd cn 123456
          su cn
          data
          su root 123456
          vi mkf——cd /root
          ls -l
          mkdir kk
          cd kk
          vi aa
          chmod +x aa
          cd /root——
          chmod +x mkf
          ./mkf
          ls /root/kk/
          cat /root/kk/aa (随便填)
          vi test1——echo "Program name is $0"
          echo "there are totally $# parameters passed to this program"
          echo "the last ud $?"
          echo "the parameters are $*"——
          chmod +x test1
          ./test1
          ./test1 how are you?
          data
          test1
          test1 how are you ? and you are good
          vi test2——if test $# -eq 0
          then
          echo "please specify a file!"
          else
          gzip $1
          mv $1.gz.$HOME/.local/share/Trash/files
          echo "File $1 is deleted!"
          fi——
          chmod +x test2
          vi ceshi01——ceshi01——(删除ceshi01)
          ls
          test2 ceshi01
          vi ceshi01——ceshi02——
          ./test2 ceshi02
          _________________


          5楼2017-11-29 11:04
          回复
            基础训练
            useradd chenning
            passwd chenning (修改密码)
            ls -l /etc/sudoers
            chmod 640 /etc/sudoers
            ls -l /etc/sudoers
            vim /etc/sudoers
            chmod 440 /etc/sudoers
            ls -l /etc/sudoers
            man useradd
            su chenning
            (sudo)mkdir /home/201611214 (输入111111)
            ls /home
            ls /home -l
            (sudo)touch chenning.c
            ls -l
            grep -n address /etc/httpd/conf/httpd.conf
            (sudo)find /etc -name "http*"
            find /home -user chenning
            (sudo)cp /etc/httpd/conf/httpd.conf .
            ls -l
            (sudo) chown chenning.chenning httpd.conf .
            ls -l
            cd ..
            ls -l
            (sudo)tar -czvf 201611214.tar.gz ./201611214
            ls
            ls -l
            sudo mv 201611214.tar.gz /home/chenning
            ls -l
            ls /home/chenning/
            ls /home/chenning/ -l
            ls /home -l
            cd ~
            pwd
            tar -zxvf 201611214.tar.gz
            ls
            ls 201611214
            ls 201611214 -l
            rm -f 201611214.tar.gz
            ls 201611214
            ls
            uname -r
            sudo groupadd -g 8888 xinan16
            grep -n xinan16 /etc/group
            sudo useradd cn201611214
            sudo passwd cn201611214 (222222)
            grep -n cn201611214 /etc/group
            grep -n cn201611214 /etc/passwd
            sudo usermod -g xinan16 cn201611214
            groups cn201611214
            grep -n cn201611214 /etc/passwd
            who (切换用户 cn201611214)
            who
            who
            (sudo)pkill -9 -t pts/3
            sudo pkill -9 -t tty7
            (sudo)groupdel xinan16
            ls /home
            (sudo)userdel -r cn201611214
            ls /home
            sudo groupdel xinan16
            grep -n cn201611214 /etc/group.
            _____________________________________________________________________________
            (设置网卡。)
            ping 192.168.42.1 -c 3
            ping 192.168.81.110 -c 3
            ping http://www.sina.com.cn -c 3
            cd /etc/sysconfig/network-scripts
            ls
            cat ifcfg-Auto_eth3
            ifdown eth4
            ifup eth4
            service network restart
            ping 192.168.81.110 -c 3 -s 1024
            rpm -qalgrep vsftpd
            yum -y install vsftpd
            ps -ef
            kill 4019(倒数第二个数字)
            df
            df -h
            uptime
            free
            free -m
            mkdir /home/201611214
            free -m >> /home/201611214/chenning.jc
            cat /home/201611214/chenning.jc
            mpstat
            iostat -x /dev/sda2


            6楼2017-11-29 11:05
            回复