随笔-13  评论-11  文章-0  trackbacks-0
  2010年9月14日
编辑/root/.vnc/xstartup
把twm改成startkde
如果安装的是gnome
把twm改成exec gnome-session

然后vncserver
再重新连入vnc就进入图形界面了

posted @ 2010-09-14 17:29 笑笑 阅读(311) | 评论 (0)编辑 收藏
  2010年4月11日
使用AIX系统连接XIV后,装好XIV host attach的安装包后运行cfgmgr依然会出现这样一个warning:
# cfgmgr
cfgmgr: 0514-621 WARNING: The following device packages are required for
        device support but are not currently installed.
devices.fcp.array

不影响使用,暂未找到解决办法。

posted @ 2010-04-11 11:54 笑笑 阅读(673) | 评论 (1)编辑 收藏
  2010年3月30日
临时修改环境变量
export PATH=/.../.../... (大小写敏感)
e.g.
export /usr/lpp/mmfs/bin
将GPFS的命令export出来,只对当前会话有效

永久修改环境变量
修改.bash_profile文件
在PATH变量后加上需要增加的内容

e.g.

PATH=$PATH:$HOME/bin:/usr/lpp/mmfs/bin (红色部分是新增内容)
保存后使用
source .bash_profile命令使修改生效。

这样操作可对当前用户的环境变量修改永久有效。


posted @ 2010-03-30 13:58 笑笑 阅读(184) | 评论 (0)编辑 收藏
  2010年3月15日
sddpcm_get_config -Av
这个命令可以在主机端查看DS4K/5K的LUN是否分布在Prefer的controller上
                                                                 
AIX:/#sddpcm_get_config -Av                                      
Frame id 0:                                                      
    Storage Subsystem worldwide name: 60ab8006e56e00004b85d99c   
    Controller count: 2                                          
    Partition count: 1                                           
    Partition 0:                                                 
    Storage Subsystem Name = 'DS5100'                            
        hdisk      LUN #   Ownership          User Label         
        hdisk2         0   A (preferred)      LUN01              
        hdisk3         1   B (preferred)      LUN02              
        hdisk4         2   A (preferred)      LUN03              
        hdisk5         3   B (preferred)      LUN04              
        hdisk6         4   A (preferred)      LUN05              
        hdisk7         5   B (preferred)      LUN06              
        hdisk8         6   A (preferred)      LUN07              
        hdisk9         7   B (preferred)      LUN08              
        hdisk10        8   A (preferred)      LUN09              
        hdisk11        9   B (preferred)      LUN10              
        hdisk12       10   A (preferred)      LUN11              
        hdisk13       11   B (preferred)      LUN12              


posted @ 2010-03-15 18:17 笑笑 阅读(876) | 评论 (0)编辑 收藏
  2009年12月2日
在VMware ESX上装好Guest OS后点shut down后会提示你没有装vmware tool,这个动作是不能被执行的。VMware tool里有一些优化图形化界面,识别新设备(pvscsi)等driver。
安装VMware Tool不需要特别插入光盘。
点VM->Guest->Install/Upgrade VMware Tools即可。
Redhat5上,安装完RPM包后,需要执行:
/usr/bin/vmware-config-tools.pl
按照提示,完成后才能完成安装VMware tool。
Windows2008按照wizard提示即可完成安装。


posted @ 2009-12-02 18:05 笑笑 阅读(245) | 评论 (0)编辑 收藏
  2009年11月30日
crontab:

crontab -e可以编辑linux下的计划任务,格式是
Min Hour Day Mon DoW CMD
分钟 小时 天 月 一周中的某一天 命令

1 1 * * 1 date
就是在每周一的1点零1分执行 date这个命令,其他使用方式网上可以搜到很多类似的使用方式。

这里要说的是,crontab -e命令将编辑的内容直接写入/etc/crontab 这个文件,执行这个命令后,计划任务是可以直接被启用的,用crontab -l命令可以看到。

也可以直接使用vi编辑/etc/crontab文件,编辑好后用crontab -l可能发现提示你当前用户下没有计划任务,这个时候不要觉得奇怪,只要crontab /etc/crontab一下,就可以使用了。

posted @ 2009-11-30 23:14 笑笑 阅读(199) | 评论 (0)编辑 收藏
  2009年11月21日
