centos 创建新用户_如何在CentOS中创建新用户?

centos 创建新用户

centos 创建新用户

CentOS is enterprise level Linux distribution which is clone of the RedHat. User management like create, add, remove etc is important part of the daily Administration tasks. In this tutorial we will look how to add new user to the CentOS system.

CentOS是企业级Linux发行版,是RedHat的克隆。 用户管理(例如创建,添加,删除等)是日常管理任务的重要组成部分。 在本教程中,我们将研究如何将新用户添加到CentOS系统。

列出当前用户 (List Current Users)

Before creating new user we will list existing users. We can use different methods to list existing users but following is the most practical way to list existing users. We will cat user names with the cut command.

在创建新用户之前,我们将列出现有用户。 我们可以使用不同的方法来列出现有用户,但是以下是列出现有用户的最实用方法。 我们将使用cut命令来管理用户名。

$ cut -f 1 -d : /etc/passwd
List Current Users
List Current Users
列出当前用户

使用useradd添加新用户(Add New User with useradd)

Now we can add our new user. We have all ready checked the existing users but if we try to add existing user we will files. We will use useradd command by providing the user name. In this example the user name will be poftut .

现在,我们可以添加新用户。 我们已经准备好检查现有用户,但是如果我们尝试添加现有用户,我们将归档。 我们将通过提供用户名来使用useradd命令。 在此示例中,

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值