chown username file,... 改变文件的属主(只有管理员能够使用此命令)
-R:修改目录及其内部文件的属主
-reference=somefile_path file,...把想要设置属主的文件设置成和指定路径文件同样的
chown username:groupname file,...
chown username.groupname file...同时修改属主,属组
-R
-reference=somefile_path file,...
chgrp grpname file,...修改属组
-R
-reference=somefile_path file,...
chmod: 修改文件的权限
修改三类用户的权限(u,g,o, a)
chmod mode file...
-R
-reference=somefile_path file,...
修改某类用户权限
chmod 用户类别=mode file,....
修改某类用户的某些位权限
chmod 用户类别+|-mode file,...( chmod u+w /tmp/helloworld/)shell
手动添加用户(添加到三个文件)
[root@iZ28ec8xq8vZ openstack]# nano /etc/group
[root@iZ28ec8xq8vZ openstack]# nano /etc/passwd
[root@iZ28ec8xq8vZ openstack]# nano /etc/shadow
[root@iZ28ec8xq8vZ openstack]# openssl passwd -1 -salt '123456'bash
umask:遮罩号
文件 666-umask
目录 777-umask
文件默认不能具备执行权限,若是结果具备可执行权限则解决+1
umask027code
用户登陆Shell类型
登录式shell:
正常经过某终端登录的shell;
使用su -username/su -l username 登录
非登录式shell
su username;
图像终端下打开的命令窗口
自动执行的shell脚本ssl
bash的配置文件openssl
登录式shll如何读取配置文件
/etc/profile--->/etc/profle.d/.sh-->~/.bash_profile--->~/.bashrc-->etc/bashrc
非登录式shell如何配置文件
~/.bashrc -->etc/bashrc -->/etc/profile.d/.sh
ls -l which passwd
登录