centos useradd 命令详解
useradd 命令
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options] Options:
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-D, --defaults print or change default useradd configuration
-e, --expiredate EXPIRE_DATE expiration date of the new account
-f, --inactive INACTIVE password inactivity period of the new account
-g, --gid GROUP name or ID of the primary group of the new
account
-G, --groups GROUPS list of supplementary groups of the new
account
-h, --help display this help message and exit
-k, --skel SKEL_DIR use this alternative skeleton directory
-K, --key KEY=VALUE override /etc/login.defs defaults
-l, --no-log-init do not add the user to the lastlog and
faillog databases
-m, --create-home create the user's home directory
-M, --no-create-home do not create the user's home directory
-N, --no-user-group do not create a group with the same name as
the user
-o, --non-unique allow to create users with duplicate
(non-unique) UID
-p, --password PASSWORD encrypted password of the new account
-r, --system create a system account
-R, --root CHROOT_DIR directory to chroot into
-P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files
-s, --shell SHELL login shell of the new account
-u, --uid UID user ID of the new account
-U, --user-group create a group with the same name as the user
-Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
常用:
a)
useradd testuser -c "c参数后面接注释信息" -p "用户密码"
b)
useradd testuser -M -s /sbin/nologin
#用户testuser 没有家目录,也不可以登陆
c)
删除用户userdel -r testuser
useradd与adduser的区别:centos上基本没有区别,ubuntu上有差别,
详细参考:https://www.cnblogs.com/whitehorse/p/5847278.html
centos useradd 命令详解的更多相关文章
- CentOS tree命令详解
inux下tree命令详解---linux以树状图逐级列出目录的内容命令 ############################################################### ...
- CentOS Yum 命令详解
总所周知,Redhat和Fedora的软件安装命令是rpm,但是用rpm安 装软件最大的麻烦就是需要手动寻找安装该软件所需要的一系列依赖关系,超级麻烦不说,要是软件不用了需要卸载的话由于卸载掉了某个依 ...
- centos alias命令详解
Alias命令 功能描述:我们在进行系统的管理工作一定会有一些我们经常固定使用,但又很长的命令.那我们可以给这些这一长串的命令起一个别名.之后还需要这一长串命令时就可以直接以别名来替代了.系统中已经有 ...
- useradd命令详解(转)
1.作用 useradd或adduser命令用来建立用户帐号和创建用户的起始目录,使用权限是超级用户. 2.格式 useradd [-d home] [-s shell] [-c comment] [ ...
- centos top 命令详解及退出top命令-使用p键及free命令
1.作用 top命令用来显示执行中的程序进程,使用权限是所有用户. 2.格式 top [-] [d delay] [q] [c] [S] [s] [i] [n] 3.主要参数 d:指定更新的间隔,以秒 ...
- useradd命令详解
功能说明:建立用户帐号.语 法:useradd [-mMnr][-c <备注>][-d <登入目录>][-e <有效期限>][-f <缓冲天数>][-g ...
- [转]CentOS Yum 命令详解
总所周知,Redhat和Fedora的软件安装命令是rpm,但是用rpm安 装软件最大的麻烦就是需要手动寻找安装该软件所需要的一系列依赖关系,超级麻烦不说,要是软件不用了需要卸载的话由于卸载掉了某个依 ...
- useradd 命令详解
useradd 作用: 用于Linux中创建的新的系统用户, useradd 可用来建立用户账号, 账号建好之后,再用passwd 设定账号的密码, 可用userdel 删除账号. 使用useradd ...
- 【转】centos关机与重启命令详解
连接:http://blog.csdn.net/jiangzhengdong/article/details/8036594 Linux centos关机与重启命令详解与实战 Linux centos ...
随机推荐
- 巨杉数据库SequoiaDB】巨杉Tech | SequoiaDB 分布式事务实现原理简介
1 分布式事务背景 随着分布式数据库技术的发展越来越成熟,业内对于分布式数据库的要求也由曾经只用满足解决海量数据的存储和读取这类边缘业务向核心交易业务转变.分布式数据库如果要满足核心账务类交易需求,则 ...
- [Python机器学习]机器学习概述
1.为何选择机器学习 在智能应用的早期,许多系统使用人为的if和else语句来处理数据,以主动拦截邮箱的垃圾邮件为例,可以创建一个关键词黑名单,所有包含这些关键词的邮件被标记为垃圾邮件,这是人为制定策 ...
- 每天进步一点点------Modelsim添加Xilinx仿真库的详细步骤
Modelsim,可以选型SE和XE两个版本.Modelsim XE可以直接被ISE调用,而Modelsim SE需要手动添加仿真库.但SE版和OEM版在功能和性能方面有较大差别,比如对于大家都关心的 ...
- 树莓派环境下使用python将h264格式的视频转为mp4
个人博客 地址:https://www.wenhaofan.com/a/20190430144809 下载安装MP4Box 命令行下执行以下指令安装MP4Box sudo apt-get inst ...
- openssl 生成免费证书
原文链接:https://www.cnblogs.com/tugenhua0707/p/10927722.html 一:什么是openssl? 它的作用是?应用场景是什么? 即百度百科说:openss ...
- Windows 性能监视器的基本指标(CPU,内存,硬盘参数)
转载:http://kms.lenovots.com/kb/article.php?id=7045 Windows 性能监视器的基本指标(CPU,内存,硬盘参数) 作为一个系统工程师来说,要看懂监控的 ...
- 使用nohup不产生log文件方法
思想 无法阻止nohup产生日志可以将其定向到空文件实现 实现 $ nohup xxx >/dev/null 2>&1 &
- 关闭Apache的目录浏览功能
一.默认情况 默认情况下,Apache的配置文件C:\web\apache2.4\conf/httpd.conf中有如下参数: 引用 <Directory "/var/www/html ...
- Vue前端挂载对象时一些思考
最近,在Vue前端调试http请求,无论如何如何也是拦截不了某些http请求.场景是这样的:Java后端组装好Vue对象,然后送到前端,前端通过id来挂载该Vue对象,而该对象中有上传文件或者图片的控 ...
- 牛客CSP-S提高组赛前集训营3 赛后总结
货物收集 二分答案.复杂度\(O(n\log n)\). 货物分组 用费用提前计算的思想,考虑用一个新的箱子来装货物会发生什么. 显然费用会加上后面的所有货物的总重. \(60\)分的\(O(n^2) ...