linux笔记_day06
1.用户:表示符,凭证
2.用户组:表示符
进程也是有属主和属组的
安全上下文(secure context):

用户:UID,/etc/pawwd
组:GID ,/etc/group
影子口令:
用户:/etc/shadow
组:/etc/gshadow
用户类别:
管理员:uid=0
普通用户:1-65535
系统用户1-499(后台进程的属主)
一般用户500-60000
用户组类别:
基本组:用户的默认组
私有组: 在创建用户时,如果没有给用户指定其所属的组,系统会默认给用户创建一个和用户同名的组。
附加组:
进程被发起之前是个可执行文件,文件执行之前的权限,进程的权限是进程发起者的身份(进程可以使用那些资源文件,由发起者决定,不是文件的所属者)
[root@good eric usr]# whatis passwd
passwd (1) - update user's authentication tokens
passwd (5) - password file
passwd [sslpasswd] (1ssl) - compute password hashes
[root@good eric usr]# man 5 passwd The field descriptions are: account the name of the user on the system. It should not contain capital letters. password the encrypted user password, an asterisk (*), or the letter 'x'. (See pwconv(8) for an expla-
nation of 'x'.) UID the numerical user ID. GID the numerical primary group ID for this user. GECOS This field is optional and only used for informational purposes. Usually, it contains the full
username. GECOS means General Electric Comprehensive Operating System, which has been renamed
to GCOS when GE’s large systems division was sold to Honeywell. Dennis Ritchie has reported:
"Sometimes we sent printer output or batch jobs to the GCOS machine. The gcos field in the
password file was a place to stash the information for the $IDENTcard. Not elegant." directory the user’s $HOME directory. shell the program to run at login (if empty, use /bin/sh). If set to a non-existing executable, the
user will be unable to login through login(1).用户默认shell
添加用户
[root@good eric usr]# which useradd
/usr/sbin/useradd
[root@good eric usr]# ls -l `which useradd`
-rwxr-x---. 1 root root 111320 Feb 9 2016 /usr/sbin/useradd
[root@good eric usr]# useradd tom
[root@good eric usr]# tail -1 /etc/passwd
tom:x:501:501::/home/tom:/bin/bash
[root@good eric usr]# tail -1 /etc/shadow
tom:!!:17299:0:99999:7:::
[root@good eric usr]# passwd tom
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@good eric usr]# tail -1 /etc/shadow
tom:$1$0G6ELf7b$W46ShX5zObXOfepp6Eb8p/:17299:0:99999:7:::
[root@good eric usr]# [root@good eric default]# cd /etc/default/
[root@good eric default]# ls
nss useradd
[root@good eric default]# file useradd
useradd: ASCII text
[root@good eric default]#

