Dynamic symlink?

2005-10-10 Thread Brian Candler
Are there any clever tricks you can do such that a filesystem access to /tmp
is transparently redirected to /home/user/tmp ?

(Reason: Web server cluster. Many scripts expect to be able to store session
data in /tmp. Don't want to have a free-for-all NFS mount for /tmp)

Something which looks like a symlink with a dynamic target depending on the
uid of the person who reads it is the sort of thing I'm looking for.

Thanks,

Brian.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Dynamic symlink?

2005-10-10 Thread Brian Candler
On Mon, Oct 10, 2005 at 01:39:58PM -0500, Dan Nelson wrote:
  Something which looks like a symlink with a dynamic target depending
  on the uid of the person who reads it is the sort of thing I'm
  looking for.
 
 You could probably use amd's hlfsd to do this

That's exactly what I was looking for, thank you.

 , or make sure that
 $TMPDIR is set correctly before launching the script, and force
 everyone to use $TMPDIR instead of hardcoding /tmp in their scripts.

Unfortunately, forcing people to be sensible in the design of their scripts
is not an option. Also, I'm not sure that in PHP I can do
session.save_path = $ENV['TMPDIR'];

Cheers,

Brian.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Setting mount_nfs options in /etc/fstab

2005-10-06 Thread Brian Candler
I am reading large log files via NFS, and I find that if I mount them with
mount_nfs -a 4 then performance is improved.

My question is: is there any way to set the option '-a 4' in /etc/fstab? Or
am I forced to mount the filesystems the manual way in /etc/rc.local?

mount_nfs supports a number of options via -o, many of which it describes as
historic and deprecated, but they don't include something to set
readahead as far as I can see.

Thanks,

Brian.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Setting mount_nfs options in /etc/fstab

2005-10-06 Thread Brian Candler
On Thu, Oct 06, 2005 at 10:10:14AM -0500, Doug Poland wrote:
 Here's an fstab entry of mine for an nfs mount.
 
 fs:/data  /data   nfs -3,-R=3,-b,-i,-s,-r=32768,-w=32768,rw   
 0   0
 
 Your options and milage may vary...

That works for me, thank you. Perhaps the fstab(5) page could be clearer
then. It says:

 The fourth field, (fs_mntops), describes the mount options associated
 with the file system.  It is formatted as a comma separated list of
 options.  It contains at least the type of mount (see fs_type below) plus
 any additional options appropriate to the file system type.  See the
 options flag (-o) in the mount(8) page and the file system specific page,
 such as mount_nfs(8), for additional options that may be specified.

and also later:

 struct fstab {
 char*fs_spec;   /* block special device name */
 char*fs_file;   /* file system path prefix */
 char*fs_vfstype;/* File system type, ufs, nfs */
 char*fs_mntops; /* Mount options ala -o */ 
 char*fs_type;   /* FSTAB_* from fs_mntops */
 int fs_freq;/* dump frequency, in days */
 int fs_passno;  /* pass number on parallel fsck */
 };

When I read this, the implication to me was that only options which you
could pass using -o to mount or mount_nfs were permitted.

Cheers,

Brian.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mysql user did not authenticate by courier-imap

2005-06-29 Thread Brian Candler
On Wednesday 29 June 2005 14:12, Muhammad Kashif Yaqoob wrote:
  I am working on postfix Mailserver at freebsd.and install the courier Imap
 (courier-imap-4.0.2,1) and courier-authlib-0.55 in the system.and also
 Configuration the setting of courier-imap with mysql.When i authenticate
 the mysql pop user  with courier-imap.

I saw your question the first time. I answered it. Simply reposting your query 
(three times in succession) does *not* make me inclined to help you any more.

However, I will repeat again what you need to know:

1. Make sure you are running courier-imap-4.x with courier-authlib-0.5x. If 
you are not, then upgrade. If you built from ports, then upgrade your ports 
collection first if you need to. Follow the instructions in the FreeBSD 
handbook to do that.

2. Next, follow the instructions for debugging courier authentication here:
http://www.courier-mta.org/authlib/README.authdebug.html
Make sure you implement the part which tells you to make sure you are logging 
syslog messages at 'debug' level. Under FreeBSD these messages usually end up 
in /var/log/debug.log

3. You will get detailled information in those logs showing exactly how the 
mysql connection is made, the query sent, and the response returned.

4. When you have all of that, post here again. Until then, please ask someone 
else for help (or pay a consultant to help you)

Brian.

P.S. There is also good advice at 
http://www.catb.org/~esr/faqs/smart-questions.html
If the answer you got before was in any way incomplete or not understandable, 
then say what you tried, what was missing, or what you didn't understand. If 
you just blindly repost, you can expect a blunt rebuttal.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mysql user did not authenticate by courier-imap

2005-06-29 Thread Brian Candler
On Wednesday 29 June 2005 14:12, Muhammad Kashif Yaqoob wrote:
  I am working on postfix Mailserver at freebsd.and install the courier Imap
 (courier-imap-4.0.2,1) and courier-authlib-0.55 in the system.
...
 authdaemonrc

 =

 authmodulelist=authmysql

 daemons=5

 version=


 

courier-authlib has a DEBUG_LOGIN setting in that file - but you haven't shown 
it. This implies you're looking in an old authdaemonrc.

Try completely uninstalling courier-authlib/courier-imap, deleting any old 
config files which are lying around, and then reinstalling.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: courier-imap authenticate mysqk user

2005-06-24 Thread Brian Candler
On Friday 24 June 2005 14:42, Muhammad Kashif Yaqoob wrote:
  I am working on postfix Mailserver at freebsd.and install the courier Imap
 and courier-authlib-mysql .and also Configuration the setting of
 courier-imap with mysql.When i authenticate the mysql pop user  with
 courier-imap.Following error message occour.

 Part of my maillog:

 Jun 24 22:44:44 post-4 authdaemond.mysql: modules=authmysql, daemons=5
 Jun 24 22:48:20 post-4 authdaemond.mysql: modules=authmysql, daemons=5
 Jun 24 22:48:43 post-4 pop3d: LOGIN FAILED, ip=[::1]
 Jun 24 22:58:21 post-4 pop3d: LOGIN FAILED, ip=[::1]

You don't say what version of courier-imap you are using, but from those log 
messages I think it is 3.x or older. You should install 4.x with 
courier-authlib; it gives much better debugging.

Full details of how to debug authentication problems with courier-authilb are 
in http://www.courier-mta.org/authlib/README.authdebug.html

Turning on debugging will show you exactly what SQL queries are being sent to 
the database, for example.

Brian.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [exim] TCP Header Rewrite

2005-05-05 Thread Brian Candler
On Thu, May 05, 2005 at 01:39:00PM +0200, John Oxley wrote:
  local
^
I
I
 client -- smarthost -- router -- shaper -- international
 
 The smarthost is a FreeBSD-5.3-STABLE system running exim 4.50 built from the
 exim-mysql port.  The router is transparent.
 
 This setup works well as is, but the problem is that the shaper thinks that 
 the
 traffic has come from the smarthost itself, and not the client, and thus the
 client isn't being bandwidth limited for international mail.

Yep. That's the thing about having a smarthost; your mail is aggregated with
everyone else's.

The first solution I can see, which does not scale, is to give everyone
their own smarthost (or virtual smarthost), with its own IP address.

You can do this with exim:

1. The trivial way is to set up N exim daemons, all bound to N different
interfaces, and with slightly different configs (ACLs which permit only
client X to relay through virtual smarthost X)

2. Being a bit cleverer, you can have a single exim configuration which
listens on multiple IP addresses (which will happen anyway if your box has
multiple interfaces), and then chooses which interface to bind to for
outgoing connections based on which IP address the message arrived on.

It sounds like (2) is closest to what you propose. You might even get away
with something as simple as this:

[under 'begin transports']

remote_smtp:
  driver = smtp
  interface = $interface_address

Now, if you set up an Exim box with (say) 10 different IP aliases, try
connecting to each in turn and relaying a message through it. If my guess is
right, the relayed message will originate from the same interface as it came
in on. If so, all you need to do is to modify your ACL so that each client
can only relay via their own virtual smarthost, e.g. by making
relay_from_hosts a lookup based on $interface_address (if each client comes
from a different IP range). Alternatively, you could make them all use SMTP
AUTH, and then lookup their authenticated identity to find the interface
address for outgoing SMTP connections.

Things may break down if Exim has multiple messages queued to the same
remote host, and you don't want messages sent by one client to be relayed
down a TCP/IP connection belonging to another client (at their expense). So
you may need to set connection_max_messages = 1 to prevent that.

Now, you're still stuck with needing N IP addresses for N customers. In
theory you might be able to improve on that by using different ranges of
source ports for different customers; e.g. customer 1's mail can originate
from ports 1024-1039; customer 2's mail can originate from posts 1040-1055;
customer 3 is ports 1056-1081; and so on.

That would be really messy to implement, since Exim (sensibly) doesn't allow
you to choose which port to bind to for an outgoing connection, and it still
doesn't scale (allowing 16 ports per customer you'd be limited to about 4000
customers)

