顯示文章

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


主題 - van416

頁: [1]
1
我用自己的程式 java -jar s.jar & 打开了一个端口9001
处于listen状态
代碼: [選擇]
[root@localhost server]# netstat -tlan | grep 9001
tcp        0      0 :::9001                     :::*                        LISTEN 

[root@localhost server]# jobs
[1]+  Running                 java -jar s.jar &

如果客户端在使用这个端口,就OK,
如果客户端没有使用这个端口,好像就会直接关闭这个端口,这是为什么啊。命令要怎么用才能让这个端口一直开启啊。谢谢



2
Linux 討論版 / POSTFIX新增账户问题
« 於: 2012-05-28 14:11 »
环境:centos5.4 64位
今天接触postfix,请教一个简单的问题,postfix怎么新增一个账户啊,并且,在cmd窗口下怎么用这个发邮件啊。
谢谢~
另外home_mailbox = Maildir/ 这个目录是自动生成的,还是要创建用户手动建立啊。

3
Linux 討論版 / Postfix奇怪的问题
« 於: 2012-02-16 18:05 »
环境:centOS-5.5  postfix
今天上午还可以收发MAIL,到了今天下午不知道为什么,发不了了.
/usr/sbin/postfix start 好多次了,都是这样的..
linux shadow 内部的可以发送接收:
里面有两个用户,一个chao,一个jack,可以发送与接收,但是就是转发不了nisshotech.com.cn..
如下附上main.cf与错误信息.
请各位大大帮忙解决一下..谢谢了

用mailq提示的错误如下:
代碼: [選擇]
[root@niss ~]# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
1A5A8168036*     788 Thu Feb 16 18:13:20  chao@mail.niss.com
                                         chao_fan@nisshotech.com.cn

1C1B516802A      800 Thu Feb 16 18:06:36  chao@mail.niss.com
(delivery temporarily suspended: Host or domain name not found. Name service error for name=nisshotech.com.cn type=MX: Host not found, try again)
                                         chao_fan@nisshotech.com.cn

-- 2 Kbytes in 2 Requests.

感觉很纳闷:
于是: grep -v "^#" /etc/postfix/main.cf 出来,也没有发现什么问题.
代碼: [選擇]
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.niss.com
mydomain = niss.com
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks_style = subnet
relay_domains = $mydestination
relay_domains = 163.com
relay_domains = nisshotech.com.cn
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
message_size_limit = 15728640

另外,我的dns服务器完全正常,给163发MAIL也是显示如下:
代碼: [選擇]
[root@niss ~]# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
1A5A8168036      788 Thu Feb 16 18:13:20  chao@mail.niss.com
(Host or domain name not found. Name service error for name=nisshotech.com.cn type=MX: Host not found, try again)
                                         chao_fan@nisshotech.com.cn

1C1B516802A      800 Thu Feb 16 18:06:36  chao@mail.niss.com
(Host or domain name not found. Name service error for name=nisshotech.com.cn type=MX: Host not found, try again)
                                         chao_fan@nisshotech.com.cn

ABE28168039      762 Thu Feb 16 18:34:23  chao@mail.niss.com
(Host or domain name not found. Name service error for name=vip.163.com type=MX: Host not found, try again)
                                         php@vip.163.com

-- 4 Kbytes in 3 Requests.