在默认情况下,windows2003使用的SCSI controller是LSI Logic,如果有需要使用Buslogic,直接把Controller的类型改成Buslogic会有一些问题,我遇到过的问题有无法认出硬盘,开机后完全黑屏等。如果要成功的使用Buslogic安装windows2003,需要以下一些操作。

1)不要以默认方式创建虚拟机,要选择custom方式

在选择SCSI Controller时选择BusLogic

2)创建好之后,要将系统中自带的一个flp文件load进虚拟软驱里,并选择(Connected at power on)

3)这个时候可以开机启动,现在就可以读到虚拟光驱里的安装文件(iso文件)了,在启动过程中按下F6键,将软驱中的driver读取进来,后边就可以正常安装了。

如果开机后认不到安装盘,可能是BIOS里,光驱不是作为第一个启动选项,可以在Edit Setting里,修改设置,强制系统开机后进入BIOS设置:

然后到启动项,将光驱提升到第一个:

这样就可以正常安装了。

posted @ 2009-11-21 23:35 笑笑 阅读(1456) | 评论 (0)编辑 收藏
真是惭愧,用了这么久的linux才意识到在linux下正在被使用的文件是可以被删除的,虽然这个早就知道,可是从来没有意识到。用惯了windows都知道,在winodws里一个文件正在使用的情况下是不能被删除的,系统会提示你正在被使用,但是linux下会不做任何提示的删除,不过文件所占用的空间直到使用结束后才被释放。所以在使用linux的情况下,删除重要文件的操作一定要谨慎哦~
posted @ 2009-11-21 01:03 笑笑 阅读(1032) | 评论 (0)编辑 收藏
  2009年11月20日
课本里学的信息安全,今天在工作中第一次实际使用,一开始很想翻译一下这个Challenge-Handshake Authentication Protocol,可是想了半天也没有想到什么合适的翻译,search了一下,发现中文翻译是:挑战握手协议,台湾的翻译是:验证通讯协议。现在我不得不承认有一些词语的翻译,还是台湾翻译的好一些,其实未必非要直译出来,否则听起来好奇怪。

挑战握手协议(Challenge-Handshake Authentication Protocol,CHAP)是一个用来验证用户或网络提供者的协议。负责提供验证服务的机构,可以是互联网服务供应商,又或是其他的验证机构。

CHAP 用于使用3次握手周期性的验证对端身份。在链路建立初始化时这样做,也可以在链路建立后任何时间重复验证。

  1. 在链路建立完成后,验证者向对端发送一个“challenge”信息。
  2. 对端使用一个“one-way-hash”函数,例如MD5,计算出的值响应这个信息。
  3. 验证者使用自己计算的hash值校验响应值。如果两个值匹配,则验证是承认得,否则连接应该终止。
  4. 在随机时间,验证端发送一个“challenge”给对端,重复1到3步。

CHAP通过增量改变标识和“challenge-value”的值避免“playback attack”攻击。验证的两端都需要知道“challenge”信息的明文,但不会在互联网上传播。

注:以上内容来自维基百科。

CHAP:挑战握手认证协议 (Challenge Handshake Authentication Protocol)

挑战握手认证协议(CHAP)通过三次握手周期性的校验对端的身份,在初始链路建立时完成,可以在链路建立之后的任何时候重复进行。

  1. 链路建立阶段结束之后,认证者向对端点发送“challenge”消息。
  2. 对端点用经过单向哈希函数计算出来的值做应答。
  3. 认证者根据它自己计算的哈希值来检查应答,如果值匹配,认证得到承认;否则,连接应该终止。
  4. 经过一定的随机间隔,认证者发送一个新的 challenge 给端点,重复步骤 1 到 3 。

通过递增改变的标识符和可变的挑战值,CHAP 防止了来自端点的重放攻击,使用重复校验可以限制暴露于单个攻击的时间。认证者控制验证频度和时间。

该认证方法依赖于只有认证者和对端共享的密钥,密钥不是通过该链路发送的。

虽然该认证是单向的,但是在两个方向都进行 CHAP 协商,同一密钥可以很容易的实现相互认证。

由于 CHAP 可以用在许多不同的系统认证中,因此可以用 NAME 字段作为索引,以便在一张大型密钥表中查找正确的密钥,这样也可以在一个系统中支持多个 NAME/ 密钥对,并可以在会话中随时改变密钥。

CHAP 要求密钥以明文形式存在,无法使用通常的不可回复加密口令数据库。

CHAP 在大型网络中不适用,因为每个可能的密钥由链路的两端共同维护。

