Solved

Samba server hosted on CentOs 5 server

Posted on 2013-06-27
28
504 Views
Last Modified: 2013-12-02
Say,
can anyone give me an example of settings to setup samba to operate in a simple windows workgroup i.e. no domain present ? Windows PC's running Windows 7

Samba version 3.03333958
0
Comment
Question by:shaunwingin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 12
  • 2
28 Comments
 
LVL 14

Accepted Solution

by:
comfortjeanius earned 250 total points
ID: 39281439
yum -y install samba
mkdir /home/share
chmod 777 /home/share
vi /etc/samba/smb.conf

Configure as follows.....

line 58
unix charset = UTF-8
dos charset = CP932

line 75
change
workgroup = WORKGROUP

line 81
uncomment and add IP address you allow
hosts allow = <IP address>

line 102
Change this line...
security = share

Add this at the end of the file
[Share]
path = /home/share
writable = yes
guest ok = yes
create mode = 0777
directory mode = 0777
share modes = yes

Save changes

type: /etc/rc.d/init.d/smb start
should start the service

type: chkconfig smb on


Now on the windows 7 workstation, open windows exeplorer
windows key + e
hit the "Alt" key
Tools
Map Network Drives...
enter the \\servername\share
Click finish
0
 

Author Comment

by:shaunwingin
ID: 39282722
tx.
I've followed this.

I'm asked for login by win7 when try to open the shared folder from explorer....
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39282753
what does your /etc/samba/smb.conf look like?


Plus what version of Windows 7 do you have ?
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39282783
Check this link out ...

http://www.stat.tamu.edu/how_to/samba_7.pdf

Apparently you have to make some minor configuration on  windows 7 becuz it does not play fair.
0
 

Author Comment

by:shaunwingin
ID: 39282957
I've tried this ID: 39282783 but same error.

Windows 7 Professional and Win7 Home Basic
smb.conf.txt
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39284398
Try running this from the Windows client in the elevated cmd prompt

net use * /delete

and try to reconnect to see what happens.
0
 

Author Comment

by:shaunwingin
ID: 39286933
Same problem.
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39290081
You can delete

[Share]
path = /home/share
writable = yes
guest ok = yes
create mode = 0777
directory mode = 0777
share modes = yes

because your share is

[madisk]
;user = a1
path = /usr/src/a1madisk
writable = yes
guest ok = yes
create mode = 0777
directory mode = 0777
share modes = yes


This was just an example of what is should look like
0
 

Author Comment

by:shaunwingin
ID: 39290144
problem persists....
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39290145
The line with ;user = a1 should probably be valid user = a1
[madisk]
;user = a1
path = /usr/src/a1madisk
writable = yes
guest ok = yes
create mode = 0777
directory mode = 0777
share modes = yes

http://www.centos.org/docs/4/html/rhel-sag-en-4/s1-samba-configuring.html


Check this out


http://stackoverflow.com/questions/9391033/setting-up-samba-share-from-centos-directory-to-windows-7
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39290329
Do you have Windows Live Essential or Window Live Sign-in Assistant installed?

Try uninstalling this program and try again.


Plus try commenting out these lines like this

;security = share
;passdb backend = tdbsam
0
 

Author Comment

by:shaunwingin
ID: 39290761
Tx, this helps a little ID: 39290145
However each time PC reboots need to red- the steps.

ID: 39290329:
Windows Live Essential or Window Live Sign-in Assistant - Not installed.

;security = share
;passdb backend = tdbsam

tried and restarted, but same...
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39290935
windows key + r
Type gpedit.msc

Open “Computer Configuration”/Windows Settings/Security Settings/Local Policies/Security Settings.

In the right pane, enable the following policies:

Network access: Allow anonymous SID/name translation

Network access: Let Everyone permissions apply to anonymous users

For you Windows 7 Home Basic you can download the this software for the local group policy from here

Then try
windows key + r  
type secpol.msc
Now back to Local Policies
Security Options
Network Security: LAN Manager authentication level
Send LM &
NTLM -- use NTLMv2 session security if
negotiated
Click Okay

Then retest and postback
0
 

Author Comment

by:shaunwingin
ID: 39291079
Tx, now doesn't prompt for username & pwd, but error:  "You don't have permission to access.."

I execute:
 smbpasswd -a etc. and restarted samba and connected without username/pwd prompt.
Don't think  issue on reboot of win7 pc is resolved though...
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39291117
Don't think  issue on reboot of win7 pc is resolved though...


What issue that you are having after reboot?
0
 

Author Comment

by:shaunwingin
ID: 39291232
The username / pwd is forgotten & need to run smbpasswd & restart smb server
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39291445
I thought you are not trying to use a username and password?


lets try this

windows key + r
Type or copy and paste command: control /name Microsoft.CredentialManager

Click on adding Windows credentials
Input information

If that does not work delete that credentials and add generic credential

Post back
0
 

Author Comment

by:shaunwingin
ID: 39292610
This did work:
Type or copy and paste command: control /name Microsoft.CredentialManager

Click on adding Windows credentials
Input information
It's failing on one PC with error "You do not have permission"..."

Any ideas how to solve error in this PC (Win7 Prof).
alternatively,
I would be fine with no security and restrict access to IP of PC. How can I add a list of allowed hosts? Are they comma separated?
Tx.
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39294477
What happens when you run this command on the Linux box

smbclient -L localhost

Plus you did not change any permission and are you inputting the correct password.

"smbpasswd  will allow you to change the password of the samba user"

I configure mines on a Linux Mint 14 Nadia without a password or user account. I had my firewall enable so I ran....

sudo ufw allow from <ip address> to  any port 139
NOTE: This will allow by specific port and IP address

Do you have your firewall  enable, if you do you might have to open the port for NetBIOS?

Plus try sudo chmod -R 777 <path of external drive>

http://askubuntu.com/questions/113650/windows-users-unable-to-access-samba-share-of-an-external-drive
0
 

Author Comment

by:shaunwingin
ID: 39295311
tx.

[root@a1 ~]# smbclient -L localhost
-bash: smbclient: command not found
0
 
LVL 14

Expert Comment

by:comfortjeanius
ID: 39296516
It probably not install try

yum install samba-client

or

su -c "yum install samba-client"
0
 

Author Comment

by:shaunwingin
ID: 39317030
Just been thinking...
Does Samba support Windows 7?
It seems ridiculous to battle to connect to it....
Doe anyone still use Samba?
Is there perhaps another way to setup Windows to Linux file access?
0
 

Author Comment

by:shaunwingin
ID: 39411003
Anyone out there?
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 250 total points
ID: 39411969
I've had no issues with Windows 7 and Samba 3.6.9 on CentOS 6. I suspect that you need a more up to date version of Samba.
0
 

Author Comment

by:shaunwingin
ID: 39412540
Gr8. How can I upgrade my version Samba version 3.03333958 to yours?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 39412579
The easiest way would be to upgrade the system to CentOS 6. I don't know if there is an rpm available anywhere or if you'd have to build from source.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

688 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