03 2013 档案
chmod命令(chmod函数)自动清除设置用户ID位和设置组ID位
摘要:《UNIX环境高级编程(第2版)》 4.9节1.chmod自动清除“设置组ID位”user3@SuSE11SP2-1:/home/user1/setgid> iduid=1003(user3) gid=1003(group3) groups=1003(group3),16(dialout),33(video)user3@SuSE11SP2-1:/home/user1/setgid>user3@SuSE11SP2-1:/home/user1/setgid> ls -ld .drwxr-srwx 2 user1 users 4096 Mar 20 12:40 .user3@SuS 阅读全文
posted @ 2013-03-21 00:46 龍蝦 阅读(1029) 评论(0) 推荐(0)
最简单的非交互ssh远程执行命令expect脚本
摘要:标题有点绕口~#!/usr/bin/expect -fif { $argc<4 } { puts stderr "Usage: $argv0 <host> <user> <passwd> <cmd>" exit 1 }set HOST [lindex $argv 0]set USER [lindex $argv 1]set PSWD [lindex $argv 2]set CMDS [lindex $argv 3]log_user 0set timeout 3spawn -noecho ssh $USER@$HOST & 阅读全文
posted @ 2013-03-14 23:47 龍蝦 阅读(788) 评论(0) 推荐(0)