Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, November 22, 2016

Samba server on Ubuntu

. Install samba server on ubuntu if not done yet.
    sudo apt-get install samba

. Create an user, howard.
    sudo useradd howard

. Create a samba user, howard, and set the password.
    sudo smbpasswd -a howard

. Configure the shared folder permission info in samba config file.
    sudo vi /etc/samba/smb.conf
    Add following info to the end of smb.conf file
    [src]
    path = /home/howard/src/
    browseable = yes
    read only = no
    writeable = yes
    create mask = 0755
    directory mask = 0755
    valid users = howard

. Restart the samba service and it's now ready!
    sudo service smbd restart


[To connect the samba server from a Mac OS X]
    Go to finder and Cmd+K, enter smb://IPOfUbuntu/src

Friday, September 23, 2016

NFS server on Ubuntu

Setup NFS server on Ubuntu:
   . sudo apt-get install nfs-kernel-server
   . Create a folder for sharing
      . mkdir PATH_TO_SHARE
      . chmod -R 777 PATH_TO_SHARE
   . Edit /etc/exports
      . sudo vi /etc/exports
      . add following line and save
         PATH_TO_SHARE *(rw,sync,insecure,no_root_squash,no_all_squash)
   . Refresh updated /etc/exports
      . sudo exportfs -r
   . Restart NFS server
      . /etc/init.d/nfs-kernel-server restart
   . Check shared NFS folders
      . showmount -e localhost


Connect to NFS server on Ubuntu from Mac OS X

[Finder]
   . Cmd + K (Finder -> Go -> Connect to Server )
     . nfs://IPOfUbuntu:/PATH_TO_SHARE
[Terminal]
   . Check what folders have been shared
      . showmount -e IPOfUbuntu
   . Create a mount point
      . mkdir MOUNT_POINT
   . Mount nfs to local MOUNT_POINT folder
      . sudo mount -o resvport,rw -t nfs IPOfUbuntu:/PATH_TO_SHARE MOUNT_POINT

Check clients which connect to Mac OS X Wi-Fi Internet Sharing

arp -i bridge100 -a bridge100 may be different on your Mac OSX