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. 数据库左右连接on后的限制条件问题

    测试环境: MySQL 5.7.19 HeidiSQL 9.3 数据库界面连接工具(挺好用的) 碰到的问题是: Select * from t1 left outer join t2 on t1.id ...

  2. Hopcroft-Carp 算法模板 自用

    #include <iostream> #include <cstdio> #include <cstring> #include <queue> #d ...

  3. 【BZOJ4259】残缺的字符串(FFT)

    [BZOJ4259]残缺的字符串(FFT) 题面 给定两个字符串\(|S|,|T|\),两个字符串中都带有通配符. 回答\(T\)在\(S\)中出现的次数. \(|T|,|S|<=300000\ ...

  4. STM32 堆栈使用解析

    安富莱_STM32-V5开发板_μCOS-III教程.pdf 第4章

  5. 洛谷 P1120 小木棍 [数据加强版]解题报告

    P1120 小木棍 [数据加强版] 题目描述 乔治有一些同样长的小木棍,他把这些木棍随意砍成几段,直到每段的长都不超过50. 现在,他想把小木棍拼接成原来的样子,但是却忘记了自己开始时有多少根木棍和它 ...

  6. 软Raid50制作

    =====创建Raid50的步骤====== 1.创建分区[root@localhost ~]# fdisk /dev/sdb[root@localhost ~]# fdisk /dev/sdc[ro ...

  7. 服务器内存占用不断的增加 & 任务管理器(PF使用率)不断的增加:关注句柄数

    最近一二个月以来,我发现服务器的内存占用正按着每天60M的速度增加. 一台windows 2003的服务器(2G内存),刚刚启起时占用内存:600M左右. 运行20天后,内存占用(PF使用):1.8G ...

  8. C++11并发——多线程lock_gurad ,unique_lock (三)

    http://www.cnblogs.com/haippy/p/3346477.html struct defer_lock_t {}; 该类型的常量对象 defer_lock(defer_lock ...

  9. multidownloadXkcd 多线程抓图

    Python爬虫视频教程零基础小白到scrapy爬虫高手-轻松入门 https://item.taobao.com/item.htm?spm=a1z38n.10677092.0.0.482434a6E ...

  10. range与xrange的区别

    一.Python中range()与xrange()有什么区别 range([start,] stop[, step]),根据start与stop指定的范围以及step设定的步长,生成一个序列 rang ...