Click to See Complete Forum and Search --> : Samba and Windows XP Professional
LoRdMaUL
08-25-2002, 01:56 PM
I am having a devil of a time making these 2 play nice together. It seems like I saw a thread on here about how to do this but I can't seem to find it now....Can someone point me to that thread or give me some direction on this please? Thanks.
talon1177
08-25-2002, 02:27 PM
Heh heh, I'm having a similar problem! Try clicking on the "Search" button (next to FAQ) and then search for "Samba Configuration". I'm still going through the posts there....
cowanrl
08-25-2002, 04:07 PM
What type of problem are you having? Are you having trouble seeing the Samba shares? Can you see them but can't access them? Do other Windows computers on your network acess them OK but the Win2k machines don't. Those are all common Samba problems.
I'm sure it would eventually help to see your smb.conf file. You may want to post it here.
Also a little description of your network. Small network using just a workgroup all on the same IP subnet or a large network with NT or Win2k domains and multiple IP subnets.
LoRdMaUL
08-25-2002, 04:34 PM
well....my setup is a RedHat 7.3 box and and a Windows XP Professional box connected via a hub. I used webmin to do the initial configuration of Samba and I can see the share in My Network Places but when I try to map to it...it asks for a password and only gives the option for the guest to login.
Here is my smb.conf file:
[global]
path = /home/grant
smb passwd file = /etc/samba/smbpasswd
passwd program = /usr/bin/passwd %u
pam password change = yes
printing = lprng
auto services = homes
dns proxy = no
encrypt passwords = yes
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
printcap name = /etc/printcap
writable = yes
obey pam restrictions = yes
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*success fully*
security = share
user = gballard
unix password sync = Yes
server string = Samba Server
workgroup = WORKGROUP
comment = my home directory
log file = /var/log/samba/%m.log
netbios name = katrina
load printers = yes
username map = /etc/samba/user.map
public = yes
[homes]
comment = Home Directories
browseable = yes
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# If you want users samba doesn't recognize to be mapped to a guest user
; map to guest = bad user
# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes
# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff
# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /home/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes
# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no
# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/local/pc/%m
; public = no
; writable = yes
# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765
cowanrl
08-25-2002, 06:56 PM
Since your security setting is security = share, only guests will have access to your shares. Even if you created users with the smbpasswd command, you won't be able to use them.
If you want to grant access to shares based upon usernames and passwords, you need to change to security = user. See this post:
http://linuxnewbie.org/forum/showthread.php?s=&threadid=61456
for some guidance on creating usernames and passwords. Also for controlling access to the shares.
It looks like you may have tried to create another share with these lines:
path = /home/grant
user = gballard
writable = yes
However, you placed them in the global section which is the wrong place for them. They would need to be in their own share definition section. The best place would be right after the homes share definition. It might look like this:
[myshare]
path = /home/grant
user = gballard
writable = yes
public = yes
Use whatever name you wanted for the share.
LoRdMaUL
08-25-2002, 10:13 PM
would it be a problem for you to post your smb.conf so I can see what you are talking about?
cowanrl
08-26-2002, 12:21 PM
Here's a smb.conf file I use at home:
[global]
workgroup = cowanrls
netbios name = pe500sc
server string = Dell PowerEdge 500SC Samba Server
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
security = user
encrypt passwords = yes
hosts allow = 10.1.1. 10.1.2.
log file = /var/log/samba/%m.log
[homes]
comment = %U home directory
browseable = no
writable = yes
valid users = %S
create mask = 0744
directory mode = 0775
[extern]
path = /external
comment = Directory for WWW and Anon FTP files
read only = yes
public = no
write list = cowanrl @webedit
browseable = no
create mask = 0774
directory mode = 0775
[public]
comment = Public Web Site
path = /public
read only = yes
printable = no
browseable = yes
public = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = no
printable = yes
It's set up to use security = user. I created the Linux and Samba user accounts like I mentioned in the other thread I made reference to. They match the accounts we use on the Windows machines.
The homes and printers shares are the default Samba shares that share out all printers and user homes directories.
The extern share is where all of my Apache html directories and files are. Also the files that can be downloaded via anonymous ftp.
Only I and anyone I put in the webedit group have write access to it. There is no guest access to it. I made it browseable = no so it can't be seen by anyone in Windows Explorer.
The public share is where I put files for anyone to download. I set it to browseable = yes so it can be seen in Windows Explorer. No one has write access to it. Any one with a valid user account on the Samba server or guests can read or download files from the share.
Hope this helps some.
LoRdMaUL
08-26-2002, 07:06 PM
ok...I must be getting close here...its prompting me for a password still...but at least I can enter my username and password...it still doesnt let me in...but I am gettin there I think...
Here is my current smb.conf...
[global]
workgroup = workgroup
netbios name = katrina
server string = Linux Box
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
security = user
encrypt passwords = yes
hosts allow = 192.168.0.1
log file = /var/log/samba/%m.log
[homes]
comment = %U home directory
browseable = no
writable = yes
valid users = grant
create mask = 0744
directory mode = 0775
[root@katrina samba]# smbadduser grant:grant
ERROR: grant is already in /etc/samba/smbpasswd SKIPPING...
Apparently this user is already in the password file but this is the user I log into XP with...any ideas?
cowanrl
08-27-2002, 04:53 AM
I'm used to using the smbpasswd command to create and delete Samba users and change their passwords so I'll try to give you some direction using it.
I think you should delete the grant user account and then recreate it. As root, execute these commands:
smbpasswd -x grant
smbpasswd -a grant
It will prompt you for the password twice. Make it the same as the password for grant on your XP machines.
You also need to be sure grant has a Linux user account on your machine.
It looks like once you get grant's account right, you're in!
Also, be sure 192.168.0.1 is the address of your XP machine. If you continue to have problems, remark the host allow line out of your smb.conf until Samba works. Once you get Samba working, then put the line back in if you need the security.
LoRdMaUL
08-27-2002, 10:54 PM
woo hoo...it works...thank you....*saving smb.conf file to floppy right now*....:)
cowanrl
08-28-2002, 04:40 AM
Your welcome.