The fundamental problem is how your shaper can associate a particular
traffic stream with a particular customer. If the shaper had the ability to
act as a SOCKS proxy, then perhaps Exim could use it to open outbound
connections, and the shaper could use the proxy authenticated ID to
associate the stream with the customer. I don't know of any such shaper, but
maybe they do exist. You'd still need to modify Exim to be able to use a
SOCKS proxy for outbound SMTP connections (which is perhaps a useful feature
to have in the SMTP driver, although not that useful if nobody has asked for
it before :-)

HTH,

Brian.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nVidia chipset - ethernet support?

2004-03-31 Thread Brian Candler
On Mon, Mar 29, 2004 at 02:53:38AM +0200, Harald Schmalzbauer wrote:
  Incidentally, my machine has two VGA ports. If anyone knows how to get both
  of those working together with XFree86, that would be appreciated too!
 
 You need the proprietary nvidia driver (from ports/x11/nvidia-driver). See the 
 docs in the working directory of the port for more info, if you need a sample 
 dual-layout I can send you mine.

I've got that going too now, thanks; once using TwinView, and again using
two X screens (in the latter case, KDE displays a separate toolbar on the
bottom of each one, which is cool).

Actually what I really wanted was to bind a second keyboard and mouse (USB)
to the second screen, so I'd have two completely independent X sessions,
with separate xdm logins. But I don't think I'll be able to get that to work
without having a separate card and a separate X server process; X doesn't
seem to allow multiple 'ServerLayout' sections to be active concurrently.

