Hi,

--- James Nguyen <[EMAIL PROTECTED]> からのメッセージ:
> On Mon, 28 Jun 2004 17:06:58 +0900 (JST)
> Bit Takeshi <[EMAIL PROTECTED]> wrote:
> 
> > Em vu+`a ddo.c la.i "How To Ask Questions The
> Smart Way
> > " va` dda^y la` tech info cu. the^?. Ho^m qua
> ddo.c ca'i
> > doc ddo' kho^ng hie^?u gi` bu+.c mi`nh qua'!
> > 
> > /etc/yp.conf:
> > ypserver 172.21.65.130
> > 
> 
> Quan tro.ng nha^'t la` ba'c chia nho? va^'n dde^`,
> kie^?m tra xem lo^~i thuo^.c ve^` phi'a NIS server
> hay client.
> Theo kinh nghie^.m cu?a rie^ng tui (NIS server
> cha.y tre^n Solaris, client co' Solaris, Linux,
> BSD), co' the^? ti`m lo^~i nhu+ sau
> 1) server
> - kie^?m tra ca^'u hi`nh nhie^`u la^`n
> - portmap dda~ cha.y chu+a (port 111) ?

OK,
[EMAIL PROTECTED] home]# /etc/init.d/portmap status
portmap (pid 1093) is running...
[EMAIL PROTECTED] home]#

> - co' bi. permission gi` kho^ng (e.g. hosts.deny)

blank:

[EMAIL PROTECTED] home]# cat /etc/hosts.deny
#
# hosts.deny    This file describes the names of the hosts
which are
#               *not* allowed to use the local INET
services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind
you that
# the new secure portmap uses hosts.deny and hosts.allow. 
In particular
# you should know that NFS uses portmap!

[EMAIL PROTECTED] home]#

> 2) client
> - kie^?m tra ca^'u hi`nh nhie^`u la^`n

[EMAIL PROTECTED] home]# cat /etc/hosts
127.0.0.1               localhost
172.21.65.245           cluster-host45
172.21.65.130           laurel.hn.is.uec.ac.jp.private 
laurel
172.21.65.141           fennel.hn.is.uec.ac.jp.private 
fennel
[EMAIL PROTECTED] home]#


[EMAIL PROTECTED] home]# cat /etc/yp.conf
# /etc/yp.conf - ypbind configuration file
# Valid entries are
#
#domain NISDOMAIN server HOSTNAME
#       Use server HOSTNAME for the domain NISDOMAIN.
#
#domain NISDOMAIN broadcast
#       Use  broadcast  on  the local net for domain
NISDOMAIN
#
#ypserver HOSTNAME
#       Use server HOSTNAME for the  local  domain.  The
#       IP-address of server must be listed in /etc/hosts.
#
#ypserver 172.21.65.130
#ypserver laurel
ypserver fennel
[EMAIL PROTECTED] home]#

[EMAIL PROTECTED] home]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file
should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for
an
# entry should stop if the search in the previous entry
turned
# up nothing. Note that if the search failed due to some
other reason
# (like no NIS server responding) then the search
continues with the
# next entry.
#
# Legal entries are:
#
#       nisplus or nis+         Use NIS+ (NIS version 3)
#       nis or yp               Use NIS (NIS version 2),
also called YP
#       dns                     Use DNS (Domain Name
Service)
#       files                   Use the local files
#       db                      Use the local database
(.db) files
#       compat                  Use NIS on compat mode
#       hesiod                  Use Hesiod for user
lookups
#       [NOTFOUND=return]       Stop searching if not
found so far
#

# To use db, put the "db" in front of "files" for entries
you want to be
# looked up first in the databases
#
# Example:
#passwd:    db files nisplus nis
#shadow:    db files nisplus nis
#group:     db files nisplus nis

#passwd:     files nisplus nis
#shadow:     files nisplus nis
#group:      files nisplus nis

passwd: nis files
group:  nis files
#shadow: compat
netgroup: nis db files

#hosts:     db files nisplus nis dns
hosts:      nis dns files

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   nis [NOTFOUND=return] files
protocols:  files nis
rpc:        files nis
services:   files nis

netgroup:   nis

publickey:  nis

automount:  files nis
aliases:    files nis

> - check /etc/yp.conf, /etc/sysconfig/network
xem tre^n

Hie^.n ta.i yppasswdd cha.y, ypbind cu~ng cha.y ok

[EMAIL PROTECTED] home]# /etc/init.d/ypbind restart
Shutting down NIS services:                               
     [  OK  ]
Binding to the NIS domain...                              
     [  OK  ]
Listening for an NIS domain server: .fennel.xxxxxxxxxxxxx
[EMAIL PROTECTED] home]#

Nhu+ng dde^'n khi VH thu+? ypcat thi` lo^~i tu`m lum:

[EMAIL PROTECTED] home]# ypcat -x
Use "ethers"    for map "ethers.byname"
Use "aliases"   for map "mail.aliases"
Use "services"  for map "services.byname"
Use "protocols" for map "protocols.bynumber"
Use "hosts"     for map "hosts.byname"
Use "networks"  for map "networks.byaddr"
Use "group"     for map "group.byname"
Use "passwd"    for map "passwd.byname"
[EMAIL PROTECTED] home]# ypcat hosts
No such map hosts.byname. Reason: Can't bind to server
which serves this domain
[EMAIL PROTECTED] home]# ypcat passwd
No such map passwd.byname. Reason: Can't bind to server
which serves this domain
[EMAIL PROTECTED] home]#

Lu'c ma` restart la.i network service, no' ba'o lo^~i
the^' na`y:



[EMAIL PROTECTED] home]# /etc/init.d/network restart
Shutting down interface eth0:                             
     [  OK  ]
Shutting down loopback interface:                         
     [  OK  ]
do_ypcall: clnt_call: RPC: Unable to send; errno = Network
is unreachable
do_ypcall: clnt_call: RPC: Unable to send; errno = Network
is unreachable
Setting network parameters:                               
     [  OK  ]
Bringing up loopback interface:                           
     [  OK  ]
Bringing up interface eth0:    

Dda^y la` /etc/sysconfig/network:



[EMAIL PROTECTED] home]# cat /etc/sysconfig/network
HOSTNAME=cluster245
NETWORKING=yes
GATEWAY=172.21.65.129
NISDOMAIN=172.21.65.141

Ba'c giu'p em nhe'!

thx



http://www.fedu.uec.ac.jp/~vuhung/
http://chuiyang.org

__________________________________________________
Do You Yahoo!?
http://bb.yahoo.co.jp/



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
VietLUG-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/vietlug-users

Trả lời cho