顯示文章

這裡允許您檢視這個會員的所有文章。請注意, 您只能看見您有權限閱讀的文章。


主題 - shinhrn

頁: [1]
1
PHP程式設計討論區 / preg_match_all 問題
« 於: 2015-10-19 15:51 »
$emailstr=' b@b.com 123456789012345678 b.bb@bbb.com ';
$pattern = '/([a-zA-Z0-9]+[_.+-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[-.]?)+[a-zA-Z0-9]+/';
if (preg_match_all($pattern, $emailstr, $matches)){
   foreach($matches[0] as $email) {
      echo $email,'<BR>';
   }
}
找不出匹配???


$emailstr=' b@b.com 12345678901234567 b.bb@bbb.com ';
就可以...請問各位大大這是什麼原因阿?

2
我有一台機器使用 廢除密碼登錄, 強迫使用 RSA 驗證的shh連接
我由windows 使用SSH Secure Shell 連接ok
可是我由Linux 2.6.15-1.2054_FC5 卻不行?
OpenSSH_4.3p2, OpenSSL 0.9.8a 11 Oct 2005
debug1: identity file /home/testuse/.ssh/identity type -1
debug1: identity file /home/testuse/.ssh/id_rsa type 1
debug1: identity file /home/testuse/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.5.1p2
debug1: match: OpenSSH_2.5.1p2 pat OpenSSH_2.5.0*,OpenSSH_2.5.1*,OpenSSH_2.5.2*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD(1024) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Found key in /home/testuse/.ssh/known_hosts:5
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/testuse/.ssh/identity
debug1: Offering public key: /home/testuse/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/testuse/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
請問會是拿邊的問題??

3
我依鳥哥的私房菜理的修改 /etc/dovecot.conf後啟動 啟動 pop3
[root@linux ~]# vi /etc/dovecot.conf
protocols = pop3
pop3_listen = *
為何會Authentication failed.我確定帳號密碼都對阿...還有拿理要改嗎??