But my machine does have one spare AGP slot as well as one PCI slot, so I
might go down that route.

Best wishes,

Brian.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nVidia chipset - ethernet support?

2004-03-29 Thread Brian Candler
On Sun, Mar 28, 2004 at 04:16:53PM -0800, peter lageotakes wrote:
 I dont have experience working with this particular
 driver.  However, I did some searching on:
 www.freebsd.org/ports and I did locate the source
 code.  It can be downloaded off of freebsd.org:
 http://www.freebsd.org/cgi/ports.cgi?query=nvnetstype=all
 
 I noticed that there are different version numbers on
 the .tgz files, which appears to be a later release.. 
 However the site that you have listed
 www.onthenet.com.au) is listed as a location for the
 source.  
 
 PS: have you tried doing a locate on nvnet?

Yep: also

# echo /usr/ports/net/*nv*
/usr/ports/net/konverse /usr/ports/net/openverse /usr/ports/net/openvmps
# tar -tzf /cdrom/ports/ports.tgz | grep nvnet
# 

So for some reason it's not in the ports tree for 5.2.1

Regards,

Brian.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: nVidia chipset - ethernet support?

2004-03-29 Thread Brian Candler
On Mon, Mar 29, 2004 at 02:53:38AM +0200, Harald Schmalzbauer wrote:
 I tried the nvnet driver from the ports some days ago with a nforce2 and it 
 worked flawlessly.

