海运的博客

此内容被密码保护

发布时间:December 29, 2013 // 分类:常用软件 // 2 Comments

请输入密码访问

Diff文件目录比较工具

发布时间:December 7, 2013 // 分类:常用软件 // No Comments

常用参数:

-b 忽略空格数目的不同
-B 忽略空白行
-q 只列出两个文件有无差异,并不比较
-a 强制比较二进制文件
-c 显示不同之处的前后部分内容
-r 比较目录时,比较其子目录
-y 在两侧显示两个文件
--suppress-common-line 只显示两个文件不同的行,否则不显示
--left-column 仅当两个文件不同时才显示右侧行,否则只显示左侧行

示例:

diff -r -y --left-column dir1 dir2

Ghost官方Symantec下载地址

发布时间:December 10, 2012 // 分类:常用软件 // No Comments

官方symantec_ghost_solution_suite升级包:
Ghost:
ftp://ftp.symantec.com/public/english_us_canada/products/symantec_ghost_solution_suite/2.5/updates/GSSB2174.zip
Ghostexp:
ftp://ftp.symantec.com/public/english_us_canada/products/symantec_ghost_solution_suite/2.5/updates/Ghostexp-B1597.zip
或直接下载symantec_ghost_solution_suite提取:
symantec_ghost_solution_suite2.51中文版:
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_2.5.1_AllWin_CS.exe
英文版:
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_2.0_AllWin_EN.exe //11.0.0.1502
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_2.0.1_AllWin_EN.exe //11.0.1.1533
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_2.0.2_AllWin_EN.exe //11.0.2.1573
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_2.5_AllWin_EN.exe //11.0.5.2266

2018.02.09更新:
当前ghost版本12.0.0.10561,12.0.0.10531之后的版本备份的格式可能不兼容之前的版本:
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Standard_Tools_3.2_RU5.msi
http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Solution_Suite_3.2_RU5.exe
12.0.0.10531版本下载:

wget --header="Cookie: veritas_main" http://esdownload.symantec.com/akdlm/CD/MTV/Symantec_Ghost_Standard_Tools_3.2_RU2.msi

Linux下NetFlow输出工具Fprobe

发布时间:October 27, 2012 // 分类:常用软件 // 4 Comments

Fprobe通过libpcap监听数据并输出NetFlow格式到分析端,极大方便网络管理及监控。
所需组件安装:

yum install libpcap-devel

Fprobe安装:

wget http://sourceforge.net/projects/fprobe/files/fprobe/1.1/fprobe-1.1.tar.bz2
tar jxvf fprobe-1.1.tar.bz2
cd fprobe-1.1/
./configure 
make
make install

Fprobe监听eth0数据并输出NetFlow到127.0.0.1:9995:

fprobe -i eth0 127.0.0.1:9995

NetFlow分析端可使用Nfsen,测试下是否有Netflow数据输出:

tcpdump -i lo -nn port 9995
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 96 bytes
14:49:33.004041 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 1464
14:49:43.006334 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 1464
14:49:48.003252 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 264
14:49:53.002271 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 744
14:49:58.002295 IP 127.0.0.1.57368 > 127.0.0.1.9995: UDP, length 456

WinSCP普通用户登录sftp切换到root权限

发布时间:August 28, 2012 // 分类:常用软件 // No Comments

一般服务器为安全禁止ssh下root账号登录,此时使用sftp登录管理服务器只能使用普通账号登录,给管理带来诸多不便,可以设置为特定普通SSH用户添加sudo权限,登录到sftp时可sudo切换到root权限下。
查看sftp-server执行文件目录:

cat /etc/ssh/sshd_config|grep sftp
Subsystem    sftp    /usr/libexec/openssh/sftp-server

编辑/etc/sudoers为特定用户添加执行sftp sudo权限:

#https://www.haiyun.me
user ALL=NOPASSWD:  /usr/libexec/openssh/sftp-server

后续如果登录失败日记显示:

sorry, you must have a tty to run sudo ; TTY=unknown

需在/etc/sudoers内注释此行:

#Defaults    requiretty  

sftp客户端设置登录以sudo权限执行sftp,下图以winscp为例:

sudo /usr/libexec/openssh/sftp-server

winscp设置普通用户切换到root.png
此时用winscp登录就是root权限了,对整个系统的文件都拥有生杀大权。。。

分类
最新文章
最近回复
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...
  • jiangker: good, very helpful to me
  • fengfeng: N1 armbian 能有编译下内核吗。。我要开启can 不懂怎么操作