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. LOJ6387 [THUPC2018] 绿绿与串串 【manacher】

    题目分析: 比较简单,先跑一边manacher,然后对于回文部分可以碰到末尾的一定满足条件,否则向后转移. 代码: #include<bits/stdc++.h> using namesp ...

  2. 码云平台IDEA系列的插件使用

    一.IDEA插件安装 file -- setting --  Plugins -- 搜索gitee --  Search in repositories 安装后重启编译器 二.登录并拉取项目 file ...

  3. 3分钟上手log4net

    1. config里 <log4net> <appender name="ConsoleAppender" type="log4net.Appender ...

  4. 洛谷 P2058 海港 解题报告

    P2058 海港 题目描述 小K是一个海港的海关工作人员,每天都有许多船只到达海港,船上通常有很多来自不同国家的乘客. 小K对这些到达海港的船只非常感兴趣,他按照时间记录下了到达海港的每一艘船只情况: ...

  5. 离线安装.NET 3.5

    最近为系统新增一个功能,写完以后进行部署,发现在IIS7上部署没有问题,但是IIS6上部署会出现未知情况,具体表现为取不到数据,估计是IIS6和IIS7直接的差异导致程序异常退出. 为了重现异常,在本 ...

  6. 收藏:Non-direct与direct ByteBuffer区别

    相信大家都知道,但是两者的区别在什么地方呢?在不同的环境下采用哪种类型的ByteBuffer会更有效率呢?先解释一下两者的区别:Non-directByteBuffer内存是分配在堆上的,直接由Jav ...

  7. js中if()条件中变量为false的情况

    <html> <head> <script type="text/javascript" src="jquery-3.1.1.min.js& ...

  8. hdu 1097 A hard puzzle 快速幂取模

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1097 分析:简单题,快速幂取模, 由于只要求输出最后一位,所以开始就可以直接mod10. /*A ha ...

  9. Spring + Shiro 项目 + HttpSessionListener 【调用springService问题】&【Session失效问题】

    功能描述: 当用户退出(主动)或者关闭浏览器(session超时)的时候,利用本次登录Ip更新上次登录IP.有人可能要问,你在用户登录的时候记录不就行了.可是我有两个字段,一个为本次登录IP,另外一个 ...

  10. tcp的4次挥手、三次握手

    1. TCP短连接模拟一种TCP短连接的情况:1. client 向 server 发起连接请求2. server 接到请求,双⽅建⽴连接3. client 向 server 发送消息4. serve ...