Many thanks, I have it working now. Summary for anyone else who needs to do
this:

- fetch nvnet.tar.gz from
http://cvsweb.FreeBSD.org/ports/net/nvnet/nvnet.tar.gz?tarball=1

- unpack nvnet.tar.gz under /usr/ports/net

- since the network interface is not working at this moment, I had to fetch
the other files into /usr/ports/distfiles/ manually:
http://www.onthenet.com.au/~q/nvnet/nvnet-src-20040108.tar.gz
ftp://download.nvidia.com/XFree86/nforce/1.0-0261/NVIDIA_nforce-1.0-0261.tar.gz
[this is a Microsoft FTP server, remember to set binary mode!]

- cd /usr/ports/net/nvnet

- in Makefile, change
 NVNETVERSION=   20040108
  but leave NVVERSION=0261 (version 0269 is for AMD64 processors I am told)

- append to 'distinfo'
MD5 (nvnet-src-20040108.tar.gz) = 96730b413cb1f949f6cdadb6797740c2
SIZE (nvnet-src-20040108.tar.gz) = 17547

- make install

- append to /boot/loader.conf
if_nv_load=YES

Regards,

Brian.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


nVidia chipset - ethernet support?

2004-03-28 Thread Brian Candler
I have installed FreeBSD-5.2.1 on my brand new Soltek EQ3702A machine, which
has an nVidia chipset. I have got most of the on-board hardware to work:
  kldload snd_ich  -- pcm
  kldload firewire \ to mount my ipod
  kldload sbp  /

but I don't seem to be able to get ethernet to work. A google shows that
this is a long-standing issue:

http://lists.freebsd.org/pipermail/freebsd-questions/2003-August/016739.html
http://lists.freebsd.org/pipermail/freebsd-net/2003-July/001016.html

but I don't see anything else posted since August last year.

I did come across this driver against FreeBSD-5.1:
http://www.onthenet.com.au/~q/nvnet/   [1]

Anyone have any experience with it? It claims to be in the official ports
tree under net/nvnet, but I don't find it there (not in the 5.2.1-RELEASE
ports tree anyway). Well actually, I did find something here:
http://www.freebsd.org/cgi/pds.cgi?ports/net/nvnet   [2]

Unfortunately the driver page [1] doesn't link to the Linux driver it
requires, and the port at [2] links to a different version of nvnet than the
one at [1].

If anyone has this working with FreeBSD-5.2.1 (and either an up-to-date
port, or a pointer to the correct Linux module required), that would save me
some random hacking.

Incidentally, my machine has two VGA ports. If anyone knows how to get both
of those working together with XFree86, that would be appreciated too!

Cheers,

Brian.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: USB keyboard rollover problem [PATCHED]

2004-02-21 Thread Brian Candler
On Fri, Feb 20, 2004 at 03:56:02PM +, Brian Candler wrote:
 Here's what I get if I compile in and turn on USB keyboard debugging in
 the kernel, and type asd as
 a down, s down, a up, d down: this generates asds on screen.

I have just spent a couple of hours debugging and documenting the problem
and submitted a kernel patch:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/63171

But dammit, I've just discovered that the fix was posted already on
27th September last year:
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/57273

To prevent further time wasting, can someone please commit one of these?
(Both fix the rollover problem, but kern/63171 also fixes a pointer type
mismatch problem)

Thanks,

Brian Candler.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


USB keyboard rollover problem

2004-02-20 Thread Brian Candler
Since my old Vaio laptop has a broken key, I decided to get a USB keyboard
for it. I have been using a USB mouse successfully for a while.

However I have a problem with keyboard rollover, meaning I get duplicate
characters when typing quickly. Example:

  Depress a  -- a
  Depress b  -- b
  Release a
  Depress c  -- cb

So typing questions quickly tends to say questioins. I am having to type
this very gingerly and still doing lots of backspaces!

