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. 【SSO单点系列】(9):CAS4.0 之客户端排除不需要过滤的路径

    客户端排除不需要过滤的路径 Web.xml <filter> <filter-name>CASFilter</filter-name> <filter-cla ...

  2. yagmail 邮件模块

    安装 yagmail 安装yagmail:https://coding.net/s/01e2c2fe-82c0-4e05-a31b-f3e9e2dbc43a 下载完成之后,cmd 切换到文件目录下,执 ...

  3. TypeScript 学习之路

    一.下载与安装 二.变量与数据类型 三.函数 四.类

  4. for循环axios套axios调用,同步调取

    1.function getsdd(){}事件 async/await把异步进行设置成同步进行 var url = '/api/runtime/form/save'; function checkAd ...

  5. linux 中后台运行python脚本

    nohup python yourscript.py &可以让你的程序在后台运行,控制台输出导向nohup.out文件 使用nobup命令 结尾处加一个& 符号

  6. blog2对PTA4,5,6集的习题总结

    一.      前言 通过本三次PTA得题目,我受益匪浅.题量的话不算太多,但是题目难度有些大.在本次PTA第六次题目集中,题目难度较中,第四次题目集第一道水文数据处理与第五次题目集的查询关键字出现次 ...

  7. 分布式锁 -- redis

    原理 redis设置一个key和value,如果存在则获取锁失败,不存在则获取锁成功处理业务,业务处理完成后删除这条数据,可以带个失效时间. 代码 public void handleInvoice( ...

  8. Linux: Ensure X Window System is not installed

    参考 2.2.2 Ensure X Window System is not installed X window System是什么 The X Window System provides a G ...

  9. 小程序嵌套h5webview.特定时间跳转小程序页面.调起e证通的人脸核身.成功了返回webview.

    e证通链接. https://cloud.tencent.com/document/product/1007/56643#3.2-.E5.AE.89.E8.A3.85-sdk

  10. GraalVM, Native Image, Java on Truffle, LLVM runtime, WebAssembly, JavaScript and Node.js关系是什么

    GraalVM, Java on Truffle, LLVM runtime, WebAssembly, JavaScript and Node.js关系是什么 GraalVM是一个JDK发行版,支持 ...