协议结构

CHAP 的配置选项格式如下:

8 16 32 40 bit
Type Length Authentication-Protocol Algorithm
  • Type ― 3
  • Length ― 5
  • Authentication-Protocol ― 对于 CHAP,为 C223(Hex)。
  • Algorithm ― Algorithm 字段为八位字节,表示使用的认证方法。

CHAP 数据包结构如下所示:

8 16 32 bit Variable
Code> Identifier Length Data . . .
  • Code ― 识别 CHAP 数据包类型。CHAP 代码具有以下几种:1、Challenge;2、Response;3、Success;4、Failure。
  • Identifier ― 用于匹配 Challenges、Responses 和 Replies 信息。
  • Length ― CHAP 数据包的长度,包括 Code、Identifier、Length 和 Data 字段。
  • Data ― 0或更多八位字节。该字段格式取决于 Code 字段。对于 Success 和 Failure,Data 字段包括一个独立执行的可变信息字段

相关协议:PPPPPPoEPPPoALCPNCPPAP

组织来源:CHAP 由 IETF(http://www.ietf.org/)定义。

相关链接:http://www.javvin.com/protocol/rfc1994.pdf: PPP Challenge Handshake Authentication Protocol (CHAP)

(注:以上内容来自网络大典)

Challenge-handshake authentication protocol

In computing, the Challenge-Handshake Authentication Protocol (CHAP) authenticates a user or network host to an authenticating entity. That entity may be, for example, an Internet access provider.

RFC 1994: PPP Challenge Handshake Authentication Protocol (CHAP) defines the protocol.

CHAP is an authentication scheme used by Point to Point Protocol (PPP) servers to validate the identity of remote clients. CHAP periodically verifies the identity of the client by using a three-way handshake. This happens at the time of establishing the initial link, and may happen again at any time afterwards. The verification is based on a shared secret (such as the client user's password).

  1. After the completion of the link establishment phase, the authenticator sends a "challenge" message to the peer.
  2. The peer responds with a value calculated using a one-way hash function, such as an MD5 checksum hash.
  3. The authenticator checks the response against its own calculation of the expected hash value. If the values match, the authenticator acknowledges the authentication; otherwise it should terminate the connection.
  4. At random intervals the authenticator sends a new challenge to the peer and repeats steps 1 through 3.

CHAP provides protection against playback attack by the peer through the use of an incrementally changing identifier and of a variable challenge-value. CHAP requires that both the client and server know the plaintext of the secret, although it is never sent over the network.

Microsoft has implemented a variant of the Challenge-handshake authentication protocol, called MS-CHAP, which does not require either peer to know the plaintext.


 Working Cycle

  • Challenge Packet (System to User)
  • Response Packet (User to System)
  • Success or failure packet (System to User)

CHAP Packets

Description 1 byte 1 byte 2 bytes 1 byte Variable variable
Challenge Code = 1 ID Length Challenge length Challenge value Name
Response Code = 2 ID Length Response Length Response value Name
Success Code = 3 ID Length
Message
Failure Code = 4 ID Length
Message

CHAP packet embedded in a PPP frame. The protocol field has a value of 0xC223

Flag Address Control Protocol (0xC223) Payload (table above) FCS Flag
(注:以上内容来自英文维基百科)

今天我做的应用是在iSCSI SAN网络里对Server(host)和Storage端使用CHAP来加密,两端通过name字段来找到密钥进行验证,具体内容以后有机会再贴上来。
posted @ 2009-11-20 14:21 笑笑 阅读(671) | 评论 (0)编辑 收藏
  2009年11月19日
在安装windows2008之后,开机必须设置密码,且密码中必须包含大写字母,小写字母,数字,特殊字符中的至少3种类型,即使安装好之后想修改为简单密码也是不可以的,必须要先去禁用掉他的密码复杂性。

1)Start->Run: gpedit.msc 打开组策略编辑器
2)Local Computer Policy->Computer Configuration->Windows Settings->Security Settings->Account Policies->Password Policy
在这里把Password must meet complexity requirements properties设置成disabled

3)如果不想有密码过期的问题,可以把Maximum Password Age设成999(最大只能是999)


这样就不再限制你的密码复杂性,可以根据自己的需要来修改密码了。


posted @ 2009-11-19 23:32 笑笑 阅读(1187) | 评论 (0)编辑 收藏
仅列出标题  下一页