linux command useradd
Linux command useradd
【Purpose】
Learning linux command useradd to create a new user or update default new user information
【Eevironment】
Ubuntu 16.04 terminal
【Procdeure】
Source code:
# crate new user
useradd -s '/bin/bash' -m -G adm,sudo test # set new user password
passwd test #set root password
passwd root
Parameter description
-c:加上备注文字,备注文字保存在passwd的备注栏中。 -d:指定用户登入时的主目录,替换系统默认值/home/<用户名> -D:变更预设值。 -e:指定账号的失效日期,日期格式为MM/DD/YY,例如06/30/12。缺省表示永久有效。 -f:指定在密码过期后多少天即关闭该账号。如果为0账号立即被停用;如果为-1则账号一直可用。默认值为-1. -g:指定用户所属的群组。值可以使组名也可以是GID。用户组必须已经存在的,期默认值为100,即users。 -G:指定用户所属的附加群组。 -m:自动建立用户的登入目录。 -M:不要自动建立用户的登入目录。 -n:取消建立以用户名称为名的群组。 -r:建立系统账号。 -s:指定用户登入后所使用的shell。默认值为/bin/bash。 -u:指定用户ID号。该值在系统中必须是唯一的。0~499默认是保留给系统用户账号使用的,所以该值必须大于499。
linux command useradd的更多相关文章
- Linux Command Backup
User Structure linux command review 列出所有信号 找到名字后,kill 或者用ps找到 kill同名进程 每隔一秒高亮显示网络链接数的变化情况 启动关闭制定网卡 关 ...
- 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令
Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...
- 《The Linux Command Line》 读书笔记02 关于命令的命令
<The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...
- 《The Linux Command Line》 读书笔记01 基本命令介绍
<The Linux Command Line> 读书笔记01 基本命令介绍 1. What is the Shell? The Shell is a program that takes ...
- Linux Command Line Basics
Most of this note comes from the Beginning the Linux Command Line, Second Edition by Sander van Vugt ...
- linux 的useradd 命令的p选项
linux 的useradd 命令的p选项 错误用法: #useradd gaojian -p gaojian # ...
- Linux Command Line 解析
Linux Command Line 解析 0 处理模型 Linux kernel的启动包括很多组件的初始化和相关配置,这些配置参数一般是通过command line进行配置的.在进行后续分析之前,先 ...
- 15 Examples To Master Linux Command Line History
When you are using Linux command line frequently, using the history effectively can be a major produ ...
- 10 Interesting Linux Command Line Tricks and Tips Worth Knowing
I passionately enjoy working with commands as they offer more control over a Linux system than GUIs( ...
随机推荐
- 分布式系统的唯一id生成算法你了解吗?
在分库分表之后你必然要面对的一个问题,就是id咋生成? 因为要是一个表分成多个表之后,每个表的id都是从1开始累加自增长,那肯定不对啊. 举个例子,你的订单表拆分为了1024张订单表,每个表的id都从 ...
- 学习笔记11—MATLAB 界面设计
1.cmd窗口输入-guide------> 打开.fig文件 2.查看SPM源代码: 2.matlab中如何改x,y轴以及图例上字体大小 1) x,y轴 -------整个轴上面就一个设定字符 ...
- yum update软件包冲突
因升级系统过程中断,重新进入系统继续升级出现如下问题(内容太多,只粘部分内容) # yum update 正在解决依赖关系 --> 正在检查事务 ---> 软件包 alsa-firmwar ...
- 利用jenkins+git自动执行接口测试代码
事前准备 部署好jenkins.申请一个码云账号.代码同步至码云 1.在码云上新建一个项目,并把代码同步上去 我设置成了私有项目 2.为项目添加部署公钥 因为是私有项目,所以需要添加一个部署公钥,不然 ...
- top 内存mem的used很高,或者100%
top 内存mem的used很高,或者100% Linux服务器运行一段时间后,由于其内存管理机制,会将暂时不用的内存转为buff/cache,这样在程序使用到这一部分数据时,能够很快的取出,从而提高 ...
- 11月28日 记录一个错误❌,看ruby on rails --active support core extensions--present? && presence && duplicable?
❌错误 1. @job.resume.count: 提示❌ undefined method `resume' ✅: @job.resumes.count //解释:调出某一个job的所有简历, ...
- PHP 练习项目------歆语微博项目
一个简单微博项目,php+mysql+apache开发,个人购买资料的项目练习,适合新手练习. 测试账号:zhangqie 密码:123456 功能列表: 数据库增删改查, 图片上传 表情,@好友 ...
- Vue音乐项目笔记(四)(搜索页面提取重写)
1.如何通过betterScroll组件实现上拉刷新 https://blog.csdn.net/weixin_40814356/article/details/80478440 2.搜索页面跳转单曲 ...
- 正睿 2018 提高组十连测 Day2 T2 B
题目链接 http://www.zhengruioi.com/contest/84/problem/318 题解写的比较清楚,直接扒过来了. B 算法 1 直接按题意枚举,动态规划或是记忆化搜索. 时 ...
- 1.1 从UNIX到Linux的发展历程
MIT的CTSS:第一个分时操作系统 ◼ Multics系统(Multiplexed Information and Computing System) ⚫ 1965年AT&T,MIT和GE的 ...