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. 利用context组件数据传递

    react的数据传递 是从父级向子级传递的.通过props.如果是很多组件需要的数据,通过props传递会非常麻烦.这个时候可以使用context. context需要可以类似于store但是也不能滥 ...

  2. 记maven打包加入外部jar后tomcat运行失败问题

    环境:maven 3.8.0 .tomcat 8.5.30 因为项目需要额外的引用外部jar,需要打包到war中. 所以在pom中加入了 <webResources> <resour ...

  3. STP理论基础

    目的 防止二层环路及防止环路造成的广播风暴以及引起的MAC表震荡 方法 首先,所有配置了STP的交换机互相向相邻交换器(配置了STP的)发送BPDU(协议数据单元),选举根桥(根交换机),根交换机上所 ...

  4. css 实现 加载中动画效果

    上代码: <style> .pswp__preloader__icn { opacity:0.75; width: 24px; height: 24px; -webkit-animatio ...

  5. 统一单点登录&跳转

    在客户端输入地址(xxx.xxx.xxx/controll/方法/参数) 服务端到controll层 进行数据匹配 跳转 前端响应情况 图片跳转与列表跳转 图片:编写跳转函数 列表公用图片跳转函数,@ ...

  6. windows远程桌面之前用于连接到xxx的凭据无法工作

    使用windows远程桌面连接时报错提示: 之前用于连接到xxx的凭据无法工作 确认输入的用户名密码没有问题 解决方法: 打开gpedit.msc组策略管理,依次找到 计算机配置 > windo ...

  7. matlab判断操作

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

  8. ADC采样信号RMS测量值的Verilog实现

    术语"RMS"代表"Root-Mean-Squared".大多数书籍将此定义为"产生与等效直流电源相同的加热效果的交流电量",或者沿着这些线 ...

  9. CToolsDetachBehaviors

    CTools dispatches the event "CToolsDetachBehaviors" when the modal gets closed. Careful th ...

  10. ES bool查询

    一.bool查询包含四种操作 1.must 2.must not 3.filter 4.should 二.功能 1.must 对应mysql的 and a= 2.must not 对应mysql的 a ...