LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba problem (https://www.linuxquestions.org/questions/linux-networking-3/samba-problem-446406/)

metalsam 05-19-2006 08:47 AM

Samba problem
 
this is my smb.conf file:
[global]
workgroup = OFFICE1
netbios name = SAMLINUX
server string = Samba Server
interfaces = lo, eth0
bind interfaces only = Yes
hosts equiv = /etc/hosts
smb passwd file = /var/lib/samba/private/smbpasswd
username map = /etc/samba/sambausers
log file = /var/log/samba/%m.log
max log size = 50
smb ports = 139 445
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
hostname lookups = Yes
printcap name = cups
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\\.9xprofile
dns proxy = No
wins support = Yes
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
guest ok = Yes
hosts allow = 192.168.0.0, 192.168.0.1, 192.168.0.2, 192.168.0.5, localhost
hosts deny = none
cups options = raw

[printers]
comment = All Printers
path = /var/spool/samba
hosts allow =
hosts deny =
printable = Yes
browseable = No

[homes]
comment = homes directories
valid users = %S
read only = No
inherit acls = Yes

[profiles]
comment = network profiles service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = all users
path = /home/
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares
browseable = No


I can see linux from XP, but when i try to get into it, i get network path not found error. I have static IPs for linux and XP from the router.

pdeman2 05-19-2006 12:50 PM

Which profile are you using to connect to?

metalsam 05-19-2006 01:07 PM

trying to connect from the admin XP profile, metalsam

I tried adding it to the samba password thingy:

smbpasswd -a metalsam

but i told me that the samba password file didnt exist :s

fotoguy 05-19-2006 08:46 PM

Are you using this as a NT style domain controller or just a samba server?

routers 05-19-2006 09:58 PM

; smb passwd file = /var/lib/samba/private/smbpasswd

; username map = /etc/samba/sambausers

comment that line with ; above is sample and restart samba

let see

metalsam 05-20-2006 02:44 AM

ok,

i deleted the IP of my windows computer (192.168.0.5) from the allowed IP adresses, and know windows can see linux.

I also commented those lines, but it still says,

does not have permission, network path not found

Thanks for the help so far !

routers 05-20-2006 06:55 AM

can i have ur below output

# testparm

coolb 05-20-2006 07:25 AM

Quote:

Originally Posted by metalsam
ok,

i deleted the IP of my windows computer (192.168.0.5) from the allowed IP adresses, and know windows can see linux.

I also commented those lines, but it still says,

does not have permission, network path not found

Thanks for the help so far !

Try configuring your Samba server from Webmin. I configured mine from there and it works fine...

Just I thought, is your Samba server and Windows clients in the same workgroup/domain, maybe Samba has a problem if they are not in the same one.

metalsam 05-20-2006 07:46 AM

yup, ive set teh workgroup.

what is webmin ?

routers 05-20-2006 08:27 AM

webmin is gui web system manager but let see # testparm

metalsam 05-20-2006 08:52 AM

Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[profiles]"
Processing section "[users]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

# Global parameters
[global]
workgroup = OFFICE1
netbios name = SAMLINUX
server string = Samba Server
interfaces = lo, eth0
bind interfaces only = Yes
hosts equiv = /etc/hosts
log file = /var/log/samba/%m.log
max log size = 50
smb ports = 139 445
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
hostname lookups = Yes
printcap name = cups
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\\.9xprofile
dns proxy = No
wins support = Yes
default service = global
guest ok = Yes
hosts allow = 192.168.0.0, 192.168.0.1, 192.168.0.2, localhost
hosts deny = none

[homes]
comment = homes directories
valid users = %S
read only = No
inherit acls = Yes

[profiles]
comment = network profiles service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes

[users]
comment = all users
path = /home/
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares
browseable = No

routers 05-20-2006 09:59 AM

ok can u try this way , first backup smb.conf
Quote:

mv smb.conf smb.conf.BAK
take this file save as smb.conf and restart samba
Quote:

[global]
workgroup = OFFICE1
netbios name = SAMLINUX
encrypt passwords = yes
smb passwd file = smbpasswd %u
unix password sync = no
null passwords = no
server string = Samba Server

[test-user1]
comment = user1
path = /home/user1
valid users = user1
public = no
writable = yes
printable = no
create mask = 0765
--add user1 to linux system

# adduser user1
passwd user1

--adduser to smb
# smbpasswd -a user1
pass...

# /etc/init.d/smb restart

from xp search computer on network type SAMLINUX
i hope this way right for testing

metalsam 05-20-2006 12:12 PM

I changed the file, but know when i look in my workgroup on XP, I cant see linux :(

fotoguy 05-20-2006 07:09 PM

Add to the global settings `security = share`

[global]
workgroup = OFFICE1
netbios name = SAMLINUX
encrypt passwords = yes
smb passwd file = smbpasswd %u
unix password sync = no
null passwords = no
server string = Samba Server
security = share

[test-user1]
comment = user1
path = /home/user1
valid users = user1
public = no
writable = yes
printable = no
create mask = 0765

This should allow XP machines to see the share first before asking for a password if the share requires it. And don't forget to restart samba:

metalsam 05-21-2006 03:31 AM

ok, now XP can see linux, but i get:

\\Samlinux is not accessible, you may not have permission to use this network resource.

network path was not found.

blackfish 05-21-2006 08:02 AM

ok here is a basic setup of a windows 9X/ME domain controller but it will act as a file server for 2000/XP

[Global]
workgroup = OFFICE1
netbios name = SAMLINUX
server string = Samba Server
wins support = Yes
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
unix passwd sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*Unix*Password* %n\n *ReType*new*Unix*Password* %n/n *passwd:*all*authentication*tokens*updated*sucessfully*

# passwd chat line is all one line

username map = /etc/samba/smbusers
local master = yes
domain master = yes
preffered master = yes
domain logons = yes
logon path = \\%L\profiles\%U
wins support = yes

[homes]
comment = Home Directories
browsable = no
writable = yes

[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes
writable = no
share modes = no

[profiles]
path = /home/profiles
browsable = no
guest ok = yes

[shared]
path = /sharedzone
browsable = yes
guest ok = yes
public = yes
writable = yes



Thats Your smb.conf done. now we need to run some commands

mkdir /home/netlogon
mkdir /home/profiles
mkdir /sharedzone
useradd username
smbpasswd -a username

where username is a username of your choice
and you can add as many as you want

let me know the outcome

blackfish

Bobymc 05-21-2006 12:03 PM

I was trapped with that smb.conf stuff

then I found out that it was only a simple thing that I've missed

Bobymc 05-21-2006 12:09 PM

Metalsam;

Quote:

Originally Posted by metalsam
ok, now XP can see linux, but i get:

\\Samlinux is not accessible, you may not have permission to use this network resource.

network path was not found.


INSTALL LISA DAEMON N kick it on.
__________________________________________________
disable all FIREWALL from the security section.

Life would be much easier.

Bobymc 05-21-2006 12:13 PM

Sorry I've posted too many times.
I guess I too old for this
"excuse me"
((something mad with my browser))

Regards

metalsam 05-21-2006 12:23 PM

Quote:

Originally Posted by blackfish
passwd chat = *New*Unix*Password* %n\n *ReType*new*Unix*Password* %n/n *passwd:*all*authentication*tokens*updated*sucessfully*


blackfish


whats up with all the asterixes ?

blackfish 05-21-2006 12:55 PM

I shows that there is a space between each word when you run a command

metalsam 05-21-2006 12:57 PM

still dont get it...

so i have to put

new unix passwd

as part of that file ?

blackfish 05-21-2006 02:14 PM

just copy that page ive given you, then run the useradd command to add a user onto the unix database then run the smbpasswd -a username where username is the name of the user you added with the useradd command

HTH

blackfish

metalsam 05-21-2006 02:39 PM

linux still isnt visible from XP :(

blackfish 05-21-2006 02:59 PM

you dont happen to have the firewall enabled do you?

routers 05-21-2006 09:01 PM

are u following what we teach here, ok tell me
1) u search computer from xp samlinux can u see ?
2) if u can see & u click computer samlinux did that computer asking the user pass ?
3) ok what is testparm output for this time

------------------------------
---browser mad donno why

Bobymc 05-22-2006 04:22 AM

Quote:

Originally Posted by metalsam
linux still isnt visible from XP :(

Have you turn the firewall off and turn the LISA on.

Bobymc 05-23-2006 11:12 AM

Just remembered that I've made a bit of modification on Windows system32 to make LINUX box appeear on my WIN2k desktop.

I'm not sure if it's affective or not.

metalsam 05-23-2006 03:38 PM

[Sam@localhost ~]$ testparm
Load smb config files from /etc/samba/smb.conf
Unknown parameter encountered: "unix passwd sync"
Ignoring unknown parameter "unix passwd sync"
Unknown parameter encountered: "preffered master"
Ignoring unknown parameter "preffered master"
Processing section "[homes]"
Processing section "[netlogon]"
Processing section "[profiles]"
Processing section "[shared]"
Loaded services file OK.
Server role: ROLE_DOMAIN_PDC
Press enter to see a dump of your service definitions

# Global parameters
[global]
workgroup = OFFICE1
netbios name = SAMLINUX
server string = Samba Server
passwd program = /usr/bin/passwd %u
passwd chat = *New*Unix*Password* %n\n *ReType*new*Unix*Password* %n/n *passwd:*all*authentication*tokens*updated*sucessfully*
username map = /etc/samba/smbusers
logon path = \\%L\profiles\%U
domain logons = Yes
domain master = Yes
wins support = Yes

[homes]
comment = Home Directories
read only = No
browseable = No

[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = Yes
share modes = No

[profiles]
path = /home/profiles
guest ok = Yes
browseable = No

[shared]
path = /sharedzone
read only = No
guest ok = Yes

Bobymc 05-25-2006 09:32 AM

So your FEDORA is the domain controller on your LAN??
In LAN there must be a unit that act as a DOMAIN CONTROLLER so each workstation is able to communicate.(large network usually use this)
Have you grant XP to have a share to your LINUX system?

That samba configuration changes everytime you configure your network state.

Here's my samba configuration for LINUX to XP <>XP-Fedora config;
this is just a small networking___________________________________________________
[global]

# there's no modification ,it comes from fresh install of Fedora4
cups options = raw

log file = /var/log/samba/%m.log

max log size = 50
security = share
socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192

dns proxy = no
winbind uid = 16777216-33554431
winbind gid = 16777216-33554431
restrict anonymous = no
domain master = no
preferred master = no
max protocol = NT
ldap ssl = No
server signing = Auto
[homes]
comment = Home Directories
browseable = no
read only = no
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
printable = yes

[LINUXXP]
path = /LINUXxp
guest ok = yes
read only = no
case sensitive = no
msdfs proxy = no
____________________________________________________________

I dont really care about samba CONFIG coz it's DYNAMIC.

On the winXP;
>open my net place
>view workgroup computer
______________________________________
there's only your winXP 'computer BOX'
______________________________________
__(ther's no LINUX)___

click MS WIND NETWORK it's inside 'other places'.(under network task BOX)
You'll see workgroup computer (one of them should be your LINUX box).
Also printer and Faxes from Fedora 4.

e_jhud 05-26-2006 03:40 AM

hi! try this one maybe it can help you

mkdir /share
chmod 777 /share

cd /etc/samba
vi smb.conf

add this line on your smb.conf
[share]
path = /share
read only = No
guest ok = Yes

service smb restart
===================


on winxp
start
run
tpye the ipaddress of your server
example \\192.168.1.1\share

Fond_of_Opensource 05-26-2006 04:56 AM

re
 
rerererere

cojo 05-26-2006 10:33 AM

First, which distribution & version are you using? Is iptables and selinux enable? Is your Linux box connected to windows domain or workgroup? If workgroup, is the userid & password on your windows box match the userid on Linux?

metalsam 05-27-2006 05:40 AM

using FC4.

i dont know if iptables or selinux are enabled, although i do know that se linux was insalled.

Windows and linux boxes have different usernames and different passwords.

Bobymc 05-27-2006 01:15 PM

Quote:

Originally Posted by metalsam
using FC4.

Windows and linux boxes have different usernames and different passwords.

User name doesnt really matter,as long as you grant it.
Different workgroups ID is OK if the same USER id and Password used.

You will not be able to browse LINUX folder when SE-LINUX is enabled.
You might be see the box ONLY, possibly.


All times are GMT -5. The time now is 12:56 PM.