[root@linux ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK dovecot ready.
user xxxxx
+OK
pass xxxx
-ERR Authentication failed.

4
Linux 討論版 / fc5 的samba error
« 於: 2007-06-15 11:01 »
請問為何 我fc5的 samba 每次啟動時都會有以下訊息??
Jun 15 10:32:17 nat smbd[11977]: [2007/06/15 10:32:17, 0] printing/print_cups.c:cups_cache_reload(85)
Jun 15 10:32:17 nat smbd[11977]: Unable to connect to CUPS server localhost - Connection refused

我想關掉 CUPS功能.不知要從拿裡設定??

smb.conf
我只查到有 load printers 可是
load printers = no
沒用..

5
我有一台供內部使用的機器
RedHat 6.2
OpenSSH_2.5.1p2

我想依
http://www.study-area.org/tips/ssh_tips.htm
設定
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
可是都無效??
不知是否是版本太舊了 Crying or Very sad

ps:我試過3台fedora core 1,RedHat 9.0都可以
不知有什麼方式可以達成??

May 24 11:12:50 www PAM_pwdb[26172]: (su) session opened for user root by users001(uid=507)
May 24 11:12:56 www modprobe: modprobe: Can't locate module net-pf-10
May 24 11:12:56 www sshd[26208]: fatal: Cannot bind any address.
May 24 11:20:39 www sshd[26337]: Failed none for users001 from 192.168.1.1 port 4690 ssh2
May 24 11:20:39 www sshd[26337]: Failed keyboard-interactive for users001 from 192.168.1.1 port 4690 ssh2
May 24 11:20:40 www sshd[26337]: Received disconnect from 192.168.1.1: 13: Authentication cancelled by user.
May 24 11:39:49 www sshd[26572]: error: setsockopt SO_KEEPALIVE: Socket operation on non-socket
May 24 11:39:49 www sshd[26572]: warning: can't get client address: Socket operation on non-socket
May 24 11:39:49 www sshd[26572]: refused connect from unknown
May 24 12:19:55 www sshd[27232]: Failed publickey for users001 from 192.168.1.1 port 2438 ssh2
May 24 12:19:55 www sshd[27232]: Failed none for users001 from 192.168.1.1 port 2438 ssh2
May 24 12:19:55 www sshd[27232]: Failed keyboard-interactive for users001 from 192.168.1.1 port 2438 ssh2
May 24 12:20:14 www sshd[27256]: Accepted password for users001 from 192.168.1.1 port 2445 ssh2

6
Linux 討論版 / 如何管制qmail的信箱容量??
« 於: 2006-11-02 13:47 »
qmail-1.05 + ucspi-tcp-0.88 + vpopmail-5.0.1 + courier-imap-1.5.1 + imap-2002.RC6
horde-2.2.5 + imp-3.2.3 + turba-1.2.2

以上是我的環境資料,請問我要設定使用者的信箱容量要重拿裡著手??
因為帳號是放在mysql裡自行控制.並沒有使用系統帳號耶..
所以不能使用 quota 作容量管理

7
Linux 討論版 / messge log中看不懂的訊息
« 於: 2006-11-01 11:41 »
昨天我的fc-5機器message 上出現了10幾行同樣的訊息.
我看不懂意思.也不知是拿支程式產生的.請問各位大大可以幫我解說一下嗎??謝謝...
Oct 27 04:02:39 nat kernel: audit(1161892959.776:2): avc:  granted  { execstack } for  pid=28256 comm="ld-linux.so.2" scontext=user_u:system_r:unconfined_t:s0 tcontext=user_u:system_r:unconfined_t:s0 tclass=process


這是令一台的log..這我也看不懂.... :oops:
Oct 11 14:22:17 fs01 kernel: usb-uhci.c: $Revision: 1.275 $ time 15:50:32 Oct 29 2003
Oct 11 14:52:52 fs01 kernel: Linux version 2.4.22-1.2115.nptl (bhcompile@daffy.perf.redhat.com) (gcc version 3.2.3 20030422 (Red Hat Linux 3.2.3-6)) #1 Wed Oct 29 15:42:51 EST 2003

8
解決 Linux NAT ip_conntrack: table full 的方法
============================
解決方法 (1): 加大 ip_conntrack_max 值
指令: cat /proc/sys/net/ipv4/ip_conntrack_max

解決方法 (2): 降低 ip_conntrack timeout 時間
重設 ip_conntrack_tcp_timeout_established (原值: 432000, 單位: 秒)
例如: echo "600" > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established

==============================
其中第一個方法我試可以.

可是第2個方法.
bash: /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established: No such file or directory
只會show以上訊息.我查過 我的機器
2.4.18-3
2.4.22-1.2115.nptl
2.4.20-8
3個版本都沒有這個目錄耶
請問我是拿裡沒設到嗎??

9
Linux 討論版 / ucd-snmp的問題.
« 於: 2006-08-23 10:24 »
請教一個問題..

我使用ucd-snmp來繪製mrtg圖..
但是在log/messages裡面一直重複這些訊息
ucd-snmp[949]: Connection from 127.0.0.1
last message repeated 7 times
不知道要如何解決才可以讓這些訊息消失..
因為messgaes中都是這些訊息..無法看到其他的訊息..

謝謝..

10
Linux 討論版 / ssh登錄問題
« 於: 2006-08-23 10:23 »
我的ssh主機常常過了一段時間.大約是5-7天..我要連線就會失敗.
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: packet_send2: adding 64 (len 60 padlen 4 extra_pad 64)
debug1: ssh-userauth2 successful: method password
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug1: channel_free: channel 0: client-session, nchannels 1
Connection to www.test.com.tw closed by remote host.
Connection to www.test.com.tw closed.
debug1: Transferred: stdin 0, stdout 0, stderr 97 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 50417.1
debug1: Exit status -1

然後過了大約20分鐘.在試就又可以正常連線了...
不知為何,可以請各位大大提供一點意見看看問題再拿裡嗎??

頁: [1]