Solved

Samba server hosted on CentOs 5 server

Posted on 2013-06-27
28
495 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
  • 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
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.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Coding C# in Linux 8 130
AWS Central Authentication 1 87
Remove Resilio directory from Netgear ReadyNAS 212 via SSH. 2 47
Apache module 5 47
With the withdrawal of support for Windows Server 2003 this summer, many clients face the issue of moving away from their 2003 installs. There are a few options out there that many people/companies are selling. But the clients I have, haven't wanted…
As a financial services provider, your business is impacted by two of the strictest federal regulations on record: the Sarbanes-Oxley Act and the Gramm-Leach-Bliley Act. Correctly implementing faxing into your organization to provide secure, real-ti…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

860 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