Possible Samba config problem

The other day I tried to setup two samba shares on a openSUSE 11.1 machine
to share a single directory in the /home partition and the printer connected
to the machine with a single windows client, my smb.conf will be posted at
the end of this message. The shares work, the only problem is something
with Samba filled up my root partition, before setting up Samba my root
partition was only 1.3% full and now it is completely full and I can’t even
log into KDE 4.2 on it KDM comes up and when I login the screen goes back
for a couple of seconds and then KDM comes back up. I tried deleting
everything in /tmp and /var/tmp as root but that didn’t make a difference.
Originally I had printer driver share active but after, hopefully, disabling
it and deleting the directory where it was putting the drivers my root
partition is still full. Now I’m a complete Samba n00b and I consider the
fact that I got the shares somewhat working on the first try a somewhat
victory.

,---- ]

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

Date: 2008-11-08

[global]
workgroup = CSCC
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s
/bin/false %m$
domain logons = No
domain master = No
netbios name = CISServer
security = user, repairsrecep
usershare max shares = 100
passdb backend = smbpasswd
wins support = No
ldap suffix =
wins server =

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = yes
#[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

write list = @ntadmin root

force group = ntadmin

create mask = 0664

directory mask = 0775

Share disabled by YaST

[netlogon]

[windows free software]
comment = Software for CSCC Repair shop
inherit acls = Yes
path = /home/cis2101/WindowsFreeSoftware/
read only = Yes
browseable = yes
public = yes
force user = nobody
force group = nogroup

`----

What is the actual size of the root partition? Post the results of a “df -h” command (use CTRL-ALT-F1 to get a terminal, if you need to). It may be something else (one of the Samba gurus here would speak better to that) but that’s a start.

On Fri February 6 2009 05:42 am, Adam Jimerson wrote:

> The other day I tried to setup two samba shares on a openSUSE 11.1 machine
> to share a single directory in the /home partition and the printer connected
> to the machine with a single windows client, my smb.conf will be posted at
> the end of this message. The shares work, the only problem is something
> with Samba filled up my root partition, before setting up Samba my root
> partition was only 1.3% full and now it is completely full and I can’t even
> log into KDE 4.2 on it KDM comes up and when I login the screen goes back
> for a couple of seconds and then KDM comes back up. I tried deleting
> everything in /tmp and /var/tmp as root but that didn’t make a difference.
> Originally I had printer driver share active but after, hopefully, disabling
> it and deleting the directory where it was putting the drivers my root
> partition is still full. Now I’m a complete Samba n00b and I consider the
> fact that I got the shares somewhat working on the first try a somewhat
> victory.
>
> ,---- ]
> # smb.conf is the main Samba configuration file. You find a full commented
> # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
> # samba-doc package is installed.
> # Date: 2008-11-08
> [global]
> workgroup = CSCC
> printing = cups
> printcap name = cups
> printcap cache time = 750
> cups options = raw
> map to guest = Bad User
> logon path = \%L\profiles.msprofile
> logon home = \%L%U.9xprofile
> logon drive = P:
> usershare allow guests = Yes
> add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s
> /bin/false %m$
> domain logons = No
> domain master = No
> netbios name = CISServer
> security = user, repairsrecep
> usershare max shares = 100
> passdb backend = smbpasswd
> wins support = No
> ldap suffix =
> wins server =
>
> [printers]
> comment = All Printers
> path = /var/tmp
> printable = Yes
> create mask = 0600
> browseable = yes
> #[print$]
> #comment = Printer Drivers
> #path = /var/lib/samba/drivers
> #write list = @ntadmin root
> #force group = ntadmin
> #create mask = 0664
> #directory mask = 0775
>
> ## Share disabled by YaST
> # [netlogon]
>
> [windows free software]
> comment = Software for CSCC Repair shop
> inherit acls = Yes
> path = /home/cis2101/WindowsFreeSoftware/
> read only = Yes
> browseable = yes
> public = yes
> force user = nobody
> force group = nogroup
>
> `----
Adam;
I think you should be looking at something other than Samba for filling your
root directory. The directories directly impacted by Samba would be:
/etc/samba; var/lib/samba and var/log/samba. Check to see if any of these
seem to be excessive in size. With regards to your /etc/samba/smb.conf you
should change:
security = user, repairsrecep
to
security = user

