[Samba] quota disk sizes

2005-08-23 Thread DA Forsyth
Hiya

I'm using FreeBSD 5.2.1-p14 and samba-3.0.14a_1,1 from ports.
I have quotas set on the shared disks and compiled Samba 'with 
quotas'.

Problem is that windows (98/2000/xp) displays the disk size as twice 
the set size.  The used size is also twice the actual size.

Is this a bug?  Is there some way to fix it so that Windows displays 
the correct sizes?  Please help us.

Thanks

--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] users on W2k

2005-02-16 Thread DA Forsyth
Hiya

I'm using Samba as my PDC, and this is fine for desktops since most 
of them are still Win98.
However, the bosses laptop has W2k and used to work fine under the 
Novell client.  ie there was one user on the laptop and those setting 
were used when logged into Novell and when not connected to the net.

Now, with the domain we seem to be stuck with having 2 users, one the 
local machine user, and the other the domain user.  They have 
separate settings, so any icons the boss sets up when connected to 
the network are not present when he logs in when he goes away with 
the laptop.

Is there a way to have just one user?


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Any danger in having two shares with same name?

2005-01-27 Thread DA Forsyth
On 26 Jan 2005 , [EMAIL PROTECTED] entreated about
 "[Samba] Any danger in having two shares with same":

> Hi, 
> 
> Don't ask why I'm posing this question -- actually, I WILL explain
> below -- but is there any danger in having two shares in Samba with
> the same name? 

probably.  
I *DO* know that having a share with the saem name as a user is a bad 
idea as the user will not get his home share properly but instead get 
the named share.


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] XP Home logon scripts

2004-12-09 Thread DA Forsyth
Hiya 

Yesterday I had to face the XP Home logon script monster and came up 
with something that appears to work ok.

Issue is the XP Home will not do a domain login and therefore not run 
the logon script, nor map the home drive using 'net use h: /home'

My solution is to put a batch file into 
c:\documents and settings\username
that contains
net use h: \\server\username /user:username
call \\server\netlogon\userlogonscript.bat

Then place a shortcut to that in the users 'startup' menu item.

Now, when the user logs in and the network is found (I was working on 
a laptop so the network is not always there) the home drive is 
mapped, creating an authenticated connection, thus allowing the call 
to the logon script to execute.

One can put the password into the batch, in plaintext, if that is 
considered ok in your situation.   However I believe that if the 
network password is the same as the laptop login password it will 
'just login'.  My user has different passwords and is prompted for 
the network password.  This is complicated a little by having a 
laptop username that differs from the network username.

Has anyone a better way of forcing a XP Home logon?

Hope this helps someone, and thanks to Allan whose message about 
something like this got me going from a web search, but his email 
bounced.


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: netlogin scripts

2004-12-02 Thread DA Forsyth
On 1 Dec 2004 , Michael Lueck entreated about
 "[Samba] Re: netlogin scripts":

> You do not get vars set in DOS with things like the server name, so
> alas it must be hard coded into LOGON.BAT. You could set an EnvVar at
> the top of the bat file and use it throughout the drive mappings.

well, you can use some free utils to fix that.  I am using 
'putinenv.exe' in my Win98 scripts to get what I need.
I use winset.exe (off the Win98 CD) to set master environment 
variables and 'setenv.exe' on W2K for the same job.

I have split my scripts into 2 sections.   one bit is loginall.bat 
that is run for everyone.  it is called from LGNusername.bat which 
then goes on to do user specific stuff.  I have not tried to 
integrate with the unix groups tha I am using, instead I keep a 
separate file with settings in it which is parsed by an AWK script to 
generate the login scripts.  this does mean that now and then I 
forget to correlate actual group members to the data file, but I plan 
to fix that sometime.  At the moment the server has been up (we 
switched from Novell last Thursday) nearly a week so I'm not changing 
too much at this point


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] more 'Quota/disk space display in windows'

2004-11-12 Thread DA Forsyth
See my note from yesterday about quota size displays for reference

I have just been looking at the source code.  (long time since I did 
C, so forgive me if I stuff something up royally)

