linux 创建新用户


Last login: Thu Mar 23 10:44:52 2017 from 10.164.22.158
[root@outreachsrv02 ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  jdk-8u40-linux-x64.rpm
[root@outreachsrv02 ~]# mkdir home
[root@outreachsrv02 ~]# ls
anaconda-ks.cfg  home  install.log  install.log.syslog  jdk-8u40-linux-x64.rpm
[root@outreachsrv02 ~]# useradd jboss
[root@outreachsrv02 ~]# ls
anaconda-ks.cfg  home  install.log  install.log.syslog  jdk-8u40-linux-x64.rpm
[root@outreachsrv02 ~]# rm -rf home
[root@outreachsrv02 ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  jdk-8u40-linux-x64.rpm
[root@outreachsrv02 ~]# clear
[root@outreachsrv02 ~]# useradd -d /home/jboss -m jboss
useradd: user 'jboss' already exists
[root@outreachsrv02 ~]# userdel jboss
[root@outreachsrv02 ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  jdk-8u40-linux-x64.rpm
[root@outreachsrv02 ~]# useradd -d /home/jboss -m jboss
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
[root@outreachsrv02 ~]# users
root root
[root@outreachsrv02 ~]# cd /home
[root@outreachsrv02 home]# ls
jboss  nginx  tomcat
[root@outreachsrv02 home]# useradd -d /home/jboss -m jboss
useradd: user 'jboss' already exists
[root@outreachsrv02 home]# passwd jboss
Changing password for user jboss.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
Sorry, passwords do not match.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
Sorry, passwords do not match.
New password:
BAD PASSWORD: it is too short
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@outreachsrv02 home]# clear
[root@outreachsrv02 home]#





============================



Copyright (c) 2002-2012 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt.
Xshell:\> ssh jboss@10.164.194.49


Connecting to 10.164.194.49:22...
Could not connect to '10.164.194.49' (port 22): Connection failed.

Type `help' to learn how to use Xshell prompt.
Xshell:\> ssh jboss@10.164.197.49


Connecting to 10.164.197.49:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

[jboss@outreachsrv02 ~]$ ls
[jboss@outreachsrv02 ~]$
[jboss@outreachsrv02 ~]$ 测的。。
-bash: 测的。。: command not found
[jboss@outreachsrv02 ~]$
[jboss@outreachsrv02 ~]$
[jboss@outreachsrv02 ~]$ .cd ..
[jboss@outreachsrv02 home]$ ls
jboss  nginx  tomcat
[jboss@outreachsrv02 home]$ cd jboss
[jboss@outreachsrv02 ~]$ clear
[jboss@outreachsrv02 ~]$ ls
[jboss@outreachsrv02 ~]$
[jboss@outreachsrv02 ~]$
[jboss@outreachsrv02 ~]$
[jboss@outreachsrv02 ~]$ clear
[jboss@outreachsrv02 ~]$ ls
[jboss@outreachsrv02 ~]$
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值