maillog如下:
代碼: [選擇]
tail /var/log/maillog
Feb 16 18:34:26 niss dovecot: pop3-login: Login: user=<jack>, method=PLAIN, rip=::ffff:192.168.0.192, lip=::ffff:192.168.0.201
Feb 16 18:34:26 niss dovecot: POP3(chao): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Feb 16 18:34:26 niss dovecot: POP3(jack): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
Feb 16 18:34:43 niss postfix/smtp[3138]: ABE28168039: to=<php@vip.163.com>, relay=none, delay=20, delays=0.06/0.01/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=vip.163.com type=MX: Host not found, try again)
Feb 16 18:44:34 niss postfix/qmgr[2769]: 1C1B516802A: from=<chao@mail.niss.com>, size=800, nrcpt=1 (queue active)
Feb 16 18:44:34 niss postfix/qmgr[2769]: ABE28168039: from=<chao@mail.niss.com>, size=762, nrcpt=1 (queue active)
Feb 16 18:44:54 niss postfix/smtp[3182]: ABE28168039: to=<php@vip.163.com>, relay=none, delay=631, delays=611/0.01/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=vip.163.com type=MX: Host not found, try again)
Feb 16 18:44:54 niss postfix/smtp[3183]: 1C1B516802A: to=<chao_fan@nisshotech.com.cn>, relay=none, delay=2299, delays=2279/0.03/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=nisshotech.com.cn type=MX: Host not found, try again)
Feb 16 18:49:34 niss postfix/qmgr[2769]: 1A5A8168036: from=<chao@mail.niss.com>, size=788, nrcpt=1 (queue active)
Feb 16 18:49:54 niss postfix/smtp[3197]: 1A5A8168036: to=<chao_fan@nisshotech.com.cn>, relay=none, delay=2195, delays=2175/0.02/20/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=nisshotech.com.cn type=MX: Host not found, try again)

4
各位好:

 有一段Linux Shell不知道怎麼實現,請大夥幫忙看看:
 我想讓do_test1()運行完成之后不管return 為0或者1,都將運行do_test2(); 但在最后會顯示:如過return 0 ;則echo OK,如果return 1 則 echo FAIL;
幫我看看可以如何實現,感謝

代碼: [選擇]
start

if [$? = 0];then
   echo "OK";  
else
   echo "FAIL";

fi
#=================
start()
{
   do_test1
   if [$? != 0];then
       return 1
   fi

   do_test2
   if [$? != 0];then
       return 2
   fi
  
  return 0
}
#=================
do_test1()
{
   1=1
   if [$? != 0];then
     echo pass1;
     return 0
   else
     echo fail1;
     return 1;
   fi
   return 0
}

do_test2()
{
   2=2
   if [$? != 0];then
     echo pass2;
     return 0
   else
     echo fail2;
     return 1;
   fi
   return 0
}

  

5
各位下午好:


今在Ubuntu10.04 64位與XP與DOS系統上通過Wubi安裝Ubuntu10.04 32位系統,按裝完成后啟動系統依舊為64位的系統,無法進入到32位的系統,我要怎麼修改才可以指定想進入32位或者64位?
感謝
環境:C盤: DOS系統 D盤:winxp系統 E盤:想裝ubuntu10.04 32位系統 F盤:Ubuntu10.04 64位系統