in source/smbd/ntquotas.c there is code that corrects for block sizes 
other than 1024, which would work correctly IFF the *bsize is set 
correctly (should be 512 on my FreeBSD system but i don't know how to 
debug stuff on FreeBSD to see the value actually used).

ie
if ((*bsize) < 1024) {
   dfree_retval = (*dfree)/(1024/(*bsize));
} else {
   dfree_retval = ((*bsize)/1024)*(*dfree);

would do the job to report the correct number of 1024 byte blocks to 
Windows.
however, I'm seeing a report of twice the size, which indicates that 
*bsize is set to 1024.

in /source/smbd/quotas.c I find this

#if defined(__FreeBSD__) || defined(__OpenBSD__)
  *bsize = DEV_BSIZE;

great.  so the blocksize is set,  however I am failing miserably to 
find the actual definition of DEV_BSIZE, except to see it seems to 
come from STAT_ST_BLOCKSIZE, which may or may not be set to 512, the 
'configure' file is out of my league, and that is where it seems to 
be defined.

I see things like
configure.in: AC_DEFINE(STAT_ST_BLOCKSIZE,512,[The size of a block])
configure.in: AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a 
block])

but I find nowhere where DEV_BSIZE is set to anything other just a 
#define DEV_BSIZE
which as far as I can recall sets it to '1'

So, I conclude there is definitely something buggy in this code that 
is causing smbd to return the raw count of blocks to Windows clients 
when a quota is set on FreeBSD 5.2.1.  Yet, the size is correct when 
no quota is set on a share.

Please can the people who know how to fix this, fix it.


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Quota/disk space display in windows

2004-11-11 Thread DA Forsyth
Hi all

I have just noticed that Windows (98 and 2000) are not displaying the 
correct figure for disk space on any of my shares.

FreeBSD 5.2.1-R
Samba 3.0.7 from ports
quotas enabled on the ufs2 filesystems
samba compiled '--with-quotas'

ok, a user gets a quota set like this
   edquota -e /home:8672278:8774678:0:0 denis
now, those numbers are in 512 byte blocks and should represent 
4234Mb, right?  Certainly to FreeBSD they do.

but windows 'MY computer' displays 8.27Gb for the drive mapped to 
that share 

a quick bit of calculating shows that 8.27GB results if you regard 
the number
   8672278
as kilobytes
8672278 / 1204 / 1024 = 8.27

so, I take it then that Samba is unaware that the FreeBSD quotas work 
with 512 byte blocks!

I see there is a 'dfree command' and a 'get quota' command option in 
the global section.  I do not see exacly how those commands are used 
by Samba.  Are they called every time a windows client requests the 
disk status?  What is the difference between doing that and what it 
does by default?
The obvious fix to me is to allow the setting of a 'free block size' 
or 
'quota is in X units, multiply by Y to get bytes' = Y 
parameter that would fix this calculation internal to samba.

I see in the globals there is a 'block size' setting but I find the 
help for it confusing

I quote

block size (S)

This parameter controls the behavior of smbd(8) when reporting
disk free sizes. By default, this reports a disk block size of
1024 bytes. 

Changing this parameter may have some effect on the efficiency
of client writes, this is not yet confirmed. This parameter was
added to allow advanced administrators to change it (usually to
a higher value) and test the effect it has on client write
performance without re-compiling the code. As this is an
experimental option it may be removed in a future release. 

Changing this option does not change the disk free reporting
size, just the block size unit reported to the client. 

No default


I have just tried setting that to 512 and restarting samba but there 
is no change, the disk size is still wrong, and still 8.27GB.
My web searches on this show arguments about what should be shown.
Forget all that.  What the user needs to see is his allocated space, 
and his free space.  Total size of the server drive is not his 
concern, and at the moment Samba is reporting neither the real quota 
size (actually twice the set size), NOR the real disk size so this is 
clearly a BUG.

Please help Samba to be 'correct', not 'worked around'.  My server 
goes live on 26 November and I'd really like it to work correctly.




--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] getting aache to auth against the samba tdb

2004-10-20 Thread DA Forsyth
hi all

I'm new to all the multitude of authentication schemes in *nix 
systems, and therefore have a question.

My users will be using Samba tdb authentication for their normal 
login process.  On the same server we will be hosting various web 
content that should not really be freely accessible.  Apache 2 is 
installed.

