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. ARM的发展史以及架构解析

    本文从ARM的发展历史着手,以S3C2440为例与51单片机进行对比分析,详细解析了ARM架构. 先来谈一下ARM的发展史:1978年12月5日,物理学家Hermann Hauser和工程师Chris ...

  2. gopher必读文章

    Getting Started with Go Programminghttps://www.programiz.com/golang/getting-startedHow to Write Go C ...

  3. supervisord and pm2 进程守护工具

    目录 安装 pm2 config pm2是一个带有负载均衡功能的应用进程管理器,类似有Supervisor,forever supervisor 特点: 代码修改,实时重启 安装 npm instal ...

  4. class_task

    #!/usr/bin/python # -*- coding: UTF-8 -*- class Task():     _cls_name = "cls name"     def ...

  5. 如何完整卸载catia?

    如何完整卸载catia?完全彻底卸载删除干净catia各种残留注册表和文件的方法和步骤.如何卸载catia呢?有很多同学想把catia卸载后重新安装,但是发现catia安装到一半就失败了或者显示cat ...

  6. 查找数组中某个元素出现的次数,例如数组arr=[1,2,3,4,3,4,5,3]中target=3出现的次数

    1 function(arr,target) { 2 3 let num = 0 4 5 arr.forEach((item, index) => { 6 7 if (item===target ...

  7. @Component类相互引用的加载顺序

    发现bug:没有消息通知,看日志发现调用消息通知的url前缀为null,定位到此工具类 进入工具类 进入ComponentConstant类:它引用了两个配置类 问题:component标注的类相互引 ...

  8. Ftp连接-200 Switching to ASCII mode,227 Entering Passive Mode

    测试 ftp 服务器是否部署成功,最简单的方法,就是找个 windows 系统直连服务器,能连上就说明服务部署成功了.不过,有时候即使 ftp 服务部署成功了,windows 系统依然连接不上服务,这 ...

  9. k8s centos 79,用kuboard-spray装成功。低版本的。安装docker-ce,安装epel源

    安装日志 #安装epel源 yum install epel-release -y --nogpgcheck # 安装docker-ce yum install -y yum-utils device ...

  10. Flutter 3.+更新记录

    Flutter3.3稳定版出来了,于是决定把之前Flutter工程的代码更新下其中里面有些涉及到组件的弃用 在此记录 ElevatedButton 代替了 RaisedButton 为带阴影的悬浮按钮 ...