目录
test localhost=/usr/sbin/useradd,/usr/sbin/ifconfig
这样就可以 使普通用户 有添加用户和ifconfig的命令
find / -type f ( -perm -00007 ) -a -ctime -1 |xargs -I {} ls -lh {}
[root@localhost log]# awk -F: ‘($3==0){print $1}’ /etc/passwd
查找使用的用户
查找切换失败的用户
确定组ID起始值
找出UID>1000的用户的组的信息,看一下组ID是否是0,0代表root
找出能登录系统用户其中,去除root以后,gid应该大于1000
grep -v ^# /etc/login.defs | grep “GID_MAX”|awk ‘{print $2}’
awk -F: ‘$3>=1000{print $1}’ /etc/passwd | xargs -I {} grep /etc/group
grep -v “/sbin/nologin” /etc/passwd |awk -F: ‘{print $1}’ /etc/passwd | xargs -I {} grep /etc/group
首先尝试 本地用户 次数
不能用以前使用的密码
验证5次
这里需要认证三个文件都需要加入这一行内容
查看用户错误次数
G:组 o:other -w:去掉w权限
027:默认建立的文件没有权限了
*:所有 可以写 用户名 或者 组的形式 —> @组名
Soft/hard:软限制还是硬限制
Core:dump文件 nproc:限制进程数量 rss:针对内存的用量
//随后加载 模块 才能生效
使用 ualias 取消
find / -type f ( -perm -00007 ) -a -ctime -1 |xargs -I {} ls -lh {}
粘滞位只有 属主 用户 也就是说 uid有效,gid无效 组id更没用
@@是 UPD 协议 @ 是TCP协议
//171机器
//排除本地主机的日志文件
t e m p l a t e R e m o t e , " / v a r / l o g / template Remote,"/var/log/% templateRemote,"/var/log/YEAR%-% M O N T H MONTH%-% MONTHDAY%/%fromhost-ip%.log"
:fromhost-ip, !isequal, “127.0.0.1” ?Remote
& stop
//重启日志系统
//需要注意这个填写no ,finalshell上不去
对方 ip:100进来的连接22端口 拒绝
建议修改成 8192
022的文件的权限 是 644
#!/bin/bash
for DIR in cut -d":" -f6 /etc/passwd
;do
if [ -e D I R / . n e t r c ] ; t h e n e c h o " DIR/.netrc ];then echo " DIR/.netrc];thenecho"DIR/.netrc"
fi
done
不影响业务的补丁才能用,需要 sha256一下!!!
Update更新会影响大面积的问题,进来用rpm
等多长时间以后就超时了
能删除的账户就删除,能禁用的账户先禁用
//bat处理
net share c$ /delete
net share ipc$ /delete
net share admin$ /delete
net share c$ /delete
net share d$ /delete
net share e$ /delete
net share f$ /delete