Re: [Vietlug] setup a NIS server/client?

2004-07-02 Hội thoại Bit Takeshi
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.denyThis 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...  

Re: [Vietlug] setup a NIS server/client?

2004-06-28 Hội thoại Bit Takeshi
--- Vn2037 [EMAIL PROTECTED] からのメッセージ:
 Bit Takeshi wrote:
   Me. kie^'p, doc cu?a tu.i na`y lo^.n tu`ng phe`o
 le^n
  ddo.c kho^ng hie^?u gi`.
 

http://www.linux-nis.org/nis-howto/HOWTO/settingup_client.html
  
 
 ML kho^ng pha?i la` ca'i cho+. tro+`i !!! A(n no'i
 ca^?n tha^.n nghe chu'

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

dda~ cha.y:

/bin/domainname nis.domain.in.my.network

dda~ the^m "+::" va`o /etc/passwd va` ":+++" va`o
/etc/group

File /etc/nsswitch.conf

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

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

# 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:   files
protocols:  files
rpc:files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:files nisplus
-


[EMAIL PROTECTED] root]# cat /etc/host.conf
order hosts,bind,nis
multi on
[EMAIL PROTECTED] root]#


Ba^y gio+`, ne^'u try to su - to root thi` bi. ba'o lo^~i:

[EMAIL PROTECTED] vuhung]$ su -
Password:
YPBINDPROC_DOMAIN: Domain not bound
YPBINDPROC_DOMAIN: Domain not bound
[EMAIL PROTECTED] root]#

Va` nu+~a:


[EMAIL PROTECTED] root]# /etc/init.d/ypbind restart
Shutting down NIS services:   
 [  OK  ]
Binding to the NIS domain...  
 [  OK  ]
Listening for an NIS domain server: ..can't
yp_bind: Reason: Domain not bound
[EMAIL PROTECTED] root]#

softwares cha.y tre^n no':

n
[EMAIL PROTECTED] root]# rpm -qa | grep ^yp
yp-tools-2.8-2mdk
ypserv-2.11-1mdk
ypbind-1.12-3mdk
[EMAIL PROTECTED] root]#

client na`y cha.y Mandrake 10.0, co`n NIS server thi` no'
tre^n 1 con FreeBSD4.9, em cu~ng kho^ng ro~ va` chi? du`ng
no' tho^i.

Em dda~ googled mo-.t ti' va` ddo.c nhu+ng kho^ng ti`m ra
kho^ng tin mi`nh ca^`n.

Mong ca'c ba'c giu'p ddo+~;)

VH

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