解决SecureCRT不能保存 freebsd 密码

当连接centos时,SecureCRT会提醒你是否保存密码:

但是连接freebsd时,却不提醒是否保存,而是每次都需要输入密码,感觉在没有设置密钥的情况下就很麻烦。
原因:
默认SSH配置是keyboard-interactive authentication,所以你不能保存密码。
解决办法:
vi /etc/ssh/sshd_config找到#PasswordAuthentication no修改为PasswordAuthentication yes
重新启动ssh服务:
/etc/rc.d/sshd restart
再次连接,提醒窗口出现。

...

rsync 3.0.5 - ERROR: buffer overflow in recv_file_entry

环境:freebsd 7.2 X64
RSYNC:3.05
同步时报错:
ERROR: buffer overflow in receive_file_entry [receiver]rsync error: error allocating core memory buffers (code 22) at util.c(121)[receiver=2.6.9]
解决方法:
下载源码包修改rsync.h重新编译
wget http://rsync.samba.org/ftp/rsync/src/rsync-3.0.6.tar.gztar -xzvf rsync-3.0.6.tar.gzcd rsync-3.0.6./configure –prefix=/usr/local/tools/rsync/
#—
vi rsync.h 搜索
#ifndef MAXPATHLEN 在之前加上#undef MAXPATHLEN
make && make install
国外资料参考:
This is the error rsync gives when t...

Linux及FreeBSD下查看CPU信息的方法

一、Linux
查看cpu信息:
[junjie2@ljj ~]$ cat /proc/cpuinfo
二、Freebsd

大致下面几个可以显示 参考下:
dmesg 最简单的方法
freebsd# cat /var/run/dmesg.boot |grep CPU
sysctl hw.model 看cpuid
sysctl machdep.tsc_freq 看cpu频率
另个方法:
sysctl -a | egrep -i ‘hw.machine|hw.model|hw.ncpu’
或者直接通过ports
cd /usr/ports/misc/cpuid
 
make install clean
然后
可以直接通过cpuid来查看
/usr/local/bin/cpuid

...

freebsd下切换到root下su: Sorry 的解决办法

在FreeBSD下,通过ssh客户端连接到FreeBSD端,用普通的用户登录,执行下列命令报错:
$ su rootsu: Sorry$ susu: Sorry$
在FreeBSD上要使用su命令成为root用户,不但要知道root的口令,还需要经过特别设置,否则就不能成功使用这个命令。这是因为 FreeBSD对执行su命令的用户进行了更严格的限制,能使用su命令的用户必须属于wheel组(root的基本属组,组ID为0),否则就不能通过这个命令成为root用户。因此需要编辑组设置文件/etc/group,将需要超级用户权力的管理成员加入到wheel组中。
从终...

freebsd下安装rz,sz上传下载工具(rzsz)

freebsd下安装rz,sz上传下载工具(rzsz)
安装包下载:
http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
<coolcode linenum=”off”>
tar -xzvf rzsz-3.48.tar.gz
cd src
</coolcode>
修改Makefile第四行OFLAG= -O 为 OFLAG= -O -DREGISTERED
否则,编译后,在上传下载完成都会提示:
<coolcode linenum=”off”>
            **** UNREGISTERED COPY *****
Please read the License Agreement in rz.doc
      </coolcode>
<coolcode linenum=”off”>
xok# make posix

FreeBSD 设置网卡IP,网关和DNS

基本配置网卡IP与网关的配置文件是目录/etc下面的rc.conf文件.在配置之前请使用ifconfig -a来查看正确的网卡名,本人的是lnc0,
网络地址是:192.168.1.0/24的网络,IP地址为192.168.1.5,因此在rc.conf文件中添加:
ifconfig_lnc0="inet 192.168.1.5 netmask 255.255.255.0"
然后配置网关.在BSD中网关称为默认路由因此只要在rc.conf中添加一句:
defaultrouter="192.168.1.1"
这就是我的网关了.
最后添加NDS,NDS的配置也是同样在/etc目录下面的一个配置文件,叫”resolv.conf”的文件,
如果...

|