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. MSSql 跨服务器查询解决方案

    先确定从服务器是否允许有外部链接的服务器: select * from sys.servers 没有的话,需要添加服务器链接: EXEC sp_addlinkedserver @server='10. ...

  2. Java的引用(强软弱虚)

    Java中引用相关的类 类 名 说明 ReferenceQueue 引用队列 与某个引用类绑定,当引用死亡后会进入这个队列对象标记为垃圾(并不代表回收了)后或虚引用的对象被回收后,会加入到引用队列 H ...

  3. (0403)位运算符+interface

    1)interface 2)位运算符

  4. (0319) uvmgen的使用,产生的UVM环境介绍

    qq https://blog.csdn.net/hh199203/article/details/118210541

  5. Camstar配置Audit Trail

  6. go 标准输入输出

    使用 bufio 处理带有空格分隔的不定长字符串 func main() { scanner := bufio.NewScanner(os.Stdin) for i := 0; i < 2; i ...

  7. matlab判断操作

    类型判断 1.查看变量类型时可用class,判断某变量的类型值:会生成0或1,1-匹配,0-不匹配 isa(Data,'double') isa(Data,'cell') 2.也可用如下. strcm ...

  8. SSH远程服务器时报错 /bin/bash : Permission denied

    SSH远程服务器时报错 /bin/bash : Permission denied 今日接到用户那边的报障,/bin/bash : Permission denied报错,用户使用的是具有sudo权限 ...

  9. ssl自动更新证书

    安装证书 yum install certbot 更新证书之前先开启80 443 端口 自动生成证书certbot certonly --standalone --agree-tos -n -d ww ...

  10. 蓝桥杯训练赛二-2021 问题 G: 坐标排序

    题目描述 请将坐标x,y,z依照以下规则排序: x为第一关键字,当x相同时,依照y(第二关键字)大小来排序,当y相同时,依照z大小来排序(第三关键字) 给出了若干坐标,和一个数k,请输出按关键字排序第 ...