-a, --append

Add the user to the supplementary group(s). Use only with the -G option.

-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]

A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option.
If the user is currently a member of a group which is not listed,the user will be removed from the group. This behaviour can be changed via the -a option, which appends the user to the current supplementary group list.

注意

  • -a-G要配合使用,否则在把用户添加到新的用户组的同时会从现有用户组中移出。
  • 当前用户在线的话不会马上生效,需要注销!

usermod - modify a user account的更多相关文章

  1. linux 命令中英文对照,收集

    linux 命令中英文对照,收集   linux 命令英文全文 Is Linux CLI case-sensitive? The answer is, yes. If you try to run L ...

  2. Linux 笔记 - 第五章 Linux 用户与用户组管理

    博客地址:http://www.moonxy.com Linux 是一个多用户的操作系统,在日常的使用中,从安全角度考虑,应该尽量避免直接使用 root 用户登录,而使用普通用户. 1. 关于用户 u ...

  3. Linux入门(用户操作及权限)

    Linux入门之 用户操作及权限   在一个公司里,老板与员工有上下级之分,员工与员工间也有上下级或同级之分.每个级别在公司的职责不同,权限也不同.在Linux操作系统中也一样,不同的用户身份拥有着不 ...

  4. Linux上天之路(八)之用户和组

    主要内容. 用户创建,删除,修改 密码及密码文件 组创建,删除,修改 组密码及组配置文件 相关文件 Linux用户分类 超级管理员: UID为0 root用户拥有至高无上的命令,root用户不能改名 ...

  5. Usermod 命令详解 ------工作中修改shell时用 usermod -s /bin/csh home

     Usermod 命令详解 2012-09-11 11:01:36 标签:usermod 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.htt ...

  6. Usermod 命令详解

    参考资料:usermod manpage usermod - 修改用户帐户信息 modify a user account usermod [options] user_name usermod 命令 ...

  7. usermod - linux修改用户帐户信息

    usermod - 修改用户帐户信息 modify a user account usermod [options] user_name usermod 命令修改系统帐户文件来反映通过命令行指定的变化 ...

  8. usermod命令详解

    转载自:http://blog.51cto.com/urchin/987186 usermod - 修改用户帐户信息 modify a user account usermod [options] u ...

  9. A Complete Guide to Usage of ‘usermod’ command– 15 Practical Examples with Screenshots

    https://www.tecmint.com/usermod-command-examples/ -------------------------------------------------- ...

随机推荐

  1. postman自动化接口测试

    背景描述 有一个项目要使用postman进行接口测试,接口所需参数有: appid: 应用标识: sign:请求签名,需要使用HMACSHA1加密算法计算,签名串是:{appid}${url}${st ...

  2. springboot 加载jsp 刷新jsp ,刷新Controller (亲自尝试)

    解决jsp加载成功.<dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId&g ...

  3. HDU 6034 Balala Power! —— Multi-University Training 1

    Talented Mr.Tang has nn strings consisting of only lower case characters. He wants to charge them wi ...

  4. basic play

    [root@wen ~]# w 19:01:27 up 1 day, 7:06, 3 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN ...

  5. LOJ 2997 「THUSCH 2017」巧克力——思路+随机化+斯坦纳树

    题目:https://loj.ac/problem/2977 想到斯坦纳树.但以为只能做 “包含一些点” 而不是 “包含一些颜色” .而且不太会处理中位数. 其实 “包含一些颜色” 用斯坦纳树做也和普 ...

  6. drf 分页,获取fk,choise,m2m等字段数据(序列化)

    1.什么是restful规范 是一套规则,用于程序之间进行数据交换的约定. 他规定了一些协议,对我们感受最直接的的是,以前写增删改查需要写4个接口,restful规范的就是1个接口,根据method的 ...

  7. trizip haskell implementation

    1 trizip :: [a] -> [b] -> [c] -> [(a,b,c)] 2 trizip a b c 3 | null a = [] 4 | null b = [] 5 ...

  8. (DP)HDU - 1003 Max Sum

    这是一道DP入门题目,知识点是“最大连续子序列” 题目大意:给你一个长度为n的数字序列,取其中一段连续的序列,要求和最大: 分析:这是一道裸题,没有什么花里胡哨的东西,主要是写出状态转移方程 dp[i ...

  9. shell zip和unzip压缩和解压,压缩效率

    1.把/home目录下面的mydata目录压缩为mydata.zip zip -r mydata.zip mydata #压缩mydata目录zip -r mydata.zip ./*txt #压缩当 ...

  10. 方法Join()

    等待线程结束:jion() 谦让: yeild() 睡眠: sleep() jion和sleep和yeild之间有什么区别呢? 首先介绍一下jion(): 如果想让主线程等待子线程执行完毕之后再继续运 ...