You are on page 1of 8

developerWorks 02.09.

2005

LPI 201:

Intermediate Level Administration (LPIC-2) 209

NFS
NFS
, ,
NFS
mount:
mount -t nfs my.nfs.server.com:/path/on/server /path/on/client

/etc/fstab:
my.nfs.server.com:/path/on/server /path/on/client nfs rw,soft 0 0

soft , I/O (EIO)


. hard
, NFS .
, rpc.lockd, rpc.statd rpc.quotad
/ .
NFS ( )
NFS ,
.
NFS NFS,
, (
inetd):

portmap: portmapper rpc.bind.


rpc.mountd: mounted.
rpc.nfsd: nfsd.

:rpc.lockd,
rpc.statd, rpc.quotad, , ,
, lstat ( ls
-l ), .

NFS ( )
, NFS, TCP (tcpd)
/etc/host.allow.
nfsd, portmap
/etc/hosts.allow.
mountd () /etc/exports.
,
. Linux NFS, /etc/exports mountd.
exportfs -a /etc/exports
/var/lib/nfs/xtab, mountd.
exportfs,
. ,
, /etc/exports.
Unix- ,
/etc/exports Linux ,
SunOS BSD.
/etc/hosts.allow /etc/hosts.deny
/etc/hosts.allow ,
Linux. NFS,
, NFS. ,
/etc/hosts.deny , .
, ,
, , .
, ,
,
( ) :
# /etc/hosts.deny
ALL:ALL EXCEPT localhost:DENY

/etc/hosts.deny ( LOCALHOST)
, . :
#/etc/hosts.allow
# Allow localhost and intra-net domain to use all servers
ALL : 127.0.0.1, 192.168.
# Let everyone ssh here except 216.73.92.* and .microsoft.com
sshd: ALL EXCEPT 216.73.92. .microsoft.com : ALLOW
# Let users in the *.example.net domain ftp in
ftpd: .example.net

/etc/exports
/etc/export:
# sample /etc/exports file / master(rw) trusty(rw,no_root_squash)
/projects proj*.local.domain(rw) /usr *.local.domain(ro) @trusted(rw)
/home/joe pc001(rw,all_squash,anonuid=150,anongid=100) /pub
(ro,insecure,all_squash)

, root (uid 0) nobody (uid 65534)


; root
, root ( /
) NFS. no_root_squash
, root
/.
.
/usr , ,
"trusted" .
/home/joe pc001, (
uid/gid) uid=150, gid=100. ,
NFS
( DOS).
, Linux ( Unix- ) TCP
UDP 1-1023 ( )
root. , root
NFS, NFS ,
. , ,
( Windows).
insecure NFS TCP/UDP.
Windows.
NFS
nfsstat NFS ( / ) ,
iostat vmstat.
showmount mountd ,
. NFS ,
mountd
, showmount . ,
showmount . , showmount
, .
" " ,
nfsd, , ,
.

(readblock, writeblock )
( , mountd, inode ,
, read/write/ ). HTTP
.
, ,
.

samba
Samba
Samba smbd (
Windows). inetd,
smbd -D. Nmbd NetBios (
WINS ). inetd,
nmbd -D. Samba Windows,
.
smbd nmbd /etc/samba/smb.conf.
man- smb.conf. lmhosts
NetBios IP . (
) /etc/hosts.
HOWTO , Samba.
,
.

smb.conf
() Samba:
[homes]
comment = Home Directories
browseable = no

smb.conf.
CUPS
Unix CUPS , ,
. , CUPS
, smb.conf.
CUPS:
[global]
load printers = yes
printing = cups
printcap name = cups

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root
[print$]
comment = Printer Drivers
path = /etc/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root

CUPS ppd (Postscript printer description)


Windows , , ,
(
- , , ,
). Unix
. man- cupsaddsmb
.

Samba ( NFS) ,
. ,
, ,
. man- smb.conf.
, Samba
(). ,
Unix.
. .
, , smbpasswd
Samba.
"Unix password sync" smbpasswd Unix,
Samba.
pam_smb
Linux Samba. ,
LDAP Samba / Linux.
Samba
Samba

testparm ( smbtestparm). smb.conf


.
nmblookup Samba , nslookup DNS;
NetBios. man- nmblookup
.
Samba
smbclient Samba.
SMB ; man- smbmount
.

File Transfer Protocol


FTP
FTP . FTP
-- 20 21. 21
( ) 20
, .
FTP ,
-- --
. , NFS Samba (
SSH/SCP ).
FTP SSH, , .
FTP ,
. GUI

. FTP --
, ,
FTP .
FTP
, FTP ,
. FTP " FTP" --
.
anonymous ,
( ), .
/ ,
( ,
- ).
Web- ,
FTP . FTP
URL ( ). ,

wget FTP
:
$ wget ftp://example.net/pub/somefile
$ wget ftp://user:passwd@example.net/pub/somefile

FTP
NFS Samba ( , mount
/etc/fstab; URL).
FTP
FTP ,
Linux .
FTP .
Linux FTP :

wu-ftpd.
vsftpd.
ProFTPd.
BSD ftpd.
TUX FTP.

.
/etc/FOOftpd.conf (
"FOO"). vsftpd,
("vs" " ").
FTPd
. ,
/etc/vsftpd.conf .
vsftpd, option=value
.
FTPd .

anonymous_enable:
anonymous.
anon_world_readable_only: , anonymous
.
chroot_local_user: ,
chroot() .
pasv_enable: " FTP" ,
(,
).
ssl_enable: , vsftpd SSL
.
tcp_wrappers: ,
( /etc/hosts.allow /etc/hosts.deny).

FTP
FTP ,
:
% sudo vsftpd


. FTP " ", inetd xinetd. LPI 202 .
, , -
, /etc/rcS.d/, FTP
.