Actually you can just delete that since Samba defaults to: security = user.
There is no option “repairsrecep” that I am aware of. See the write up for
the parameter “security” in:


man smb.conf

A number of the parameters in your conf are not needed for a mere workgroup,
but likely do no harm. The extra option “repairsrecep” could be making your
log files in /var/log/samba fill up.

You might want to look a the sample smb.conf file located here:
http://www.swerdna.net.au/linux.html
You will find a nice clean & lean example to model your smb.conf on.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

smpoole7 wrote:

>
> What is the actual size of the root partition? Post the results of a “df
> -h” command (use CTRL-ALT-F1 to get a terminal, if you need to). It may
> be something else (one of the Samba gurus here would speak better to
> that) but that’s a start.
>
>

The size according to df is 34.6 GB IIRC, all I know is that I was barely
using any of that drive before I setup Samba and now I have no space, seems
kind of odd to me.

PV wrote:

> Adam;
> I think you should be looking at something other than Samba for filling
> your
> root directory. The directories directly impacted by Samba would be:
> /etc/samba; var/lib/samba and var/log/samba. Check to see if any of
> these
> seem to be excessive in size. With regards to your /etc/samba/smb.conf
> you should change:
> security = user, repairsrecep
> to
> security = user
>

When I was setting this up the site I found from Google said that I should
put the names of the machines that will connect to the server there. If
just security = user will work there then great.

> Actually you can just delete that since Samba defaults to: security =
> user.
> There is no option “repairsrecep” that I am aware of. See the write up
> for the parameter “security” in:
>


> man smb.conf
> 

> A number of the parameters in your conf are not needed for a mere
> workgroup,
> but likely do no harm. The extra option “repairsrecep” could be making
> your log files in /var/log/samba fill up.
>

During the time between when I got Samba working and I noticed that my root
partition went from 1.3% full to completely full, and during this time I had
this share running

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

When I noticed there was a problem I figured this would have been the
problem so I stopped Samba, commented out this share, deleted
/var/lib/samba/drivers, start Samba back up but that didn’t solve my
problem.

> You might want to look a the sample smb.conf file located here:
> http://www.swerdna.net.au/linux.html
> You will find a nice clean & lean example to model your smb.conf on.

On Fri February 6 2009 10:10 pm, Adam Jimerson wrote:

> PV wrote:
>
>> Adam;
<snip by PV>
>
> When I was setting this up the site I found from Google said that I should
> put the names of the machines that will connect to the server there. If
> just security = user will work there then great.
Just use “security = user” or delete the “security” parameter all together.
Remember that any idiot can write something that gets indexed on GOOGLE.

<snip by PV>
>>
>
> During the time between when I got Samba working and I noticed that my root
> partition went from 1.3% full to completely full, and during this time I had
> this share running
>
> [print$]
> comment = Printer Drivers
> path = /var/lib/samba/drivers
> write list = @ntadmin root
> force group = ntadmin
> create mask = 0664
> directory mask = 0775
>
> When I noticed there was a problem I figured this would have been the
> problem so I stopped Samba, commented out this share, deleted
> /var/lib/samba/drivers, start Samba back up but that didn’t solve my
> problem.
<snip by PV>

Samba will not place anything in /var/lib/samba/drivers, except a few defaults
when it is installed. When you are sharing a printer it is possible to add
the Windows print drivers to /var/lib/samba/drivers/W32X86/3/ so that Windows
clients can download the drivers they need (i.e. one-click install). Samba
does not add these automatically, it takes a little work by the administrator
to install them. Without this directory and subdirectories, it is much
harder to install a printer to a Windows client ( Well not that hard, you
just have to install the drivers locally. But with a large network this can
create a lot of busy work; with one or two clients it is probably easer to
just install locally.)

