第三周作业

 

QQ图片20171216173728

1. who |cut -d ” ” -f1|uniq

2.who |head -1

3.cat /etc/passwd | cut -d: -f7|uniq -c |sort -n|tail -1|grep -o “/[[:alnum:]].*”

4. cat /etc/passwd |sort -k3 -t: -n |tail -10|tr [:lower:] [:upper:] >> /tem/maxusers.txt

5.ifconfig | grep -o “inet [[:alnum:]].*”|cut -d ” ” -f2

6. ls /etc/*.conf |tr [:lower:] [:upper:] > /tmp/etc.conf

7.ls /var |wc -l

8.cat /etc/group|sort -t: -k3 -n |head -10|cut -d: -f1

9.cat /etc/issue /etc/fstab > /tmp/etc.test

10
1.groupadd -g 2016 distro
2.useradd -u 1005 -g distro mandriva
3.useradd mageia -u 1100 -d /home/linux
4.echo “mageedu” | passwd mageia –stdin
5.userdel mandriva
6.useradd slackware -u2002 -gdistro -Gpeguin
7.usermod -s /bin/tcsh slackware
8.[root@localhost ~]# usermod -aG admins slackware
[root@localhost ~]# id slackware
uid=2002(slackware) gid=2016(distro) groups=2016(distro),2017(peguin),2018(admins)

本文来自投稿,不代表Linux运维部落立场,如若转载,请注明出处:http://www.178linux.com/90166

(0)
传~传~
上一篇 2017-12-16 15:32
下一篇 2017-12-16 18:02

相关推荐

  • do some test

    1、简述TCP三次握手四次挥手过程及各过程中客户端和服务器端的状态。     三次握手:         a(syn-send) -> send syn -> b(listen)         a(syn-send) <- receive …

    Linux干货 2016-06-12
  • Linux之SELinux

      Linux之SELinux     本文包括以下内容SELinux概念启用SELinux管理文件安全标签管理端口标签管理SELinux布尔值开关管理日志查看SELinux帮助   SELinux介绍SELinux: Secure Enhanced Linux,是美国国家安全局(NSA=The National Se…

    Linux干货 2016-09-21
  • lnmp部署实验

    Lnmp部署 实验环境: 1、Centos 7主机一台,客户机一台。 2、在centos 7主机上部署:    Nginx  php-fpm  php-mysql  mariadb-server 实验步骤: 1、启动nginx服务,确保80端口打开,启动mariadb-server,确保3306端口…

    Linux干货 2016-10-30
  • yum仓库配置

    yum仓库搭建 yum客户端在安装之前要在服务器下载相关的源数据缓存在 cachedir=/var/cache/yum/$basearch/$releasever中 gpgcheck=1检查数据包的签名完整性 导入钥匙或gpgcheck=0就不检查否侧安装不了yum 在/etc/yum.conf设置配置文件 在/etc/yum.repos.d中创建一个后缀是…

    2017-12-03
  • HipHop PHP实战(详解web运行模式)

    Note: These code examples assume the HipHop compiler is fully built. 1 . Setting Up Your Environment (构建环境) To get started, you need to configure two environment variables. cd…

    Linux干货 2015-04-10
  • Linux 系统启动流程及bash 脚本编程练习

    马哥教育网络班23期 第10周课堂练习 Linux 系统启动流程及bash 脚本编程练习1、请详细描述CentOS系统的启动流程(详细到每个过程系统做了哪些事情) 2、为运行于虚拟机上的CentOS 6添加一块新硬件,提供两个主分区; (1)为硬盘新建两个主分区;并为其安装grub; (2)为硬盘的第一个主分区提供内核和ramdisk文件;为第二个分区提供r…

    Linux干货 2017-01-23

评论列表(1条)

  • 马哥教育
    马哥教育 2018-01-07 16:23

    实现上没有问题,如果能在排版上完善下,效果更佳。继续加油~