useradd -c The ‘-c‘ option allows you to add custom comments, such as user’s full name, phone number, etc to /etc/passwd file
linux笔记_day06的更多相关文章
- 【Linux笔记】Linux目录结构
[Linux笔记]Linux目录结构 本文内容整理自网络,以作参考. /:根目录,位于linux文件系统目录结构的顶层,一般根目录下只存放目录,不要存放文件,/etc./bin./dev./lib ...
- Linux 笔记 #03# 在 Debian远程服务器上运行 Java socket程序
我试图做什么:把我的破代码放到服务器上运行,并成功与客户端进行 socket通信. 预备环境:刚安装好 MySQL 和 JVM 的 Linux远程服务器(Debian 8)一台. 主要有如下几个步骤: ...
- 《学渣Linux笔记》——关于.bashrc与profile(涉及交互式与非交互式、登录与非登录shell)
<学渣Linux笔记>--关于.bashrc与profile(涉及交互式与非交互式.登录与非登录shell) 1.基本概念(个人理解) 交互式shell:等待用户输入,并执行相应操作的sh ...
- 《学渣Linux笔记》——更改ls命令的输出颜色和命令提示符颜色(二)
<学渣Linux笔记>--更改ls命令的输出颜色和命令提示符颜色(二) II.更改命令提示符颜色 命令提示符的显示格式是由变量PS1决定的,首先我们查找GNU官方手册,发现如下内容(不是我 ...
- Linux笔记(二)
Linux笔记(二) 一.软件包管理 1.rpm命令使用:Linux安装软件包的三种方法 rpm工具类似于Windows的exe文件,可以直接进行安装,而且安装路径和文件名一般都是固定好的. 在Cen ...
- linux笔记(一)——基本命令和快捷键
linux笔记(一) 1.常用BASH快捷键 编辑命令 快捷键 作用 Ctrl + a 移到命令行首 Ctrl + e 移到命令行尾 Ctrl + xx 在命令行首和光标之间移动 Ctrl + u 从 ...
- Ubuntu/Linux 笔记应用 为知笔记(支持markdown)
发现网易云笔记没有Linux,但是为知笔记有Linux版本,且支持markdown格式 sudo add-apt-repository ppa:wiznote-team sudo apt-get up ...
- Linux 笔记 #04# Installing Tomcat 8 on Debian
失败一 ※ 失败二 ※ 失败三 ※ 完 1- 确认机型: root@iZwz:~# lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarc ...
- Linux笔记-Linux的命令初解1
我是一个Linux的初学者,经验肯定没有大牛们那么全面,但是我很想把自己在学习过程中的所有所学和一些自己的感悟写下来. 首先我主要看的书为<鸟哥的私房菜>,这是一本非常棒的书,但是你会发现 ...
随机推荐
- pipreqs 组件
作用 帮助你查询所有需要用的组件 安装 pip install pipreqs 使用 """ 切换到项目的路径下 执行查询当前文件下所需要的所有的组件 会生成一个 r ...
- Linux 下 wordpress 无法安装插件
修改目录权限mkdir -p wp-content/tmpchown -R www:www wp-contentchmod -R 777 wp-content 配置修改wp-config.php搜索 ...
- yiming
关于双城 专家团队 总裁专栏 双城荣誉 诚聘英才 双城著作移民服务 移民专题 移民专刊 移民百科 成功案例 联系我们 澳大利亚 匈牙利 美国 加拿大 欧洲 瓦努阿图 双城集团 双城地产 君益诚 ...
- 深入理解JVM结构
JVM结构探究---- 1.JVM结构示意图 2.JVM运行时数据区 1)程序计数器(Program Counter Register) 程序计数器是用于存储每个线程下一步将执行的JVM指令,如该方法 ...
- C# ADO.NET与面向对象
软件开发的三层:界面层,业务逻辑层,数据访问层: 数据访问层:项目添加App_Code文件夹: 实体类:根据数据库表结构,类名和数据库表名一致: 每个成员变量要与数据库表的列相对应,对象正好可以列为一 ...
- 忘记ios访问限制密码
1.使用iTunes将手机备份在本地. 2.下载iBackupBot,打开后在左侧可以看到你的历史备份,选择刚刚备份的文件.依次选择System Files -> HomeDomain -> ...
- win10下通过Anaconda安装TensorFlow-GPU1.3版本,并配置pycharm运行Mnist手写识别程序
折腾了一天半终于装好了win10下的TensorFlow-GPU版,在这里做个记录. 准备安装包: visual studio 2015: Anaconda3-4.2.0-Windows-x86_64 ...
- 方法重载(overroad)和方法覆盖(override)------java基础知识总结
a.什么是方法重载?(同一个类中)方法重载是指在同一个类中,出现方法名相同,参数列表不同的情况. b.什么是方法覆盖?(子父类中)方法覆盖是指在子类中,出现和父类一模一样的方法声明的时候,会运行子类的 ...
- JS解析url
window.location.href 整个url字符串 window.location.protocol url的协议部分 window.location.host url的主机部分 window ...
- Python IPy模块
#!/usr/bin/env python # -*- coding: utf-8 -* # Created by YangYongming at 2018/09/17 20:22 # FileNam ...