Files
obsidian_note/技术探究/Linux/Linux系统用户.md
2025-12-04 09:12:56 +08:00

58 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### 所有环境均为security用户
```
#### 设置用户 工作 目录
mkdir /data/security
useradd -d /data/security -m security
#### 设置用户密码
passwd security
asiainfo_4321
chown -R security:security /data/security
chmod 760 /data/security
usermod -d /data/security security
cp /etc/skel/.bashrc /root/
cp /etc/skel/.bash_profile /root/
yum install -y java-devel
#### 设置主机名称
hostnamectl set-hostname xxxxx
```
修改文件格式内容换行符号
``` sed -i s/\r// **.sh```
### **chmod u+x**
chmod是权限管理命令change the permissions mode of a file的缩写。。
u代表所有者
x代表执行权限。
 + 表示增加权限。
chmod u+x *.sh 就表示对当前目录下的*.sh文件的所有者增加可执行权限
### 切换系统用户
> sudo -i
### 自定义 命令
```
vi ~/.bashrc
alias mysql5.7='/data/cnds/mysql/link_mysql-5.7.37.sh'
```
### 图形化 ui 界面
https://blog.csdn.net/u011811066/article/details/131155350
### 免密 互信
> https://blog.csdn.net/m0_71751187/article/details/138846235
>