用户组类似于用户账户,信息也保存在系统的一个文件中。/etc/group文件包含了系统上用到的每个组的信息。比如,本人的Ubuntu系统上的/etc/group文件前10行内容如下: root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4:craftor tt...
分类:
其他好文 时间:
2014-07-16 23:07:32
阅读次数:
146
usermod命令usermod:修改用户的属性信息。语法格式:usermod[options]LOGIN选项:-a:添加用户到辅助组中。和-G选项一起使用,将用户添加到组中。示例1:[root@Server3~]#usermod-aGuser2user1
[root@Server3~]#grep‘user1‘/etc/group
user1:x:503:
user2:x:504:user1
[root@Se..
分类:
其他好文 时间:
2014-07-02 15:35:52
阅读次数:
276
用户分类:管理员:root用户,UID为0系统用户:UID范围1-499一般用户:UID范围:500-60000组分类:基本组或私有组:创建用户时,如果没有为其指定所属的组,则系统默认会创建一个与用户名同名的组。附属组:默认组以外的其他组。当一个用户执行程序的时候,系统会判断当前用户..
分类:
其他好文 时间:
2014-07-02 11:52:41
阅读次数:
239
设置su为不需要密码如果需要对某用户su命令也不需要输入密码,则需要修改下列的:1--->如果没有wheel组 则用sudo groupadd wheel创建 命令为 sudo groupadd wheel;2---->sudo vim /etc/group 将username和root加入到w.....
分类:
其他好文 时间:
2014-06-26 23:52:43
阅读次数:
605
#!/bin/sh
user="seqkit"
myDomain="hyldap"
passwd="******"
echo-n"">./passwd.ldif
echo-n"">./group.ldif
foriin$user
do
echo"Startwriteuserinfotopasswd.ldifgroup.ldif"
grep"^${i}:"/etc/passwd>>./passwd.ldif
grep"^${i}:"/etc/group>>./group.l..
分类:
其他好文 时间:
2014-06-25 10:22:23
阅读次数:
583
大纲1、join是什么?有什么作用?2、join语法格式3、实战演练4、引入paste命令1、join是什么?有什么作用?Linux下最常用的数据文件格式是文本格式的,使用分隔符来区分不同的字段,比如冒号(:)、制表符、空格等。像常见的/etc/passwd和
/etc/group两个文件就是用":"来分隔的。..
分类:
系统相关 时间:
2014-06-17 18:29:06
阅读次数:
341
1.创建一个用户mandriva,其ID号为2002,基本组为distro(组ID为3003),附加组为linux[root@localhost~]#groupadd-g3003distro
[root@localhost~]#tail-1/etc/group
distro:x:3003:
[root@localhost~]#groupaddlinux
[root@localhost~]#tail-1/etc/group
linux:x:3004:[root@loca..
分类:
系统相关 时间:
2014-05-27 03:37:39
阅读次数:
409