第二周作业

发布时间 2023-06-11 21:10:13作者: 痛要忍着


#!/bin/bash
IP () {
IPADDR=` hostname -I | cut -d' ' -f1`
echo "IPADDR:    $IPADDR "
if $IPADDR | grep '3' ;then
echo "time: `date +%F%n%T`"
else groupadd magedu;
         for i in {00..100};do
                      useradd mage_$i -g magedu ; echo mage_$i is created;
done
fi
echo -e "`grep -v '/sbin/nologin'$ /etc/passwd`";
}&
yum -y install nginx;
systemctl start nginx