Solved

Samba configuration cannot open folders

Posted on 2012-03-09
5
362 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
ID: 37704245
can u please paste the output of cat /etc/samba/smb.conf

thanks
0
 
LVL 1

Expert Comment

by:backhaul
ID: 37704930
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
ID: 37705046
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
ID: 37706697
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
ID: 37786957
No good.  Still doesn't work.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

785 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