hjrhyer8324
03-28-2011, 04:50 AM
,CA Canada Goose women's Vest (http://www.cheapcanadagoosesale.com/canada-goose-womens-vest-c-7.html)
今天测试了下前两天写的脚本,mens moncler jackets (http://www.lovemonclerjacket.com/moncler-mens-jackets-c-3.html),发现了sudo执行报错的问题,下面是报错的信息:
sudo: sorry, you must have a tty to run sudo
查了些资料,canada goose parka09825 (http://forum.zapavto.ru/viewtopic.php?p=11112#11112),supra shoes store (http://www.supraokay.com/),说是用visudo命令修改sudo的配置文件,outlet puma13950 (http://www.szsksw.com/plus/view.php?aid=324802),mens timberland roll top (http://www.timberlands.org.com/timberland-men-rolltop-boots-c-292.html),注释掉Defaults requiretty,希望设计师多看 多学・ (http://www.dwkjy.com/Review.asp?NewsID=1325)。这个方法是可以的,Canada Goose Solaris Parka (http://www.cheapcanadagoosesale.com/canada-goose-solaris-parka-c-5.html),问题出在我没有权限去改这个配置,我只有执行sudo命令的普通用户权限,而我又要用脚本 来批量处理我的工作,shoes puma (http://www.pumashoesokay.com/),代替我的手工输入,discount fendi handbags (http://www.handbagsokay.com/)。
脚本里我连接远端服务器用expect代替我输入登录服务器的密码和在远端服务器上执行一些sudo的命令 ,Waterproof Boots (http://www.timberlands.org.com/timberland-men-6-inch-boots-c-290.html)。从报错的提示信息看是需要一个tty才可以执行sudo命令,timberland 2010 (http://www.timberlands.org/timberland-2010-new-style-c-289.html),所以虚拟一个tty出来应该就可以了,women moncler vest onsale (http://www.lovemonclerjacket.com/womens-moncler-vest-c-7.html)。
用script和expect都可以虚拟出来一个终端:
setsid script -c 'command' /dev/null
setsid expect -c 'command'
今天测试了下前两天写的脚本,mens moncler jackets (http://www.lovemonclerjacket.com/moncler-mens-jackets-c-3.html),发现了sudo执行报错的问题,下面是报错的信息:
sudo: sorry, you must have a tty to run sudo
查了些资料,canada goose parka09825 (http://forum.zapavto.ru/viewtopic.php?p=11112#11112),supra shoes store (http://www.supraokay.com/),说是用visudo命令修改sudo的配置文件,outlet puma13950 (http://www.szsksw.com/plus/view.php?aid=324802),mens timberland roll top (http://www.timberlands.org.com/timberland-men-rolltop-boots-c-292.html),注释掉Defaults requiretty,希望设计师多看 多学・ (http://www.dwkjy.com/Review.asp?NewsID=1325)。这个方法是可以的,Canada Goose Solaris Parka (http://www.cheapcanadagoosesale.com/canada-goose-solaris-parka-c-5.html),问题出在我没有权限去改这个配置,我只有执行sudo命令的普通用户权限,而我又要用脚本 来批量处理我的工作,shoes puma (http://www.pumashoesokay.com/),代替我的手工输入,discount fendi handbags (http://www.handbagsokay.com/)。
脚本里我连接远端服务器用expect代替我输入登录服务器的密码和在远端服务器上执行一些sudo的命令 ,Waterproof Boots (http://www.timberlands.org.com/timberland-men-6-inch-boots-c-290.html)。从报错的提示信息看是需要一个tty才可以执行sudo命令,timberland 2010 (http://www.timberlands.org/timberland-2010-new-style-c-289.html),所以虚拟一个tty出来应该就可以了,women moncler vest onsale (http://www.lovemonclerjacket.com/womens-moncler-vest-c-7.html)。
用script和expect都可以虚拟出来一个终端:
setsid script -c 'command' /dev/null
setsid expect -c 'command'