DOS下boot.ini為:
代碼: [選擇]
[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
c:\="dos"
C:\wubildr.mbr = "Ubuntu"

6
運行環境:Ubuntu 10.0 64位
運行apt-get update出現的錯誤如下:
代碼: [選擇]
administrator@ubuntu:~$ sudo apt-get update
Get:1 http://security.ubuntu.com lucid-security Release.gpg
Get:2 http://us.archive.ubuntu.com lucid Release.gpg
Get:3 http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
98% [3 Translation-en_US bzip2 0B] [Waiting for headers] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US         
Get:4 http://us.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US
73% [4 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US                                   
Get:5 http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US                                   
58% [5 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US                                     
Get:6 http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US                                 
48% [6 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US                                   
Get:7 http://us.archive.ubuntu.com lucid-updates Release.gpg                                                 
Get:8 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US
48% [8 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US                                 
Get:9 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US                         
43% [9 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]bzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US                           
Get:10 http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US                               
38% [10 Translation-en_US bzip2 0B] [Waiting for headers] [Connecting to security.ubuntu.com (91.189.92.166)]bzip2: (stdin) is not a bzip2 file.
Ign http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US                                 
Get:11 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US                                                                                                               
34% [11 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]                                                                           206B/s 16sbzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US                                                                                                                   
Get:12 http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US                                                                                                               
31% [12 Translation-en_US bzip2 0B] [Waiting for headers] [Connecting to security.ubuntu.com (91.189.92.166)]                                                                             206B/s 18sbzip2: (stdin) is not a bzip2 file.
Ign http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US                                                                                                                 
Get:13 http://us.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US                                                                                                             
29% [13 Translation-en_US bzip2 0B] [Connecting to us.archive.ubuntu.com (91.189.92.170)] [Waiting for headers]                                                                           206B/s 21sbzip2: (stdin) is not a bzip2 file.
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US                                                                                                                 
Get:14 http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US                                                                                                                 
27% [14 Translation-en_US bzip2 0B] [Waiting for headers] [Connecting to security.ubuntu.com (91.189.92.166)]                                                                             206B/s 23sbzip2: (stdin) is not a bzip2 file.
Ign http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US                                                                                                                   
Get:15 http://us.archive.ubuntu.com lucid Release                                                                                                                                                   
Err http://us.archive.ubuntu.com lucid Release                                                                                                                                                     
 
Get:16 http://us.archive.ubuntu.com lucid-updates Release                                                                                                                                           
Err http://us.archive.ubuntu.com lucid-updates Release                                                                                                                                             
 
Get:17 http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US                                                                                                               
33% [17 Translation-en_US bzip2 0B] [Connecting to security.ubuntu.com (91.189.92.166)]                                                                                                   206B/s 25sbzip2: (stdin) is not a bzip2 file.
Ign http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US                                                                                                                 
Get:18 http://security.ubuntu.com lucid-security Release                                                                                                                                           
Err http://security.ubuntu.com lucid-security Release                                                                                                                                               
 
Fetched 8,400B in 10s (784B/s)                                                                                                                                                                     
Reading package lists... Done
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://us.archive.ubuntu.com lucid Release: The following signatures were invalid: NODATA 1 NODATA 2

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://us.archive.ubuntu.com lucid-updates Release: The following signatures were invalid: NODATA 1 NODATA 2

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used.GPG error: http://security.ubuntu.com lucid-security Release: The following signatures were invalid: NODATA 1 NODATA 2

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/lucid-security/Release 

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release 

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid-updates/Release 

W: Some index files failed to download, they have been ignored, or old ones used instead.

7
請教Ubuntu高手:

   本人遇到一個很奇怪的問題,在ubuntu9.04 32位的系統下可以正常抓到網卡,並且可以上網,但是在ubuntu10.0 64位的系統上無法看到網卡,並且無法上網,具體做的實驗如下:

如下都在64位的系統下運行的:
用ifconfig :
代碼: [選擇]
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
用dmesg | grep -in eth:
代碼: [選擇]
674:[    1.731125] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
680:[    1.731873] eth0: RTL8168d/8111d at 0xffffc900041a0000, 20:cf:30:cc:76:0f, XID 083000c0 IRQ 35
699:[   13.578725] udev: renamed network interface eth0 to eth14

PS:用ifup eth0 或者ifup eth14均無效~~

從以上來看eth0網卡明顯已經被加載進了,可是為什么用ifconfig看不到呢?

8
Windows 討論版 / WIN7連接NOVELL
« 於: 2010-07-24 16:36 »
各位,下午好:

  前言:
DOS下連接NOVELL用如下方法:
LSL.COM:
DLKFET.COM:
此為DLink DFE530-TX網卡的ODI驅動程式
IPXODI.COM:
此為IPX通訊協定程式。
NETX.EXE

WINDOWS連接NOVELL用:
安裝 Client Server for NetWare 協議

請各位玩過WIN7與NOVELL的前輩幫忙解決一下,WIN7連接NOVELL具體用什麼方法?
有從NOVELL網站上下載軟件
Novell Client 2 SP1 for Windows
安裝後但不知道該怎麼配置,才可以連接進NOVELL~~~

非常感謝你們的解決~







9
Windows 討論版 / 在DOS中從文件截取字符串
« 於: 2010-07-08 11:53 »
各位大大好:

本人有一個DOS方面的問題,如下

 截取字符串 可以用如下的命令
  =========================================
  @echo off
  set ifo=abcdefghijklmnopqrstuvwxyz0123456789
  echo %ifo%
    echo %ifo:~0,5%
  echo %ifo:~-5%
  echo %ifo:~0,-5%
  echo %ifo:~3,5%
  echo %ifo:~-14,5%
  pause
但從文件夾中怎麼截取呢?
如文件FILE中有如下字符
abcdefghijklmnopqrstuvwxyz0123456789

用什麼命令可以從FILE文件中截取abcd字符呢?

感謝~~


10
各位前輩,大家好:
     剛進PHP這一站的我遇到了一個問題:
     比如我寫了一個程式 1.php
<?php
 echo 'i love php';
?>

用http://localhost/1.php  可以顯示出   i love php
但是我依舊在1.php里加入:
<?php
 echo 'i love php';
  echo 'i failed';
?>

用http://localhost/1.php打開,依舊是 i love php
沒有顯示 i failed, 請問這是為什麼啊? 跟cookie 有關嗎? 我該怎麼設置呢?

11
各位大大,下午好:
     小弟的公司測試系統用的是NOVELL5.1的服務器
  安裝好了IPX等協議後可以MOUNT NOVELL,需要用什麼安裝包或者其他指令可以從客戶端LINUX UBUNTU9.04版上取的系統時間,THANKS! >:(

12
Computer 討論版 / LINUX CP 指令問題
« 於: 2010-04-26 15:44 »
各位大大,下午好:
  最近在寫LINUX程式遇到如下的問題:
環境: 
             aaa 為 /boot 下的文件夾  bbb 為 /home下的文件
aaa文件下的內容如下: 
  1.我是第一行
但aaa文件過一段時間會增加一行,如:
  2.我是增加的一行
再過一段時間又會增加一行:
  3.我是增加的第二行 

在不改變bbb文件原來內容的同時,請問如何將aaa的文件COPY到bbb的文件下!


困擾啊!



 

13
我在搭建PHP的開發環境時遇到如下問:
做php 5.3.2 make時在apprentice.c -o ext/fileinfo/libmagic/apprentice.lo 沒反應


 Operating System: CentOS 4
 PHP Version:      5.3.2




 Description:
------------
I'm trying to compile PHP 5.3 on a VPS with 256MB of memory, (I waited for 10+minutes and it did not go on)
press "ctrl +  c" show
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

My host temporarily bumped my account up to 512MB of memory, but it
still took all of the free memory before failing (350MB+). Disabling the
extension that the file is from with "--disable-fileinfo" gets me beyond
the error and continues without running out of memory (until it hits a
different error in libgd, which I'm looking in to).


Reproduce code:
---------------
$ tar -xjvf php-5.3.2.tar.gz
$ cd php-5.3.2
$ ./configure  \
>--prefix=/usr/local/php \
>--with-config-file-path=/usr/local/php/etc \
>--with-apxs2=/usr/local/apache2/bin/apxs \
> --with-mysql=/usr/local/mysql/ \
>--with-libxml-dir=/usr/local/libxml2/ \
>--with-png-dir=/usr/local/libpng/ \
>--with-jpeg-dir=/usr/local/jpeg6/ \
>--with-freetype-dir=/usr/local/freetype/ \
>--with-gd=/usr/local/gd2/ \
>--with-zlib-dir=/usr/local/zlib/ \
>-with-mcrypt=/usr/local/libmcrypt/ \
>--with-mysqli=/usr/local/mysql/bin/mysql_config \
>--enable-soap \
>--enable-mbstring=all \
>--enable-sockets


$ make

Actual result:
--------------
[lots of compile output]
...
/bin/sh /home/ibb_admin/temp/php-5.3.2/libtool --silent
--preserve-dup-deps --mode=compile gcc
-I/home/ibb_admin/temp/php-5.3.2/ext/fileinfo/libmagic -Iext/fileinfo/
-I/home/ibb_admin/temp/php-5.3.2/ext/fileinfo/ -DPHP_ATOM_INC
-I/home/ibb_admin/temp/php-5.3.2/include
-I/home/ibb_admin/temp/php-5.3.2/main -I/home/ibb_admin/temp/php-5.3.2
-I/home/ibb_admin/temp/php-5.3.2/ext/date/lib
-I/home/ibb_admin/temp/php-5.3.2/ext/ereg/regex -I/usr/include/libxml2
-I/opt/include -I/opt/include/freetype2 -I/usr/include/imap
-I/usr/kerberos/include
-I/home/ibb_admin/temp/php-5.3.2/ext/mbstring/oniguruma
-I/home/ibb_admin/temp/php-5.3.2/ext/mbstring/libmbfl
-I/home/ibb_admin/temp/php-5.3.2/ext/mbstring/libmbfl/mbfl
-I/opt/include/mysql -I/usr/include/mysql
-I/home/ibb_admin/temp/php-5.3.2/ext/sqlite3/libsqlite
-I/home/ibb_admin/temp/php-5.3.2/TSRM
-I/home/ibb_admin/temp/php-5.3.2/Zend    -I/usr/include -g -O2  -c
/home/ibb_admin/temp/php-5.3.2/ext/fileinfo/libmagic/apprentice.c -o
ext/fileinfo/libmagic/apprentice.lo


等了10多分鐘之後,依舊是這樣的,按CTRL+C出現
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1


期待你的解答,謝謝!
 

14
各位大大們好:
  小弟有一個基本的問題,linux文字界面下中文輸入法如何設置啊?
配置: Fedora 10
已安裝輸入法: yum install scim* -y
在圖形界面下可以用智能拼音,用CTRL+Q

但是在文字界面下就不行了,不知道還要需要什麼設置嗎?

15
各位大大好 ;)
     
     因為最近弄了一個測試系統,想加密,但不太現實,於是想用license key來限制系統使用時間!
   
     不知我改朝那方面思考來達到此目的!

謝謝!     

16
大家好:
  最近想用用程式自動建一個日期文件夾,文件夾取各為: 04122010  (這裡為變數,隨著時間的改變而改變)
     其中 : 04為月份 12為日期 2010為年限

想到用DATE命令,但不知道該怎麼實現?
用 date >>1.dat
從裡面顯示出來的為: Mon Apr 12 14:32:26 EDT 2010

我該怎麼設變量才能實現用程式建立:04($Mon)12($Date)2010($Year)  ??? :o

Thanks!

17
Linux 討論版 / samba结合AD問題
« 於: 2010-04-09 15:45 »
各位大大,
       下午好!

今天在做Samba加入AD認識的時候發生如下問題,不知各位大大有沒有看出什麼問題:

我們有一台WINDOWS2003的SERVER存放賬號

环境:
 
    Windows 2003 Server    Linux Samba's Server(Fedora 10)
IP地址     192.168.0.2                  192.168.0.169
DNS    192.168.1.1                   192.168.1.1
hostname  chao                                 card
域    niss.com.cn

       以下是SAMBA下的設置:
1./etc/hosts;/etc/sysconfig/network設置如下:
/etc/hosts
127.0.0.1  localhost.localdomain localhost
192.168.0.169 card.niss.com.cn card

/etc/sysconfig/network
hostname=card.niss.com.cn

2.smb.conf設置

[global]
    workgroup = niss
     realm = niss.com.cn

   netbios name = Data_Server
     server string = Linux  

    security = ADS  
    password server = chao.niss.com.cn
    encrypt passwords = yes

[home]
         path = /home/%D/%U
         browsable = no
         writable = yes
         create mask = 0664
         directory mask = 0775

[tmp]
      path = /tmp
      public =yes

存檔離開

3.修改Kerberos 位置在 /etc/krb5.conf
[logging]
   default = FILE:/var/log/krb5libs.log
   kdc = FILE:/var/log/krb5kdc.log
   admin_server = FILE:/var/log/kadmind.log

[libdefaults]
   default_realm = NISS.COM.CN (請問此處是填:CHAO.NISS.COM.CN,還是:NISS.COM.CN)
   dns_lookup_realm = false
   dns_lookup_kdc = false

[realms]
   NISS.COM.CN = {
   kdc = 192.168.0.2:88
   admin_server = 192.168.0.2:749
   default_domain = NISS.COM.CN
  }

[domain_realm]
  .example.com = NISS.COM.CN
  .example.com = NISS.COM.CN

4.修改 /var/kerberos/krb5kdc/kdc.conf  
[root@lcard~]#vi /var/Kerberos/krb5kdc/kdc.conf
[kdcdefaults]
******
 [realms]
NISS.COM.CN = {
Master_key_type = des-cdc-crc
Supported_enctypes = arcfour-hmac:normal arcfour-hma

5.同步時間正常 ntpdate 192.168.0.2

6.測試連線
   [root@card~]# kinit  pief@NISS.COM.CN   (pief為WINDOWS2003 SERVER的其中一個賬號)
   顯示正常會跳回命令提示字元
   [root@card~]#

7.將Samba主機加入網域
     [root@card~]# /etc/init.d/smb restart
   [root@card~]# /etc/init.d/nmb restart
OK OK OK OK
   [root@card~]# net ads join -U pief
Enter pief's password: (輸入密碼)
 出現如下的錯誤信息:
Failed to join Domain: failed to find DC for domain NISS.COM.CN


  請問各位大大,是不是我的設置錯了還是命令用錯了?
感謝~~~~~ ???




已解決:用net rpc join -S xxxx.com.cn -U administrator




18
各位前輩,大家好: 
   
    最近在公司做SAMBA 伺服器(peer/peer),share出文件夾後,在用戶端 winxp下找不到此server
其中linux下配置與設置如下:
fedora 10.0系統
 公司網域:niss.com.cn
连线模式為 :peer/peer

/etc/hosts
127.0.0.1  localhost.localdomain localhost
192.168.0.140 card.niss.com.cn card

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=card.niss.com.cn



其中smb.conf設置如下:
注:如下設置用的用是鳥大哥裡面的!
[global]
         workgroup     = card  (這裡是用card.niss.com.cn還是用card啊?)
        netbios name  = card
        server string = This is card's samba server

             unix charset    = utf8
        display charset = utf8
        dos charset     = cp950

        # 与登录档有关的设定项目,注意变数 (%m)
        log file = /var/log/samba/%m.log
        max log size = 50

            security = share

       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        dns proxy = no
        template shell = /bin/false
        winbind use default domain = no

        [temp]
        comment   = Temporary file space
        path      = /tmp
        read only = no
        public    = yes

做過如上動作之後再按照鳥哥的書做 testpram,netstat -tlunp,smbclient等都是正常的! (137,138都在listen)

但從客戶端winxp下搜索電腦 192.168.0.140卻找不到此電腦?

請問我該從那裡debug下手?~~~~~~

謝謝!!







19
各位前輩,大家下午好:
今日寫測試程式遇到一點難題
不知用什麼命令可以撷取一個文件夾的前5位字符
如:
文件夾名有sample裡有字母:lovelinux
我用什麼命令可以把love這4個字母單獨顯示出來?
謝謝!

頁: [1]