Berbagi File di Linux

Sebenernya ini repost ajah dari sini… Jadi ini cuma jurnal pribadi ajah.

Intinya, yang harus gw lakuin kalo mau share folder di linux tuh gini:

  1. Install samba (inih dilakuin kalo kompi-nya lum ada samba), kalo pake LM, biasanya langkah ini c di-skip.
    sudo apt-get install samba
  2. Set username sama pass word buat ngakses folder. Ketikin di termina:
    sudo smbpasswd -a username

    Nantinya, dia bakal minta password buat username itu. Kalo gw bikin gini:

    Selection_001

    Arti dari gamar di atas, gw musti ngakses folder-nya pake username “arby”, password sesuai yang gw input

  3. Bikin folder tempat nge-share
    mkdir ~/Desktop/Share
  4. Edit smb.conf, pake editor apapun bisa… gw c pake gedit.
    sudo gedit /etc/samba/smb.conf

    Scroll ke bagian paling bawah, tambahin kode gini.

    [<folder_name>]
    path = /home/<user_name>/<folder_name>
    available = yes
    valid users = <user_name>
    read only = no
    browsable = yes
    public = yes
    writable = yes

    Kalo gw c nyesuaiin kode di atas gini:

    [Share]
    path = /home/arby/Desktop/Share
    available = yes
    valid users = arby
    read only = no
    browsable = yes
    public = yes
    writable = yes

    Yang gw warnain merah, itu yang ada perubahannya.

  5. Restart samba pake command
    sudo service smbd restart

Udaaaahhh~~ tinggal akses ajah pake windows atau linux. Bikin 1 shortcut baru, akses pake “\\<ip computer linux>\<nama folder>”. Kalo mintak username ma password, masukin username ma password yang dibikin di langkah 2.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s