HPUX:FTP 如何将FTP用户锁定在固定目录
目的:
HPUX的FTP为wuftp,默认用realuser访问,如果权限足够,可访问整个系统.
本文的目的,就是令到某用户登录后,只能访问指定的目录,不可访问该目录外的文件夹.
系统:
HP-UX 11.23
方法:
1.启用配置文件
vi /etc/inetd.conf
>> notice -a
ftp stream tcp nowait root /usr/lbin/ftpd ftp -l -a
如果想取消,用
ftp stream tcp nowait root /usr/lbin/ftpd ftp -l -A
2.重新初始化
inetd -c
3.创建配置文件
On HP-UX 11:
# cp /usr/newconfig/etc/ftpd/ftpaccess /etc/ftpd/ftpaccess
On HP-UX 11i:
# cp /usr/newconfig/etc/ftpd/examples/ftpaccess /etc/ftpd/ftpaccess
vi /etc/ftpd/ftpaccess
>>
guestuser myname
guest-root /home/myname/html myname
4.令到客户端可以 ls / pwd
mkdir -p usr/bin
cp /sbin/ls usr/bin
cp /bin/pwd usr/bin
5.其他
touch /etc/ftpd/ftpgroups
vi /etc/ftpd/ftpusers
# ftpusers
root
guest
Resource Link:
http://newfdawg.com/SHP-FTP-ftpaccess.htm
http://docs.hp.com/en/B2355-91058/ch02.html
http://fanqiang.chinaunix.net/a1/b6/20020408/080200169.html
2010年5月5日星期三
HPUX:FTP 如何将FTP用户锁定在固定目录
2010年3月19日星期五
Howto install 3G card [HUAWEI E1750 WCDMA] in archlinux
1.Download
http://www.draisberghof.de/usb_modeswitch/
cd /tmp
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.1.1.tar.bz2
2.Install
cd usb-modeswitch-1.1.1
sudo make install
sudo vi /etc/usb_modeswitch.conf
>>
########################################################
# Huawei E1550
# Huawei E1750
#
# Contributor: Anders Blomdell, Ahmed Soliman
DefaultVendor= 0x12d1
DefaultProduct= 0x1446
TargetVendor= 0x12d1
TargetProduct= 0x1001
# only for reference and 0.x versions
# MessageEndpoint=0x01
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
sudo /usr/sbin/usb_modeswitch -W -c /etc/usb_modeswitch.conf
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root uucp 188, 0 3月 19 16:13 /dev/ttyUSB0
3.Setup kppp
New account :WCDMA
Phone no:*99#
authentication : PAP
Call back : No
pppd parameters:
noauth
usepeerdns
noipdefault
defaultroute
MODEM:DEVICE
new HUAWEI E1750
Device: /dev/ttyUSB0
Flow control: Hardware [CRTSCTS]
Line end : CR
Speed : 460800
Use file lock : yes
MODEM:MODEM
Query modem
4.How to use it:
plug in the usb modem
sudo /usr/sbin/usb_modeswitch -W -c /etc/usb_modeswitch.conf\
$ ls -l /dev/ttyUSB0
crw-rw---- 1 root uucp 188, 0 3月 19 16:13 /dev/ttyUSB0
sudo kppp
connect
2010年2月28日星期日
HP-UX:ISSUE: SYSERR(root): savemail: cannot save rejected email anywhere
情况:
登录服务器后,控制台会不断提示以下错误:
SYSERR(root): savemail: cannot save rejected email
/var/tmp/dead.letter 增长迅速
日志:
From MAILER-DAEMON Mon Mar 1 11:57:40 2010
Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
by hwcln43.ebis.com (8.9.3/8.9.3) with internal id L~X06469;
Mon, 1 Mar 2010 11:57:40 +0800 (EAT)
Date: Mon, 1 Mar 2010 11:57:40 +0800 (EAT)
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <201003010357.L~X06469@hwcln43.ebis.com>
To: root
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="L~X06469.1267415860/hwcln43.ebis.com"
Subject: Returned mail: Host unknown (Name server: wcat: host not found)
Auto-Submitted: auto-generated (failure)
分析:
系统发错误邮件到本地账户时,发给了 username@wcat
sendmail.cf 的 [DR] 设置为 [DR wcat] ,配置错误
处理方法:
1.把 /etc/mail/sendmail.cf 的 [DR wcat] 改为 [DR]
2./sbin/init.d/sendmail stop
3./sbin/init.d/sendmail start
2009年11月9日星期一
Howto configure sendmail in HP-UX
Howto configure sendmail in HP-UX
* Purpose
Configure sendmail to let mailx deliver outside
* Operation Steps
o 1 sendmail.cf
vi /etc/mail/sendmail.cf
#Dj $w.Foo.COM
>> Dj $w.ebis.com
o 2 nsswitch
vi /etc/nsswitch.conf
hosts:files
o 3 hosts
vi /etc/hosts
192.168.0.33 hwccl.com
o 4 testing
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
mailx meansonw@hwccl.com
test
server
.
EOT
2009年8月13日星期四
用JAD反编译并正确显示中文
http://www.kpdus.com/jad.html 官方最新版本,支持jdk1.6 一、基本用法 二、Option -o 三、Option -s 四、Option -p 五、Option -d
如:jad -sjava d.class 就是把当前目录的d.class编译成d.java 再用:native2ascii -reverse d.java d2.java 把d.java中的汉字转换成能直接看懂的汉字(d2.java) |
2009年7月17日星期五
LINUX:ARCHLINUX How to downgrade wicd
Today after I upgrade my wicd to 1.6.2 ,everything is ok but wifi just can scan wireless router around me and cann't connect it.
Keep working on it for hours ,I give up the upgrading , Here are the way howto downgrade it to 1.5.9 .
1. Get wicd-1.5.9-1-i686.pkg.tar.gz from here
http://archlinux.alouche.net/?pkgName=wicd&submit=Search+Packages
$cd /var/cache/pacman/pkg/
$sudo wget http://archlinux.alouche.net/repo/extra/os/i686/wicd-1.5.9-1-i686.pkg.tar.gz
2.Remove wicd
sudo pacman -R wicd
sudo mv /etc/wicd /etc/wicd.bak
sudo mv /var/log/wicd /var/log/wicd.bak
3.Reinstall wicd
sudo pacman -U wicd-1.5.9-1-i686.pkg.tar.gz
4.Restart service
sudo /etc/rc.d/dbus restart
sudo /etc/rc.d/wicd restart
5. Not try to open wicd-client and connect your wireless router
wicd-client
2009年7月16日星期四
UNIX:HP-UX 压缩备份与解压
压缩:
tar cvf - /u02/datafile/ |gzip > /u03/test.tar.gz
解压缩:
gzip -dc /u03/test.tar.gz | tar �xvf -