Have you checked the size of /var/log/samba and the various files within it?
The whole directory should be quite small for a new install (< 1MB) If this
is large, look at what the logs are telling you. Another thing to check is
the size or /var/lib/samba. This should be < 50MB. If not check the size of
the individual files.

I seriously doubt that Samba has caused the problem you describe, it may be
just a coincidence that this popped up when you installed Samba. Have you
tried to determine which directories are taking up so much space?


P. V.
“We’re all in this together, I’m pulling for you.” Red Green

PV wrote:

> Just use “security = user” or delete the “security” parameter all
together.
> Remember that any idiot can write something that gets indexed on GOOGLE.

I am aware of that, and the fact that any idiot, with an account on the wiki
can edit the page that I found from Google
(http://en.opensuse.org/SDB:Samba_file_sharing_in_openSUSE_-
_breaking_through_the_window#On_duty)

>
> Samba will not place anything in /var/lib/samba/drivers, except a few
> defaults
> when it is installed. When you are sharing a printer it is possible to
> add the Windows print drivers to /var/lib/samba/drivers/W32X86/3/ so that
> Windows
> clients can download the drivers they need (i.e. one-click install).
> Samba does not add these automatically, it takes a little work by the
> administrator
> to install them. Without this directory and subdirectories, it is much
> harder to install a printer to a Windows client ( Well not that hard, you
> just have to install the drivers locally. But with a large network this
> can create a lot of busy work; with one or two clients it is probably
> easer to just install locally.)
>

Only one machine is going to use this share and I setup the printer driver
by hand so this share didn’t even matter then.

> Have you checked the size of /var/log/samba and the various files within
> it?
> The whole directory should be quite small for a new install (< 1MB) If
> this
> is large, look at what the logs are telling you. Another thing to check
> is
> the size or /var/lib/samba. This should be < 50MB. If not check the size
> of the individual files.
>

I haven’t been able to checked Sambas logs, and I won’t be able to until
Monday to see if there is anything there.

> I seriously doubt that Samba has caused the problem you describe, it may
> be just a coincidence that this popped up when you installed Samba. Have
> you tried to determine which directories are taking up so much space?
>

If it is not Samba then great, what is making me thing that this is Samba is
the fact that this didn’t happen until I configured Samba a couple of days
ago, I installed the Samba packages when I was installing openSUSE 11.1 on
the system a couple of months ago. I won’t be able to dig through the
system to see what is taking up ~34GB until Monday.

On Sat February 7 2009 10:13 am, Adam Jimerson wrote:

> PV wrote:
>
>> Just use “security = user” or delete the “security” parameter all
> together.
>> Remember that any idiot can write something that gets indexed on GOOGLE.
>
> I am aware of that, and the fact that any idiot, with an account on the wiki
> can edit the page that I found from Google
> (http://en.opensuse.org/SDB:Samba_file_sharing_in_openSUSE_-
> _breaking_through_the_window#On_duty)
>
<snip>
“man smb.conf” is the authoritative reference for parameter usage in Samba.
Please post back what you find on Monday. Good luck

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

I can’t edit smb.conf do to the full hard drive but here is what ls -l has to say about the logs. I don’t know what the exact sizes should be “quite small” doesn’t really help so I’m hoping someone here will be able tell if they are to big or the right size.

/var/log/samba = 4096
/var/log/samba/cores = 4096
/var/log/samba/cores/nmbd = empty
/var/log/samba/cores/smbd = empty
/var/log/samba/log.nmbd = 12047
/var/log/samba/log.smbd = 305069
/var/lib/samba = 4096
/var/lib/samba/account_policy.tdb = 16384
/var/lib/samba/brlock.tdb = 40200
/var/lib/samba/browse.dat = 151
/var/lib/samba/connections.tdb = 90112
/var/lib/samba/gencache.tdb = 696
/var/lib/samba/group_mapping.ldb = 77824
/var/lib/samba/locking.tdb = 40200
/var/lib/samba/messages.tdb = 696
/var/lib/samba/notify.tdb = 696
/var/lib/samba/ntdrivers.tdb = 8192
/var/lib/samba/ntforms.tdb = 696
/var/lib/samba/ntprinters.tdb = 20480
/var/lib/samba/registry.tdb = 36864
/var/lib/samba/sessionid.tdb = 696
/var/lib/samba/share_info.tdb = 16386
/var/lib/samba/netlogon

On Mon February 9 2009 10:06 am, vendion wrote:

>
> I can’t edit smb.conf do to the full hard drive but here is what ls -l
> has to say about the logs. I don’t know what the exact sizes should be
> “quite small” doesn’t really help so I’m hoping someone here will be
> able tell if they are to big or the right size.
>
> /var/log/samba = 4096
> /var/log/samba/cores = 4096
> /var/log/samba/cores/nmbd = empty
> /var/log/samba/cores/smbd = empty
> /var/log/samba/log.nmbd = 12047
> /var/log/samba/log.smbd = 305069
> /var/lib/samba = 4096
> /var/lib/samba/account_policy.tdb = 16384
> /var/lib/samba/brlock.tdb = 40200
> /var/lib/samba/browse.dat = 151
> /var/lib/samba/connections.tdb = 90112
> /var/lib/samba/gencache.tdb = 696
> /var/lib/samba/group_mapping.ldb = 77824
> /var/lib/samba/locking.tdb = 40200
> /var/lib/samba/messages.tdb = 696
> /var/lib/samba/notify.tdb = 696
> /var/lib/samba/ntdrivers.tdb = 8192
> /var/lib/samba/ntforms.tdb = 696
> /var/lib/samba/ntprinters.tdb = 20480
> /var/lib/samba/registry.tdb = 36864
> /var/lib/samba/sessionid.tdb = 696
> /var/lib/samba/share_info.tdb = 16386
> /var/lib/samba/netlogon
>
>
vendion;
These are in Bytes, so the largest file here is just over 300KB. Nothing here
would account for GBs of data. Could your share be filled with movies or
other large files? Have you checked /tmp for lots of files. If you can not
find a lot of large files on your system, maybe your file system is corrupt.
Have you run a file system check?

I’m not sure about gnome, but with konqueror (KDE 3.5) you can set the “view
mode” to “Detailed List View” and see the size of files in a more human
friendly form. I’m sure something similar works for gnome and KDE 4.X. Even
Windows can do this.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

That’s what it sounds like to me. Either that, or something other than Samba somehow got installed that just LOVES hard drive space.

To the original poster: it doesn’t sound like a Samba issue.

PV wrote:

> vendion;
> These are in Bytes, so the largest file here is just over 300KB. Nothing
> here
> would account for GBs of data. Could your share be filled with movies or
> other large files? Have you checked /tmp for lots of files.

I checked both /tmp and /var/tmp and the only thing that was in both was kde
and zypper temporary files. It wasn’t enough to full up my root partition
but I did a rm -rf on both anyway and it didn’t help as I expected. There
is no movies or any kind of personal data because the system is not for
personal use. The biggest non system file on my system would have to be the
Open Office installer with JRE, but that is on my /home partition, in the
Windows Free Software share for samba, but that partition is only 1.3% full.

> If you can
> not find a lot of large files on your system, maybe your file system is
> corrupt. Have you run a file system check?
>

I did not run a file system check on the drive because that thought didn’t
cross my mind.

> I’m not sure about gnome, but with konqueror (KDE 3.5) you can set the
> “view mode” to “Detailed List View” and see the size of files in a more
> human
> friendly form. I’m sure something similar works for gnome and KDE 4.X.
> Even Windows can do this.

This is a single boot machine, makes sense because it is acting as a server
for a non-profit computer repair shop. I can’t login to KDE or any kind of
GUI due to the space problem short of using a Live CD/DVD and mounting the
drive there, but I don’t consider this system to be that far gone.

Thanks for the help, I will look else where for the problem.

I went through and besides lib and other dependencies there was nothing that I couldn’t account for. I’m going to run a check in the root partition to see if it is bad.

Again I think you for the help in this matter