[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

Samba server hosted on CentOs 5 server

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
shaunwingin
Asked:
shaunwingin
  • 12
  • 12
  • 2
2 Solutions
 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
tx.
I've followed this.

I'm asked for login by win7 when try to open the shared folder from explorer....
0
 
comfortjeaniusCommented:
what does your /etc/samba/smb.conf look like?


Plus what version of Windows 7 do you have ?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
I've tried this ID: 39282783 but same error.

Windows 7 Professional and Win7 Home Basic
smb.conf.txt
0
 
comfortjeaniusCommented:
Try running this from the Windows client in the elevated cmd prompt

net use * /delete

and try to reconnect to see what happens.
0
 
shaunwinginAuthor Commented:
Same problem.
0
 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
problem persists....
0
 
comfortjeaniusCommented:
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
 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
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
 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
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
 
comfortjeaniusCommented:
Don't think  issue on reboot of win7 pc is resolved though...


What issue that you are having after reboot?
0
 
shaunwinginAuthor Commented:
The username / pwd is forgotten & need to run smbpasswd & restart smb server
0
 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
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
 
comfortjeaniusCommented:
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
 
shaunwinginAuthor Commented:
tx.

[root@a1 ~]# smbclient -L localhost
-bash: smbclient: command not found
0
 
comfortjeaniusCommented:
It probably not install try

yum install samba-client

or

su -c "yum install samba-client"
0
 
shaunwinginAuthor Commented:
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
 
shaunwinginAuthor Commented:
Anyone out there?
0
 
jlevieCommented:
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
 
shaunwinginAuthor Commented:
Gr8. How can I upgrade my version Samba version 3.03333958 to yours?
0
 
jlevieCommented:
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 feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 12
  • 12
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now