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 ...
随机推荐
- js image to base64 摘录
//传入图片路径,返回base64 //用处,由于在新增时,使用的是base64的格式,为了统一,在编辑时,也将图片转为base64,以便于统一处理 /* 使用: 因为图像处理存在一定的延时,所以通过 ...
- 学习django3过程中的坑
最近跟着Django by Example 2015学习,可老想用最新版的Django3.在学的过程中可踩了不少坑. 今天就又碰到一个: 在这本书中96页有这样的代码: url(r'^login/$' ...
- 关于f(x)
有时 z = x + y 有时 0 = x + y 有时单独用f(x) 有时 z = f(x) 很容易分不清. 从集合角度,将f(x)看成映射 即从A集合到B集合的对应关系 这样f(x)可以单独使用, ...
- php弱语言特性-计算科学计数法
php处理字符串时存在一个缺陷问题,如果字符串为“1e1”,本该是一个正常的字符串,但是php会将它认为是科学计数法里面的e: 也就是按照数学的科学计数法来说:1e1=10^1=10,因此php会把这 ...
- Pandas 中对列 groupby 后进行 sum() 与 count() 区别及 agg() 的使用方法
groupby[根据哪一列][ 对于那一列].进行计算 代码演示: direction:房子朝向 view_num:看房人数 floor:楼层 计算: A 看房人数最多的朝向 df.groupby([ ...
- H5-设置缓存
<meta http-equiv="Cache-Control"content="no-cache"/> 手机页面通常在第一次加载后会进行缓存,然后 ...
- Runtime.addShutdownHook用法
一.什么是ShutdownHook? 在Java程序中可以通过添加关闭钩子,实现在程序退出时关闭资源.平滑退出的功能. 使用Runtime.addShutdownHook(Thread hook)方法 ...
- ntoskrnl.exe导致蓝屏解决方法
背景 博主电脑近段时间经常蓝屏,主要表现在开关机.重启等操作上: 使用 BlueScreenView 查看C:\Windows\Minidump下的bmp文件,关键信息如下: 解决方法 查阅网上的各种 ...
- Spring组件BeanDefinition 源码解析
BeanDefinition 继承图 继承的接口 BeanMetadataElement接口 将由承载配置源对象的bean元数据元素的类实现. 包含一个getSource的方法,可以获取到MetaDa ...
- day03_1spring3
事务管理的几种方式.spring整合Junit.spring整合web.ssh整合 一.事务管理的几种方式: 1.介绍前提我们需要导入:spring-tx-3.2.0.RELEASE.jar的包里面含 ...