You are on page 1of 2

Wk - 11 NFS and Samba

LHS -server
RHS- desktop/client

R
less /etc/services
grep ^rpc /etc/services
port 369

ssh <ip add> grep ^rpc /etc/services

ssh <ip add> grep -v ^# /etc/exports

/etc/exports - a file that only exist on server, not on desktop

*.onskills.bogus(ro,insecure,root,root_squash) -- everyone on this


network(*onskills.bogus) can read only .....
root squash - root user of a client but becomes a regular user with regular
privileges when used in a server/host

Server - nfs, samba - terms used in server


client/desktop - mount points - term used only in client

sudo mount <ip addr of nfs share which is in server, so ipadd of serv>:/expoty/pool
/mnt/ubs.0
ls -l /mnt/ubs.o

sudo umount <ipadd> /mnt/ubs.0


ls -l /mnt/ubs.0
output: hello-on-dtop

sudo mount <ipadd>:/export/pool /mnt/ubs.0


ls -l /mnt/ubs.0
out: goodbye-from-server
hello-from-server

SERVER:
ls -l /export
ls -l /export/pool - shows the same files when using the ls -l /mnt/ubs.0 from
client

client
ls -l /mnt/ubs.1
testfile
sudo mount <ipadd>:/export/dtp /mnt/ubs.1
newfile.0
newfile.1
newfile.2

server
check the files in server
ls -l /export/dtp

mount | grep mnt

client:
touch /mnt/ubs.2/newfile
ls -l /mnt/ubs.2
server:
ls -l /export/ubd/bcatkan

client:
sudo umount /mnt/ubs.2 ; ls -l /mnt/ubs.2
sudo umount /mnt/ubs.0 ; ls -l /mnt/ubs.0
sudo umount /mnt/ubs.1 ; ls -l /mnt/ubs.1

SAMBA - used to copy files like FTP


ls -l /etc/samba
less /etc/samba/smb.conf
grep procedures /etc/samba/smb.conf
grep -B3 -A10 procedures /etc/samba/smb.conf

server:
ls -ld /var/spool/samba{procedures,data}
grep ^smb /etc/passwd

samba account is system user - dameon

install samba

desk/client:
smbclient -L <ipadd>
smbclient //ubs.onskills.bogus/procedures
output:
>ls

server:
ls -l /var/spool/samba/procedures

desktop GUI
network
connect to server: smb://ubs.onskills.bogus

You might also like