Solved

Samba configuration cannot open folders

Posted on 2012-03-09
5
345 Views
Last Modified: 2012-06-21
Hi,
I'm taking a class on Linux.  This week we are learning about Samba.  Trying to set it up so that I can r/w files on the share.  Using Centos 5.7.

I can view the \\servername\sharename from my Win 7 device.  I cannot open the folder.

I set up a Linux user.
I setup a Samba user.
I matched passwords from my Win7 box to the 2 Linux passwords.

I can't figure this out.

I am using the Samba Server Configuration and the Samba Web Administration Tool.

Please advise.

And thank you to all who post...
0
Comment
Question by:svillardi
5 Comments
 
LVL 16

Expert Comment

by:santoshmotwani
Comment Utility
can u please paste the output of cat /etc/samba/smb.conf

thanks
0
 
LVL 1

Expert Comment

by:backhaul
Comment Utility
Please provide more basic configuration as well as output so that we may help you with your configuration.

If you need help with what to give us (besides the smb.conf) please ask and we will gladly provide the commands and ways to give us output.
0
 

Author Comment

by:svillardi
Comment Utility
Yes, I will need to know those commands.  I am learning this in school and I'm struggling...

Here's the smb.conf:

[admin@Centos ~]$ cat /etc/samba/smb.conf
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2012/03/07 23:51:11

[global]
        workgroup = workgroup
        server string = Samba Server Version %v
        passdb backend = tdbsam
        username map = /etc/samba/smbusers
        cups options = raw
        security = share
;       encrypt passwords = yes
;       guest ok = no
;       guest account = nobody

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

[scott]
        path = /home/scott
        writeable = yes
;       browseable = yes
        guest ok = yes
0
 
LVL 7

Accepted Solution

by:
chandranjoy earned 500 total points
Comment Utility
Hi,
Please make sure that you have followed the given below steps to share folders from Linux to windows.

Ex:
[global]
workgroup = PUTIEVILLE
server string = My Lil Linux Box
hosts allow = 192.168. 127.
log file = /var/log/samba/%m.log
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

[Downloads]
comment = Downloads
path = /home/windisk/Downloads
browseable = yes
writable = yes
public = yes
read only = no 

Open in new window


Samba Users

Since we're using user level security (the best option when connecting to a WinNT based machine, such as Windows 2000 or Windows XP), we need to set up samba users.

First, lets create the smbpasswd file that we defined in the smb.conf file. The best way to go about this is to create it based on your existing /etc/passwd file. In other words, samba users are created based on existing linux users:

   
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

Open in new window


Chmod 600 this file (/etc/samba/smbpasswd) so that only root has read and write permissions.

However, this file only copies over Linux users to samba users. It doesn't copy over their passwords, as well. Therefore, use the following command to set each samba user's password:

   
smbpasswd username

Open in new window


Obviously, replace username with each of your user's usernames. You will then be prompted to enter a password for this user account. I like to set my samba user's passwords the same as their linux user counterparts. However, this isn't necessary.

Samba Service

Now that everything has been configured, the final step is to start the samba service. Samba runs in the background as a linux daemon. Therefore, it can be controlled by typing:

   
 service smb start
    service smb stop
    service smb restart

Open in new window


Note that once the computer is restarted or shutdown, the samba service won't start up again the next time. I use the GUI (xwindows) program serviceconf to set up all my services to execute automatically.

Reference URL:
http://www.daniweb.com/hardware-and-software/linux-and-unix/linux-kernel-and-hardware-setup/threads/1741


Thanks,
Jay
0
 

Author Comment

by:svillardi
Comment Utility
No good.  Still doesn't work.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now