<commit_before>---
layout: post
title:  "[linux] 建立一个新的账号"
date:   2018-11-14
comments: true
categories: linux
tags: linux, new user
description:
published: true
---

删除用户
userdel spark 

添加用户
useradd -r -m -s /bin/bash lyy

设置用户密码
passwd lyy

添加 root 权限
chmod +w /etc/sudoers
vim /etc/sudoers

```
root ALL=(ALL:ALL) ALL
lyy  ALL=(ALL:ALL) ALL
```

切换用户
su lyy

切换到 root
sudo su
<commit_msg>format<commit_after>---
layout: post
title:  "[linux] 建立一个新的账号"
date:   2018-11-14
comments: true
categories: linux
tags: linux, new user
description:
published: true
---

删除用户

```
userdel huangjian 
```

添加用户

```
useradd -r -m -s /bin/bash huangjian
```

设置用户密码

```
passwd huangjian
```

添加 root 权限

```
chmod +w /etc/sudoers
vim /etc/sudoers
```

```
root ALL=(ALL:ALL) ALL
huangjian  ALL=(ALL:ALL) ALL
```

切换用户

```
su lyy
```

切换到 root

```
sudo su
```

{'fraction_non_alphanumeric': 0.15474794841735054, 'fraction_numerical': 0.01875732708089097, 'mean_word_length': 3.5185185185185186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4543153', 'n_tokens_mistral': 437, 'n_tokens_neox': 412, 'n_words': 106}