RHCE033 Lecture14 $

本文介绍了 Linux 系统中用户管理的基本操作,包括用户添加、删除、组管理及权限设置等,并详细解释了 UID、GID 的作用以及 umask、suid 和 sgid 的使用方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Data stored on the hard disk is stored numberically

 

ex: 

 

ueradd test01

 

ll-d /home/test01/

 

userdel test01

 

UID or GID are 2023   ,for  The user is deleted

 

tail /etc/shadow

 

useradd

 

useradd -s /sbin/nologin 

 

uesermod -a -G users david

 

add user to a group

 

uid

gid        user's private group

Gid       add group

 

tom: gid  

 

ll /var/log/messages

 

ps -ef |grep log

 

id mail

 

last  

 

lastb    serch who login in my computer

 

umask :

 

                        666       777 

root :022         644       755

 

        002          664       775

 

        033          644       744

 

                     rw-rw-rw-

033              ---wx-wx   

                     rw-r--r-- 

                         644

 

 

suid  command run with permissions of the owner of the command .not executor of the command

 

sgid  command runs with group affiliation of the group of the command

 

find / -perm -2000

------------------------------------

mkdir /data

 

chmod 777 /data

 

chmod g+s  /data

 

chgrp users /data/

 

usermod -a -G users user1

 

usermod -a -G users david

 

4   suid 2 sgid  1stiky

chmod 3777

 

find / -perm -4000     find the suid firm

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值