一品网
  • 首页

shell-linux普通用户自动登录root脚本


执行该脚本需要用到expect,所有需要安装expect工具(yum -y install expect)

#!/usr/bin/expect

set timeout 2

spawn su

expect "Password:"

exec sleep 1

send "实际的root密码\r"

expect "#"

interact

shell

相关


shell(5):expr使用

.net core 2.2 部署CentOS7(3)安装Xshell操控CentOS7

Shell脚本 全局变量、局部变量

linux:ssh管理端 shell

Shell 脚本编程

shell diff + kettle = mail 预警

shell 拼接html table 发送邮件

linux shell 删除满足正则表达式的文件

Xshell远程SSH报错:服务器发送了一个意外的数据包。RECEIVED:3,EXPECTED:20

绕不过去的正则(re)、shell的通配符

Linux---1.11.shell(环境变量配置文件)

Linux Shell获取CCTV5节目单

标签

一品网 冀ICP备14022925号-6