holiday12--linux basis

super user(root)

  • In linux, account root usually use for system maintain and managerment ,it has all access permission for all resources of system
  • In most linux system version,not recommended use root account log in system directly

sudo

  • su is abbreviation of substitute user , repersent use another user
  • sudo command used to execute commands in othter user , default identity is root

group managerment command

tips:add/delete group must execute as root

add/delete group

command action
groupadd [group name] add group
groupdel [group name] delete group
cat /etc/group make sure group information
chgrp -R [group name] [file/directory] recursive modify the group of file directory

user managerment command

tips:add/delete user or modify other users password must execute as root

add/delete user and change password

command action description
useradd -m -g [grup] [new user] add new user -m automatically create home directory, -g appoint the user's group, otherwise will create a group which has same name with user
passwd user set user's password if you are normal user, you can use passwd command to change password directly
userdel -r [user name] delete user -r option will delete home directory automatically

cat /etc/passwd | grep [user name] #make sure user's information

holiday12的更多相关文章

随机推荐

  1. React.js 修改文本中数字样式

    export function numberToColor(text, color = '#635BFF', size = '12px') { let reg = /(\d+)/g; return t ...

  2. docker私有镜像仓库搭建(简)

    1.装包 yum install docker-registry 2.启动服务 systemctl start docker-distribution 3.打标自己的镜像 docker tag mys ...

  3. Java脚本操作mysql和接口

    一.Java操作MySQL 1.插入insert 1 import java.sql.*; 2 import java.util.UUID; 3 4 public class BigData { 5 ...

  4. 数位dp( tzoj6061:Bomb-求49个数;tzoj1427: 不要62)

    6061:http://www.tzcoder.cn/acmhome/problemdetail.do?method=showdetail&id=6061 dfs记忆化搜索 #include& ...

  5. 808.11ac的MAC层

    MAC层是802.11的主要功能部分.上层应用通过调用MAC层提供的接口原语调用MAC层的功能. 在内部,MAC由除了函数还有数据,叫MIB,存储MAC的各种参数.SME是一个单独的模块,用来跟接口函 ...

  6. 19_webpack_externals

    假如我们购买了CDN服务器为我们的网站的访问速度进行优化,那么我们,该如何配置 假如我的CDN为:https://mr-hou88888/cdn/那么publicPath该如何配置 1.配置publi ...

  7. temp_laijx_2023

    ############################ [{\"itemKey\": \"jenkinsConfig\",\"itemValue\& ...

  8. windows terminal用ssh连接已重装的服务器提示REMOTE HOST IDENTIFICATION HAS CHANGED!

    连接过程提示: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFIC ...

  9. 用JMeter对MySQL数据库进行压测

    转载链接:https://www.cnblogs.com/Jadie/p/8056541.html 参考链接:https://blog.csdn.net/qq_35389417/article/det ...

  10. 设置App桌面图标上显示的角标数字

    设置应用图标上显示的数字 // #ifdef APP-PLUS plus.runtime.setBadgeNumber(number, options); plus.runtime.setBadgeN ...