Category Archives: windows7

CentOS 6: Install Samba

Versions

  1. CentOS 6.4
  2. Samba 3.6.9
  3. Windows 7

Install

Configure

  1. Add linux user for samba access:
    Note
    Substitute $SAMBA_USER for samba username

  2. Set linux user password:

  3. Add linux user to samba (use same password)

  4. Optional: Add a path to share and change ownership to samba user:
    Note
    Substitute $PATH with the absolute path to the directory to share

    Note
    home directories are shared by the default samba config
  5. Optional: Set selinux context for directory to “samba_share_t” to permit sharing:

  6. Optional: Set selinux bool to make home directories shareable:

  7. Edit /etc/samba/smb.conf and change the workgroup to match the Windows 7 workgroup:
    Note
    Substitute $WG with the name of the workgroup

    Note
    if not configured, Windows 7 defaults to the workgroup name “workgroup”
  8. Add the following to the end of /etc/samba/smb.conf:
    Note
    Substitute $SHARE_NAME with the name of the share

  9. Start services

  10. Start on boot

  11. Open the following ports for samba:

Test

  1. On Windows 7, open command-line and map drive:
    Note
    Substitute $HOSTNAME for the hostname of the samba machine, $PASSWORD with the password of the samba user

    Note

    It may be necessary to run

    to remove active connections and clear cached connection information if you have attempted to connect to the CentOS machine before.