下载此文档

实验二Linux用户和组的管理.doc


文档分类:IT计算机 | 页数:约5页 举报非法文档有奖
1/5
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/5 下载此文档
文档列表 文档介绍
实验二 Linux用户和组的管理
(一)用户管理
【需求】
添加一个用户,账号为testgdlc,初始口令为123456;
要求该用户的主目录为/home/share;
要求该用户的基本组为root;
要求该用户的shell为/bin/tcsh;
要求把该用户加到mail组和news组中。
【系统及软件环境】
操作系统:Red Hat AS
【实验配置文件及命令】
:/etc/passwd,/etc/shadow,/etc/group
:/usr/sbin/useradd,/usr/bin/passwd,/usr/sbin/usermod,/bin/su,/bin/cat,/bin/grep
【实验步骤】

[******@linux /]# useradd -d /home/share -g root -s /bin/tcsh testgdlc

[******@linux /]# passwd testgdlc
Changing password for user testgdlc.
New password:
BAD PASSWORD: it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated essfully.

[******@linux /]# usermod -G mail,news testgdlc
,并用su命令切换到该用户进行检验。
[******@linux /]# cat /etc/passwd | grep testgdlc
testgdlc:x:1002:0::/home/share:/bin/tcsh
[******@linux /]# cat /etc/group | grep testgdlc
mail:x:12:mail,testgdlc
news:x:13:news,testgdlc
[******@linux /]# su - testgdlc
[******@linux ~]$
【实验故障与分析】
下面的表格中列出了在实验过程中可能会出现的故障及其解决方法。看看是不是对你的实验有所帮助?如果你在实验中还遇到了其他的问题或故障,不妨记录在表格中,通过自己的实践,或者与老师、同学一起找找解决问题的方法。
序号
实验故障
分析与解决
1
新创建的用户账号无法登录
可能是因为没有该账号的主目录或默认shell
2
3
(二)批量添加用户
【需求】
添加一组ftp 用户;
要求用户都不能以shell方式登录系统,只能通过ftp登录。
【系统及软件环境】
操作系统:Red Hat AS
【实验配置文件及命令】
:/etc/passwd,/etc/shadow,/etc/group
:/bin/touch,/usr/bin/vim,/usr/sbin/newusers,/usr/sbin/chpasswd,/bin/cat,/bin/grep

实验二Linux用户和组的管理 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数5
  • 收藏数0 收藏
  • 顶次数0
  • 上传人zxwziyou8
  • 文件大小78 KB
  • 时间2018-05-11