`

user group及password设置

阅读更多

/etc/passwd⇒用户

/etc/group⇒组

/etc/shadow⇒密码

 

一般一下面的顺序为系统创建组和用户

创建用户->创建组->将用户添加到组->创建密码

例:
1.创建两个组
groupadd -g 6000 batch
groupadd -g 2018 tomcat
groupadd -g 22000 sabopeusr0
2.创建用户
useradd -u 6000 -g 6000 -d /home/batch -s /bin/bash batch
useradd -u 2018 -g 2018 -d /opt/tomcat -s /sbin/nologin tomcat
useradd -u 22001 -g 22000 -d /home/sabopeusr0 -s /bin/bash sabopeusr0-admin
3.将用户添加到组
gpasswd -a batch tomcat
gpasswd -a tomcat batch
gpasswd -a sabopeusr0-admin wheel


4.使用chpasswd,批量添加密码(注意,如果中间又发生错误,最好重新执行一遍)

先创建用户密码对应文件,格式为username:password,如abc:abc123,必须以这种格式来书写,
并且不能有空行,保存成文本文件user.txt,然后执行chpasswd命令:
chpasswd < user.txt


5.单个修改某个用户的密码
passwd sabopeusr001

分享到:
评论

相关推荐

    SQLite.dll-2.0与3.5均可用.rar

    using (SQLiteDataReader dr = SqLiteHelper.ExecuteReader(" SELECT ID,UserGroup,PassWord FROM User ")) { while (dr.Read()) { m_SLUsers.Add(dr.GetString(0), new User(dr.GetString(0), dr.GetString(1)...

    Android代码-PasswordGenerator

    The generated passwords can than be copied into the password or PIN field by the user. This app belongs to the Privacy Friendly Apps group developed by the SECUSO research group at the Technische ...

    基于HTML爬虫的豆瓣小组API(Python版本).zip

    - group list_user_comments &lt;topic_id&gt; &lt;user_alias&gt; - group list_user_topics - group rec_topic - group remove_comment &lt;topic_id&gt; &lt;comment_id&gt; &lt;reason&gt; - group remove_commented_topic - group ...

    Password Recovery Bundle 2014 Enterprise Edition 3.2-密码找回|重置工具

    It can also reset Windows domain administrator/user password for Windows 2012 / 2008 / 2003 / 2000 Active Directory servers. Retrieve Email Password Retrieve passwords to mail accounts created in ...

    南大通用GBase8s SQL常用SQL语句(二十九).docx

    * 必须在CREATE USER语句创建用户之前将USERMAPPING配置参数值设置为一个启用支持映射用户的值(ADMIN或BASIC)。 * 必须将USERMAPPING配置参数设置为ADMIN才能启用AUTHORIZATION子句。 示例: ALTER USER bill ...

    dubbo-admin-0.2.0-SNAPSHOT.jar

    admin.root.user.password=root #group admin.registry.group=dubbo admin.config-center.group=dubbo admin.metadata-report.group=dubbo admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9 admin....

    对django的User模型和四种扩展/重写方法小结

    User模型 User模型是这个框架的核心部分。他的完整的路径是在django.contrib.auth.models.User。以下对这个User对象做一个简单了解: 字段: 内置的User模型拥有以下的字段: username: 用户名。150个字符以内。...

    ansible-role-user_setup:用于创建和管理用户(包括Ansible服务帐户)的Ansible角色

    从其他角色和/或全局范围(例如hostvars,group vars等)读取的任何变量也应在此处提及。依存关系Galaxy上托管的其他角色的列表应在此处,以及与可能需要为其他角色设置的参数或从其他角色使用的变量有关的所有详细...

    AD帐户批量管理工具-ADBulkAdmin-v1.1.0.22

    ADBulkAdmin工具用于批量管理AD帐户,可批量查看用户属性,批量新建用户和设置用户属性等,可以连接指定的域控,可将所有操作日志保存到Access数据库中。 软件运行要求: 1. 需要安装.NetFramework 4.0以上版本。 2....

    AD批量管理软件

    ADBulkAdmin工具用于批量管理AD帐户,可批量查看用户属性,批量新建用户和设置用户属性等,可以连接指定的域控,可将所有操作日志保存到Access数据库中。 软件运行要求: 1. 需要安装.NetFramework 4.0以上版本。 2....

    AD管理工具

    1. 批量查看帐户信息:Check User。输入帐户后可查询所有帐户的常用属性信息。 2. 批量新建帐户:New User。保证ADAdmin.exe与users.xlsx在同一目录,目前只支持Office 2007及以上版本,在users.xlsx中的newuser ...

    AD帐户批量管理工具-ADBulkAdmin-v1.1.0.9

    ADBulkAdmin工具用于批量管理AD帐户,可批量查看用户属性,批量新建用户和设置用户属性等,可以连接指定的域控,可将所有操作日志保存到Access数据库中。 软件运行要求: 1. 需要安装.NetFramework 4.0以上版本。 2....

    Mail PassView v1.50

    Mail PassView is a small password-recovery tool that reveals the passwords and other account details for the ...Application, Email, Server, Server Type (POP3/IMAP/SMTP), User Name, and the Password.

    AD批量管理工具

    1. 批量查看帐户信息:Check User。输入帐户后可查询所有帐户的常用属性信息。 2. 批量新建帐户:New User。保证ADAdmin.exe与users.xlsx在同一目录,目前只支持Office 2007及以上版本,在users.xlsx中的newuser ...

    PowerShell添加本地账户脚本分享

    $user.setpassword(“password”) $user.setinfo() Get-WmiObject -Class Win32_UserAccount -Filter “name = ‘test'” | Set-WmiInstance -Argument @{PasswordExpires = 0} $group=[ADSI]”WinNT://localhost/...

    HW VSP3 - Virtual Serial Port

    官网 : ...Supports UAC (User Account Control – user switching in Windows XP and Vista) This software is FREEWARE, as long as you comply with the license terms and conditions

    Codeigniter-login-auth-admin

    CREATE TABLE user ( id int(11) unsigned NOT NULL AUTO_INCREMENT, username varchar(255) NOT NULL, password varchar(64) NOT NULL, email char(100) DEFAULT NULL, mobile char(15) DEFAULT NULL, reg_ip ...

    CISCO 技术大集合

    在Router3上设置了访问192.1.0.128/26及192.200.10.4/30这二个网下一跳地址为192.1.0.65。由于在Router1上端口Serial 0地址为192.200.10.5,192.200.10.4/30这个网属于直连的网,已经存在访问192.200.10.4/30的路径...

    AD帐户批量管理工具-ADBulkAdmin-v1.1.0.11

    ADBulkAdmin工具用于批量管理AD帐户,可批量查看用户属性,批量新建用户和设置用户属性等,可以连接指定的域控,可将所有操作日志保存到Access数据库中。 详细信息请到http://www.usefulshare.com/adbulkadmin 查看...

    Mail PassView v1.78

    Application, Email, Server, Server Type (POP3/IMAP/SMTP), User Name, and the Password. Examples: mailpv.exe /shtml "f:\temp\pass.html" /sort 2 /sort ~1 mailpv.exe /shtml "f:\temp\pass.html" /sort "~...

Global site tag (gtag.js) - Google Analytics