Running ubuntu 8.04 and Samba version 3.0.28a.

I'm trying to restrict the number of directories users can share with the "usershare max shares" option.

I set it to 3 but I can still share directories with 10 files in them from my windows machine (XP).

Here is smb.conf.

    wins support = yes

    netbios name = MY_GATEWAY
    server string = MY_GATEWAY
    workgroup = WORKGROUP

    passdb backend = tdbsam

    security = user
    encrypt passwords = true
    invalid users = root

    map to guest = bad user
    guest account = nobody

    interfaces = lo, eth1
    bind interfaces only = true

    syslog = 1
    syslog only = yes

    dns proxy = no

    [B]usershare max shares = 3[/B]

    path = /home/ftp/
    read only = yes
    create mask = 0640
    directory mask = 0750
    guest only = yes
    guest ok = yes

I ran testparm on my smb.conf and the syntax is correct.

I have a different problem now. I have two machines, the linux machine with samba and a windows xp machine as a client.

When I restart the windows machine and browse Workgroups I can see the linux machine and myself. I can also see all the shared folders in My Network Places.

When I execute a smbtree on the linux machine, it shows all the linux and windows shared directories. After a few minutes, it sometimes doesn't see the windows directories anymore.

Also when I do a findsmb it only lists the linux machine, not the windows machine.

I don't have a second client computer to test with, but wouldn't the second client not be able to see the windows machine because it's not listed on the server from a findsmb?

I also don't know why the directories randomly don't show up from a smbtree. I know that samba times out names after 6 days, not a few minutes.

I have file and folder sharing allowed through windows firewall.

Let me clarify the questions, they may have been confusing.

The windows machine can see and download all the shared folders from the linux machine, and the linux machine can download from the windows machine with smbclient.

However, when I issue "findsmb" the linux machine only reports itself, not the windows machine. The man pages show it printing a list of machines for the entire network. Why is findsmb not listing the windows machine?

Even though file and printer sharing is enabled in windows firewall findsmb still doesn't list the windows machine. I also tried disabling windows firewall, still nothing. I allow all traffic to my linux machine from lan interface (currently).

Secondly, smbtree doesn't always return consistent results. When I restart my windows machine and do a smbtree from the linux machine, all of the shared folders for linux and windows are listed. Then a few minutes later smbtree may only list linux shared folders. It seems inconsistent, is this normal?

smbstatus seems to work. When I'm connected to a linux shared folder smbstatus lists the connection.

I made samba a domain master and added it as a netbios server in dhcpd.conf and I'm still having the same problem.

Someone on IRC said "that depends if the windows server is advertising on netbios, and what the permissions are on the share". Well the permissions on the windows share allow it to be downloaded, I have "share this folder on the network" checked.

I also have file and printer sharing allowed through the firewall. Still not sure why it isn't showing up.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.