My question is: is this something I can tweak in FreeBSD? (I can't see
anything under kbdcontrol). Is it a bug in FreeBSD? Or have I just bought a
useless keyboard?

System information:
- Sony Vaio PCG-C1F
- FreeBSD 4.8-RELEASE
- Packard Bell PB-KB400 USB Night glow keyboard (I didn't want the glow
  but it was the only small USB keyboard in stock locally :-)

Feb 20 13:38:14 vaio /kernel: ukbd0:   USB Multimedia Keyboard , rev 1.10/0.01, addr 
2, iclass 3/1
Feb 20 13:38:14 vaio /kernel: kbd1 at ukbd0
Feb 20 13:38:14 vaio /kernel: uhid0:   USB Multimedia Keyboard , rev 1.10/0.01, addr 
2, iclass 3/1

- After inserting the keyboard, I enable it using

#!/bin/sh
kbdcontrol -k /dev/kbd1 /dev/console
kbdcontrol -l /usr/share/syscons/keymaps/uk.cp850.kbd

(it would be nice if both keyboards would work together, as my external
mouse and internal pointing device do, but I can live with that)

Any helpl much apprerciataed, plelase copy me direcetlyl on any repely!

Regarads,

Brian Candlere.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: USB keyboard rollover problem

2004-02-20 Thread Brian Candler
On Fri, Feb 20, 2004 at 01:59:03PM +, Brian Candler wrote:
 However I have a problem with keyboard rollover, meaning I get duplicate
 characters when typing quickly. Example:

Additional information: if I reboot my laptop into Windows 98 (forgot I had
that partition!), the keyboard works properly with no rollover problem. So
it looks suspiciously like FreeBSD is not initialising it properly or
communicating correctly.

W98 installed three default drivers (I think USB.INF, USBHID.INF and
something else) when I first inserted it. There was no special driver disk
which came with the keyboard. So I think it must be doing the default
thing for a USB keyboard.

Regards,

Brian.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: USB keyboard rollover problem

2004-02-20 Thread Brian Candler
On Fri, Feb 20, 2004 at 02:49:43PM +, Brian Candler wrote:
 Additional information: if I reboot my laptop into Windows 98 (forgot I had
 that partition!), the keyboard works properly with no rollover problem. So
 it looks suspiciously like FreeBSD is not initialising it properly or
 communicating correctly.

Here's what I get if I compile in and turn on USB keyboard debugging in
the kernel, and type asd as
a down, s down, a up, d down: this generates asds on screen.

Feb 20 15:21:21 vaio /kernel: 0x428 (1064) released
Feb 20 15:21:21 vaio /kernel: 
Feb 20 15:21:26 vaio /kernel: 0x4 (4) pressed  a
Feb 20 15:21:26 vaio /kernel: 4 
Feb 20 15:21:26 vaio /kernel: 0x16 (22) presseds
Feb 20 15:21:26 vaio /kernel: 4 22 
Feb 20 15:21:26 vaio /kernel: 0x404 (1028) released
Feb 20 15:21:26 vaio /kernel: 0x416 (1046) released
Feb 20 15:21:26 vaio /kernel: 22 
Feb 20 15:21:26 vaio /kernel: 0x7 (7) pressed  d
Feb 20 15:21:26 vaio /kernel: 0x16 (22) presseds
Feb 20 15:21:26 vaio /kernel: 7 22 
Feb 20 15:21:26 vaio /kernel: 0x416 (1046) released
Feb 20 15:21:26 vaio /kernel: 7 
Feb 20 15:21:27 vaio /kernel: 0x407 (1031) released
Feb 20 15:21:27 vaio /kernel: 

I replaced ukbd.c with the latest (1.46) from cvsweb and rebuilt; no
difference. I also set the debug level to 10 instead of 1, and all I got
were a stream of extra messages of the form

Feb 20 15:48:13 vaio /kernel: ukbd_intr: status=0

There doesn't seem to be a USB mailing list, so if nobody has any better
suggestions I suppose I'd better file a bug report...

Cheers,

Brian.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]