Using Samba on CentOS With Windows 7/8

Go ahead and install the samba packages:

sudo yum install samba samba-client samba-common
smbd --version
sudo chkconfig smb on
sudo chkconfig nmb on
sudo nano /etc/selinux/config

Disable SELINUX by editing /etc/selinux/config and make one small change:


Make some additions to iptables:

sudo iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
sudo iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
sudo iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
sudo service iptables save

NOW, restart the server:

sudo reboot now

Backup and modify smb.conf:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
sudo rm /etc/samba/smb.conf
sudo touch /etc/samba/smb.conf
sudo nano /etc/samba/smb.conf

The file should contain:

workgroup = WORKGROUP
server string = server_name
security = user
map to guest = bad user

path = /media/sdd
valid users = @smbgrp
guest ok = no
writable = yes
browsable = yes

Restart smb and nmb:

sudo service smb restart
sudo service nmb restart

Add your groups and add users to them:

sudo groupadd smbgrp
cd /media/sdb
sudo mkdir secureshare
sudo chown -R username:smbgrp secureshare/
ls -l
sudo chmod -R 0770 secureshare/
sudo usermod -a -G smbgrp username
sudo smbpasswd -a username
sudo service smb restart
sudo service nmb restart
sudo testparm


Now connect from a windows PC using credentials from CentOS server by right-clicking within “Computer” and selecting “Add a network location”. Follow the prompts and your share will be usable from Windows!

If you cannot connect, it’s most likely the firewall on the CentOS machine. Backup and then flush iptables to test if needed, and then rebuild your firewall accordingly. If you cannot get access to your shares, you have a permissions problem on the server end. Check users, groups, share permissions, and smb.conf for proper values.

You’re welcome 😉

An Adventure, a Wedding, Family, and Fun Times to Come

Richard and Tina-0263-87

I couldn’t be happier as I sit on our patio, overlooking the deep-water canal where our boat gently rocks with the motion of the waters beneath it. I got married two days ago during what had to be one of the most beautiful ceremonies ever to be had. My lovely wife is inside nursing our amazing four-month-old and I’m waiting for her to join me on this patio where we will sip delicious drinks and talk about our brand new family.

A lot has changed in my life over the past two years. I met Tina and we were instantly best pals – inseparable, irresistible, and in true love. We can attribute that to a bit of luck and a bit of engineering. We managed to overcome some of life’s hardest times together and end up here, two days after our wedding, in a cozy little waterfront rental house in Key Largo. What an amazing adventure!

I’ve always been highly aggressive. When something strikes me as worthy goal, I do everything necessary to put that goal within my reach. Then I grab it and I do not let go.  That’s what happened here. Tina and I decided we wanted to be together – we overcame some pretty serious burdens but we made it happen. I got a great job, we had a baby, and we got married. A bit out of order by some people’s standards, but I think they’re just jealous. Now that all that is in the past, I personally don’t see any difference. We’re just as happy and durable as anyone. And that kid of ours – he’s a good one. He’ll make a lot of people very jealous for years to come.

I have only two things to focus on in the near future. First, we’re pretty happy here where we are spending our “honeymoon” in Key Largo. A nice little house all to ourselves, on the water – complete with a nice kitchen, washer/dryer, dishwasher, and plenty of dock space. I’ve focused so intently on keeping Tina and Rylan happy and I think I’ve done a pretty good job. They’ve not gone without, and I aim to keep it that way. But for myself – I want to live this life, in a nice house, on a nice canal, in a nice town. That is goal number one.

Goal number two – career. I’ve not fallen short at my current position. I will be returning to work on July 5th ready to take my company and my career to the next level. Look out Internet – because I’m coming back hard, I’ve got plenty of great ideas, and nothing but the right attitude to make all that happen.

Maybe both my goals really tie into each other. The final phase of hardship in my life is completing these goals, raising my boy to be a good one, and always loving my wife and making her dreams come true also. After that, well, I’m just going fishing!

I’ll be posting a few more wedding photos soon. Thanks to everyone who came out and shared our special day with us. We love you all!