Access Network-Attached Storage (NFS and Samba) Flashcards

1
Q

What are the steps for NFS Server configuration?

A
  1. Install NFS Packages
    yum install nfs-utils libnfsidmap
  2. Enable/Start NFS services
    systemctl enable rpcbind | nfs-server
    systemctl start rpc bind nfs-server rpc-statd
    rpc-idmapd
  3. Create NFS share directory and assign permissions
    mkdir /nfsshare
    chmod a+rwx /nfsshare
  4. Modify /etc/export file to add new shared
    filesystem
    /nfsshare 192.x.x.x (rw,sync,no_root_squash)
    /nfsshare *(rw,sync,no_root_squash)
  5. Export the NFS filesystem
    exportfs -rv
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the steps for NFS client configuration? Bonus: How can you unmount the NFS share?

A
  1. Install NFS Packages
    yum install nfs-utils rpcbind
  2. Enable and start rpcbind service
    systemctl enable rpcbind
    systemctl start rpcbind
  3. Make sure firewalld or iptables is stopped
    ps -ef | egrep “firewalld|iptables”
  4. Show mount from the NFS server
    showmount -e 192.168.1.x
  5. Create a mount point
    mkdir /mnt/appnfs
  6. Mount NFS Filesystem
    mount 192.168.1.x:/nfsshare /mnt/appnfs
  7. Verify Mount
    df -h
  8. Bonus: To Unmount
    umount /mnt/nfsshare
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What protocols are used to share Samba?

A

SMB, SMB v2, SMB v3, CIFS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the steps to configure Samba on Linux?

A
  1. Snapshot VM
  2. Install Samba Packages
    yum install samba samba-client samba-common
  3. Enable Samba To Be Allowed Through Firewall
    firewall-cmd –permanent –zone=public
    –add-service=samba
    firewallcmd –reload
  4. Create Samba Share Driectories and Assign permissions (-p option creates parent directory
    mkdir -p /samba/name
    chmod a+rwx /samba/name
    chown -R nobody:nobody /samba/name
  5. Also Change the SELinux Security Context for Samba Share Directory (-t option is for type)
    chcon -t samba_share_t /samba/name
  6. Modify /etc/samba/smb.conf file to add new shared filesystem
    [global]
    workgroup = WORKGROUP
    netbios name = centos
    security = user
    map to guest = bad user
    dns proxy = no
    [Anonymous]
    path = /samba/name
    browsable = yes
    writable = yes
    guest ok = yes
    guest only = yes
    read only = yes
    [Secure]
    path = /samba/securename
    valid users = user
    guest ok = no
  7. Verify Settings
    testparm
  8. Enable/Start Samba Services
    systemctl start|enable smb|nmb
  9. Mount Samba Share on Linux Client
    yum install cifs-utils samba-client
    mkdir /mnt/share
    mount -t cifs //192.x.x.x/Anonymous /mnt/share
How well did you know this?
1
Not at all
2
3
4
5
Perfectly