Can I setup Apache to authenticate against the Samba tdb database?
if so, how?

(one day when I know enough about all this, I want to migrate to a 
single LDAP backend for all access controls - should I move to LDAP 
now?  (just been reading a bit about it and there appears to be a lot 
to learn to just get LDAP working >-: ))

thanks

--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Slow Directory listing

2004-10-05 Thread DA Forsyth
On 5 Oct 2004 , Thomas Werner entreated about
 "[Samba] Slow Directory listing":

} hi,
} 
} on samba3 a have a directory "foo" with one subfolder "blah". the
} subfolder contains a huge subtree with lot of files (11gig). if i
} click on "foo" it takes 10 or more seconds to get the one folder
} "blah". but if i use the left foldertree of explorer, there are no
} problems, it's fast. what is the explorer looking for? size
} calculations?

it might be looking for icons for each program in the listing.  
somewhere else you said there are 32000 files, is that all in one 
folder?  seems a really large number to me, I'd split it up a bit.

} it there a hint or configuration param in the smb.conf to tune up
} explorer?


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] SWAT weirdness

2004-09-23 Thread DA Forsyth
Hiya

Just noticed a weird thing in swat
I called upt he [netlogon] share and set a username in the 'write 
list' field.  committed that, restarted smbd.  tried to write to the 
share, no dice, go back to swat

and the 'write list' is GONE no entry, nothing

now I click 'advanced' and there it is

is this a big or a feature?


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Upgrade Novell 4.11 to Samba 3.0.7 wisdom needed

2004-09-22 Thread DA Forsyth
On 21 Sep 2004 , Misty Stanley-Jones entreated about
 "[Samba] Upgrade Novell 4.11 to Samba 3.0.7 wisdom":

} Has anybody done such a thing as this?  I'm looking to make this
} transition as smooth as possible.  I have the new fileserver up and

I'm busy replacing a Netware 3.12 box with FreeBSD 5.2.1 and 
Samba 3.0.7

} running, and I'm using rsync to keep the Novell data current on the

3.12 won't do fancy stuff like that, and when I tried to use 
mount_nwfs I rather successfully locked up the BSD box completely.  
through several tries with different configs.  so I'll be 
transferring data via a PC with mappings to both systems...

} Samba server.  Any words of advice on transferring the users and groups
} and permissions over to the new server in the least painful way
} possible?  I have some idea that Novell uses LDAP so that I should be

My system needs a makeover so I'm not transferring so much as re-
engineering, so can't help you much.   I'm creating new groups to 
mirror some of the existing Novell groups, dropping some, and adding 
others.  My big hurdle at the moment is figuring a way round the 
sheer versatility I had on the Novell box
ie, have a volume named 'graf'
a folder on that is assigned to software pacakge X users
another folder is assigned to software package Y users
drive mappings to the relevant folder are done via group membership.

and I can't think of a way to do that with Samba in a way that allos 
X users to see only X, and Y users to see only Y, yet retaining a 
singel drive letter for those who are in both groups

} able do it somehow.  I don't want to screw this upgrade up, and any
} help would be appreciated.  I am hoping someone has already done it
} before and has written a Howto or something about it.

I'm thinking of putting it all down on paper when I've got it 
working don't hold your breath, I suspect I'll be way too busy 
for a while yet...


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] which version to install/???

2004-09-15 Thread DA Forsyth
On 14 Sep 2004 , DA Forsyth entreated about
 "[Samba] which version to install/???":

} I'm running FreeBSD 5.2.1 and have the options in the ports tree of
} 2.2.11 and 3.0.6

and now 3.0.7

thanks Andrew and Craig, 3.x it will be


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] which version to install/???

2004-09-14 Thread DA Forsyth
Hello all

now that I have finally got CyrusSASL to authenticate

next up is installing Samba

I'm running FreeBSD 5.2.1 and have the options in the ports tree of
2.2.11 
and
3.0.6

In my test server intall I used 2.2.8 with success, and it is still 
running at home on a P166 as a PDC

