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的更多相关文章

  1. 【Linux笔记】Linux目录结构

    [Linux笔记]Linux目录结构   本文内容整理自网络,以作参考. /:根目录,位于linux文件系统目录结构的顶层,一般根目录下只存放目录,不要存放文件,/etc./bin./dev./lib ...

  2. Linux 笔记 #03# 在 Debian远程服务器上运行 Java socket程序

    我试图做什么:把我的破代码放到服务器上运行,并成功与客户端进行 socket通信. 预备环境:刚安装好 MySQL 和 JVM 的 Linux远程服务器(Debian 8)一台. 主要有如下几个步骤: ...

  3. 《学渣Linux笔记》——关于.bashrc与profile(涉及交互式与非交互式、登录与非登录shell)

    <学渣Linux笔记>--关于.bashrc与profile(涉及交互式与非交互式.登录与非登录shell) 1.基本概念(个人理解) 交互式shell:等待用户输入,并执行相应操作的sh ...

  4. 《学渣Linux笔记》——更改ls命令的输出颜色和命令提示符颜色(二)

    <学渣Linux笔记>--更改ls命令的输出颜色和命令提示符颜色(二) II.更改命令提示符颜色 命令提示符的显示格式是由变量PS1决定的,首先我们查找GNU官方手册,发现如下内容(不是我 ...

  5. Linux笔记(二)

    Linux笔记(二) 一.软件包管理 1.rpm命令使用:Linux安装软件包的三种方法 rpm工具类似于Windows的exe文件,可以直接进行安装,而且安装路径和文件名一般都是固定好的. 在Cen ...

  6. linux笔记(一)——基本命令和快捷键

    linux笔记(一) 1.常用BASH快捷键 编辑命令 快捷键 作用 Ctrl + a 移到命令行首 Ctrl + e 移到命令行尾 Ctrl + xx 在命令行首和光标之间移动 Ctrl + u 从 ...

  7. Ubuntu/Linux 笔记应用 为知笔记(支持markdown)

    发现网易云笔记没有Linux,但是为知笔记有Linux版本,且支持markdown格式 sudo add-apt-repository ppa:wiznote-team sudo apt-get up ...

  8. Linux 笔记 #04# Installing Tomcat 8 on Debian

    失败一 ※ 失败二  ※ 失败三 ※ 完 1- 确认机型: root@iZwz:~# lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarc ...

  9. Linux笔记-Linux的命令初解1

    我是一个Linux的初学者,经验肯定没有大牛们那么全面,但是我很想把自己在学习过程中的所有所学和一些自己的感悟写下来. 首先我主要看的书为<鸟哥的私房菜>,这是一本非常棒的书,但是你会发现 ...

随机推荐

  1. Educational Codeforces Round 26 B,C

    B. Flag of Berland 链接:http://codeforces.com/contest/837/problem/B 思路:题目要求判断三个字母是否是条纹型的,而且宽和高相同,那么先求出 ...

  2. Stack Overflow:研究发现访问PHP和 Android的流量更可能来自低收入国家

    Stack Overflow 的数据科学家  David Robinson 发现,软件行业的分工让不同发达地区的程序员依赖于不同的编程语言.软件已经是一个全球性的行业,也有高端低端之分,最高端的是数据 ...

  3. Leetcode 1.两数之和 By Python

    思路 很容易想到的方法是二重循环遍历一遍,但是会很慢 把加法变减法可以大大加速 代码 class Solution: def twoSum(self, nums, target): "&qu ...

  4. 03 Zabbix4.0添加cisco交换机基本监控步骤

    点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 03 Zabbix4.0添加cisco交换机基本监控步骤 主题监控一台cisco网络设备的6项内容 ...

  5. [luogu1373]小a和uim之大逃离【动态规划】

    传送门:https://www.luogu.org/problemnew/show/P1373 定义状态是:\(f[i][j][h][0..1]\)表示在\([i,j]\)两个人相差为h,让某一个人走 ...

  6. bzoj1597/luogu2900 土地购买 (斜率优化dp)

    首先按x从小到大排序,那么可得: f[i]=min{f[j]+x[i]*maxy[j+1..i]} 然而这样是$O(n^2)$的而且无法做优化. 然后我们考虑:如果对于某一点,存在另一点的x和y都比它 ...

  7. Flash10下复制到剪切板的一种新方法

    web开发中常常要实现“复制到剪切板”功能.这个功能很实用,但是由于安全问题,浏览器的限制越来越严,实现的方法也越来越有限了.Firefox默认下不能直接通过Javascript操作剪切板,必须开启相 ...

  8. hiho一下 第144周(机会渺茫)解题报告及拓展

    题目1 : 机会渺茫 时间限制:5000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi最近在追求一名学数学的女生小Z.小Z其实是想拒绝他的,但是找不到好的说辞,于是提出了这样的要求: ...

  9. 关于navicat远程连接mysql问题

    如果你想连接你的mysql的时候发生这个错误: ERROR 1130: Host '192.168.1.81' is not allowed to connect to this MySQL serv ...

  10. @RequestBody

    之前写过一篇记录文章,写的是将一个比较复杂的数据结构在前台组合起来后传递到后台. 当时并不太了解@RequestBody,也并没有使用js提供的JSON.stringify()方法 所有都是自己写的, ...