码迷,mamicode.com
首页 >  
搜索关键字:expect 批量修改密码    ( 1299个结果
微软的操作系统中让 32 位支持大于 4GB 的内存。
先给一个参考文献:The RAM reported by the System Properties dialog box and the System Information tool is less than you expect in Windows Vista or in Windows X...
分类:其他好文   时间:2015-06-24 09:16:18    阅读次数:117
PowerShell批量修改AD用户密码属性
需求:非常普通的一个需求,就是给AD用户修改密码,但是问题是量太大了。所以写了个脚本cls $pass=ConvertTo-SecureString-AsPlainText12333333344.abc-Force Import-Csv-Pathd:\pp.csv|foreach{ Get-ADUser-Identity$_.name|Set-ADAccountPassword-Reset-NewPassword$pass Ge..
分类:系统相关   时间:2015-06-23 13:47:45    阅读次数:985
perl远程交互简易示范版
#!/usr/bin/perluseExpect;#前提是你的服务器上得有Expect包,没有请安装,否无法使用交互my$PROMPT=‘[\]\$\>\#]\s*$‘;#远程系统的命令提示符模式@a=qw#100.100.100.200root#;#假设你要登陆的主机ip是100.100.100.200用户是root$obj=Expect->spawn("ssh-l$a[1]$a[0]")ord..
分类:其他好文   时间:2015-06-17 01:54:38    阅读次数:130
expect
expectexpect是可以实现服务器之间自动交互的工具I、expect安装expect工具是否安装:在Linux系统命令行执行whichexpect,若返回/usr/bin/expect表示已经安装过,反之则没有安装。expect安装说明:安装有RPM包可下载expect的RPM包,依赖tcl包,所以tcl也要一并安装。expect安装..
分类:其他好文   时间:2015-06-16 19:28:44    阅读次数:95
实现真正的自动化,expect脚本语言使用
实现真正的自动化,expect脚本语言使用expect中的几个重要句子:expect的核心是spawnexpectsendsetspawn调用要执行的命令expect等待命令提示信息的出现,也就是捕捉用户输入的提示:send发送需要交互的值,替代了用户手动输入内容set设置变量值interact执行完成后保持交互状态..
分类:编程语言   时间:2015-06-10 12:32:38    阅读次数:183
linux expect工具使用
shell脚本需要交互的地方可以使用here文档是实现,但是有些命令却需要用户手动去就交互如passwd、scp,对自动部署免去用户交互很痛苦,expect能很好的解决这类问题。expect的核心是spawn expect send set spawn 调用要执行的命令 等待命令提示信息的出现,也....
分类:系统相关   时间:2015-06-10 10:16:15    阅读次数:318
设计模式之十三:适配器模式(Adapter)
适配器模式: 将一个类的接口转换成另外一个期望的类的接口。适配器允许接口互不兼容的类一起工作。Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompati...
分类:其他好文   时间:2015-06-07 13:53:29    阅读次数:169
使用 expect 自动登录
今天在玩Linux,在root与普通用户之间切换,老是要输入密码,然后突然有个想法,自己写个shell脚本执行自动切换此不是更方便,瞎搞了一下不行,然后google上搜一下,原来纯shell做不了这个事,要用expect,以下安装步骤:1:下载需要用到的包,因为安装expect要用到tcl,tcl下...
分类:其他好文   时间:2015-06-05 00:23:28    阅读次数:190
AppCompat does not support the current theme features
1.stackoverflow里的回答是这样的,也是普遍的情况: AppCompat is now more strict on what it expect in theme window flags, more closely matching what you would get from the framework. The main reason behind this ...
分类:移动开发   时间:2015-06-03 21:40:25    阅读次数:193
likely, unlikely的作用
在项目中看到了likely、unlikely宏的使用, 一直不是很清楚它们的作用,所以就深究下。likely表示被测试的表达式大多数情况下为true, unlikely则表示相反。 两个宏定义:#define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0)这两个宏经常在条件转移的...
分类:其他好文   时间:2015-06-03 11:54:23    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!