Linux useradd --添加用户账号
来源:互联网 发布:通信线路迁改优化 编辑:程序博客网 时间:2024/04/30 17:41
用途说明
添加用户,与useradd是同一命令。需要root权限才能执行(有root權限)。
常用参数
-d home_dir设定使用者的主目录为 home_dir
-p passwd 指定用户的登录密码。RHEL4支持此参数,RHEL5已经去掉这个参数了。
-g group 指定用户所在的群组。
使用示例
示例一
[root@localhostroot]#adduser xxx
[root@localhostroot]#ls -l /home/xxx
total 0
[root@localhostroot]#ls -ld /home/xxx
drwx------ 2 xxx xxx 4096 9月 29 16:05/home/xxx
[root@localhostroot]#grep xxx /etc/passwd /etc/shadow /etc/group
/etc/passwd:xxx:x:500:500::/home/xxx:/bin/bash
/etc/shadow:xxx:!!:14881:0:99999:7:::
/etc/group:xxx:x:500:
[root@localhostroot]#
[root@localhostroot]#ssh xxx@localhost
xxx@localhost'spassword:
Permission denied,please try again.
xxx@localhost'spassword:
Permission denied,please try again.
xxx@localhost'spassword:
Permission denied(publickey,password,keyboard-interactive).
[root@localhostroot]#
[root@localhostroot]#
[root@localhostroot]#passwd xxx
Changing passwordfor user xxx.
New password:
BAD PASSWORD: it istoo simplistic/systematic
Retype new password:
passwd: allauthentication tokens updated successfully.
[root@localhostroot]#
[root@localhostroot]#
[root@localhostroot]#ssh xxx@localhost
xxx@localhost'spassword:
[xxx@localhost xxx]$
示例二
[root@localhostroot]#adduser -d /opt/oracle oracle
[root@localhostroot]#ls -ld /opt/oracle
drwx------ 2 oracle oracle 1024 9月 29 16:10/opt/oracle
[root@localhostroot]#grep oracle /etc/passwd /etc/shadow /etc/group
/etc/passwd:oracle:x:501:501::/opt/oracle:/bin/bash
/etc/shadow:oracle:!!:14881:0:99999:7:::
/etc/group:oracle:x:501:
[root@localhostroot]#
- Linux useradd --添加用户账号
- 添加新的用户账号使用useradd命令
- Linux useradd --建立用户账号和用户起始目录
- linux下添加用户的命令--useradd
- linux命令useradd添加用户详解
- linux命令useradd添加用户详解
- linux添加用户命令useradd-29
- linux命令useradd添加用户详解
- linux命令useradd添加用户详解
- solaris useradd用户添加
- 添加用户 useradd命令
- Linux手动添加用户账号
- CentOS Linux 添加用户useradd与删除用户userdel
- CentOS Linux 添加用户useradd与删除用户userdel
- ubuntu用户添加adduser, useradd
- ubuntu用户添加adduser, useradd
- ubuntu用户添加adduser, useradd
- ubuntu用户添加adduser, useradd
- 欢迎使用CSDN-markdown编辑器
- 随机十个数的和 九种方法
- ngx_lua利用nginx内部跳转提高访问效率
- [BZOJ1861][ZJOI2006]书架(平衡树splay)
- Matlab R2014a由.m文件产生C代码,在VS2010中运行
- Linux useradd --添加用户账号
- Android 生命周期中每个函数适合处理的事件
- jiava
- java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig 原因分析与解决方案
- C++实现——大数相加
- C++多线程编程参考
- HBase依赖的tomcat:jasper-compiler和tomcat:jasper-runtime搞得我web页面的JSP访问失败
- 短信接口示例
- 谈谈我写博客的一些想法