but here at work it must work for mostly Win98SE machines, plus a 
couple of Win2000 and XP laptops.  And in the future we'll have more 
W2k and XP of course.  22 seats this month, more in the future.
I will be using disk quotas if that makes any difference, and may use 
recycle bins.

I'm seeing a lot of comment here on problems with the 3 series Samba 
so I'm wondering if I should use it or wait for the 3.1 series (-:

Thanks for all advice


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Printing an extra blank page all the time.

2004-09-08 Thread DA Forsyth
On 7 Sep 2004 , Craig Hammond entreated about
 "[Samba] Printing an extra blank page all the time":

} Hi,
} I'm trying out using samba as a print server for the first time, and it
} works ok, but I have this problem where everytime I print anything, a
} additional blank page comes out of the printer at the end of what was
} just printed. 

yup, same here, 3 print servers and they all do it and I was just 
asking myself the question when i found your query, so I did a web 
search

} It's an old HP Laserjet 4 connected to the parallel port of the samba
} server. 

I've got a IIp, and 4000/4100/2200, and they'll all do it.

} /etc/printcap
} lp|HP4|HP Laserjet 4:\
} :sh:lp=/dev/lpt0:sd=/var/spool/output:lf=/var/log/lpd-errs:

add to that 
ff=:

This tell LPD that the FormFeed string is null.  It 'always' sends a 
formfeed after a job, but if the formfeed is null, the printer won't 
feed.  So it is in effect a LPD/BSD printing 'feature'

I found this answer at
http://www.vttoth.com/sambaff.htm
and have just tested it and it works just fine now.
 
} smb.conf

not a smb problem...


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


Re: [Samba] encrypted passwords and /etc/passwd

2004-09-01 Thread DA Forsyth
On 31 Aug 2004 , Karel Kulhavy entreated about
 "[Samba] encrypted passwords and /etc/passwd":

} Isn't it possible to tell Samba server that on the way between a
} client and the server, the passwords sould be encrypted, and after
} decryption, they will be checked against /etc/passwd and not
} smbpasswd, tdb or whatever backend?

passwords are never decrypted since they use a one way hash function. 
in other words, the CANNOT be decrypted, for good security reasons.
when a server stores your password, it stores the encrypted version, 
and can only check an encrypted password against that.

Windows and Unix use different password encryption

therefore, in order to use the Unix encrypted hash in the 
/etc/passwd, the unix box needs to receive the plain text password 
from Windows so it can encrypt it itself.  Windows encrypted 
passwords are stored in smbpasswd and are incompatible with the 
/etc/passwd format


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] logging in to PDC with Win98

2004-07-20 Thread DA Forsyth
Hiya

I've got FreeBSD and Samba 2.2 running quite nicely on a server I ma 
using for web page development.  This is on a 3 PC network at home 
using fixed IP addresses 192.168.0.x etc.

However, last night I tried to make it into a PDC following the PDC 
Howto document.  all seemed well till I tried to login to it >-:

The netbios name is 'micah'
the server name was 'micah.ru.ac.za' which is the full domain of the 
network I installed it on here at work.

I set my Win98SE machine to ;login to domain; and told it the domain 
name was 'micah'
I got an instant dialog saying ;incorrect parameter; and it will not 
login
I then tried '\\micah' but it also will not work.

I then added '.ru.ac.za' to the domain name
I then got a delay followed by a long message saying in essense
'I could not find a domain to authorize against, so some of the 
network won't work'
and then the login proceeds, I do not get a home directory, but a 
preexisting drive mapping works fine, and no sign of the login script 
running at all (I created a simple batch file that just annouces 
itself, and I did make it executable)

I then messed around with the server name, making is just 'micah', or 
'micha.home'.  no change in the above results.
I checked, and rechecked, the lmhosts and hosts files on my Win98 
box, all ok there, and of course the server is browsable after the 
failed login.

The server is not running DNS or anything else remotely fancy.  It 
just exists as a web server for developing new PHP code, and I use 
Samba to make it easy to edit the web files.

So what is it that I am missing?
(note I have NEVER logged into any kind of MS domain server, ever.  
We have Novell at the office)


--
   DA Fo rsythNetwork Supervisor
Principal Technical Officer  -- Institute for Water Research
http://www.ru.ac.za/institutes/iwr/



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba