Samba Setup on CentOS 5

Last updated on April 14, 2024 am

I have an existing user "amy" on my new installation of CentOS v5.1. I want a directory located at "/home/fileServer" to be shared through samba as "fileServer", that can be mounted by amy in Windows XP and Vista.

Here's the steps:

1. Installed samba server
yum install samba

2. Created directory to be shared
# mkdir /home/fileServer
# chown root:root /home/fileServer
# chmod 770 /home/fileServer

3. Edit samba configuration file
# cd /etc/samba
# mv smb.conf smb.conf.sample
# vi smb.conf
[global]
workgroup = MYWORKGROUP

[fileServer]
comment = file server
path = /home/fileServer
writable = yes
create mask = 0770
directory mask = 0770

4. Edit samba user accounts
# smbpasswd -a root
# smbpasswd -a amy

5. Update smbusers file
# vi smbusers
root = administrator admin
amy = amy

6. Started smb daemon
# service smb restart

7. Test
In Windows XP, typed \\, and entered amy as user with the password. You should see the share defined in smb.conf.


Samba Setup on CentOS 5
https://mingster.com/2008/04/28/samba-setup-on-centos-5/
Author
mingster
Posted on
April 28, 2008
Licensed under