Re: Is their Automatic command to send a JPG file using FTP

2010-01-28 Thread Polytropon
On Wed, 27 Jan 2010 14:08:40 -0800, Dixit, Viraj 
viraj.di...@cityofpaloalto.org wrote:
 Hi,
 I am looking to see if there a command or a script In BSD Os that will
 allow me to ftp to a server automatically and get a file from another
 server. User name and passwd will be already in the script so it will
 run ftp and download a file or a JPG from that server. Like in Linux OS
 there is a command using .netrc file and you can script that file and
 will automatically do what is in the file at time interval that you
 want.  Thanks,

In FreeBSD, there's documentation on that; read man ftp and
see the -u option.

I'm often (ab)using a Makefile to upload (send) files per FTP to
a server, and I call this make install. You can put this into
a shell script (sh) and then call it, e. g.

#!/bin/sh
FTPUSER=my_account_name_on_ftp_server
FTPPASSWD=my_very_complicated_password
SERVER=ftp.where_my_stuff_is.foo.bar
UPLOAD=/path/to/files/to/upload
cd ${UPLOAD}  ftp -u ftp://${FTPUSER}:${ftppass...@${server} *

Of course, you can utilize .netrc to contain FTP access data. Then,
you just need to call pure ftp with server name, and you can
replace * with any file name(s) you want.

However, be aware that FTP doesn't encrypt passwords. You should
take into mind that using FTP with an SSH wrapper, or even
better - scp - is a more secure way to send files.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to use an older version of gcc?

2010-01-28 Thread gfot

yes i know i can call it gcc34 but the real problem is that the toolchain has
some scripts to automate the building and it uses some paths to pick up the
appropriate tools and when i run the scripts gcc42 is used. I figure out
that the path that gcc42 is located is the same as gcc34 /usr/local/bin .
But i don't know how to switch to the old gcc34 let's say for a particular
user on my system.
-- 
View this message in context: 
http://old.nabble.com/How-to-use-an-older-version-of-gcc--tp27349277p27352106.html
Sent from the freebsd-questions mailing list archive at Nabble.com.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Help booting FreeBSD with a ZFS root filesystem

2010-01-28 Thread krad
On 27 January 2010 23:18, Dan Naumov dan.nau...@gmail.com wrote:

 I didn't want a mirror though, I wanted a stripe.
 
 I still don't understand why what I'm doing isn't working.

 As far as I know, having the root pool on a stripe isn't supported.

 OpenSolaris supports having the root pool on a simple pool and a mirror
 pool.
 FreeBSD supports having the root pool on a simple pool, mirror pool
 and raidz, but afaik booting off raidz used to have issues.

 - Sincerely,
 Dan Naumov
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org



Even if a stripe did work its questionable why you need it for the os
itself. Mostly you only need to read from the os pool, so you will still
benefit from the speed of 2 drives with a mirror. If you are worried about
db writes etc, then partition up the drives and have another pool for the db
with the zpool configuration you want. Better still put it on its own
spindles.

Use tmpfs for tmp space etc and you could put swap on the striped pool as
well. Just keep the os pool as a mirror its far safer. I also set copies=2
on the root zfs fs as well just for a bit more paranoia
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: OT: finding every file not in a list

2010-01-28 Thread Chad Perrin
On Wed, Jan 27, 2010 at 02:16:12PM -0500, Aryeh M. Friedman wrote:
 I have a list of files that should be in a dir tree and want to remove 
 any files from the tree not in list (i.e. if it is on the list keep it 
 else rm it)... any quick way to do this?

You should probably use a shell command as recommended by others, but I
decided to write a Ruby script to do what you describe.  It assumes you
have a plaintext file full of to-keep filenames with each filename being
an absolute path filename (e.g., /usr/local/bin/xpdf instead of something
like xpdf with no absolute path), one such filename per line, with
nothing else in the file.  The script, which I saved as fkeep.rb, looks
like this on the inside:

#!/usr/bin/env ruby

# syntax:
#   fkeep.rb filename [path]
#
# where:
#   filename is the file containing paths for files to keep
#   [path] is an optional path to where this program should
#  start deleting files

losers= Dir[#{Dir.getwd}/**/*]
keepers   = IO.readlines ARGV.shift
startpath = ARGV.shift

if startpath
  Dir.chdir startpath
end

keepers.each {|filepath| losers.delete filepath.chomp }

losers.each do |filepath|
  unless File.directory?(filepath)
File.delete filepath
  end
end


I've done some cursory testing with this, and it seems to work just fine,
but use it only at your own risk.

Note that this will not delete directories, because it felt like too much
work to make it *safely* delete directories.  You will have to delete any
empty directories yourself if you use this script as written.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgp5TPqUHsHHX.pgp
Description: PGP signature


Re: OT: finding every file not in a list

2010-01-28 Thread Chad Perrin
On Thu, Jan 28, 2010 at 03:13:51AM -0700, Chad Perrin wrote:
 
 losers= Dir[#{Dir.getwd}/**/*]
 keepers   = IO.readlines ARGV.shift
 startpath = ARGV.shift
 
 if startpath
   Dir.chdir startpath
 end

Oops.  Speaking of using at your own risk . . .

That line that reads `losers= Dir[#{Dir.getwd}/**/*]` should be
*after* the conditional block.  Thus, the above quoted code should look
like this instead:

 keepers   = IO.readlines ARGV.shift
 startpath = ARGV.shift
 
 if startpath
   Dir.chdir startpath
 end

 losers= Dir[#{Dir.getwd}/**/*]

. . . otherwise you might end up deleting a bunch of files in the wrong
part of the directory hierarchy if you execute the program from somewhere
other than where you want files deleted.  I guess I shouldn't have gotten
fancy and tried to provide a way to execute it from anywhere in the
filesystem.  Sorry about that.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpqPGufuu9SM.pgp
Description: PGP signature


Missing Library libc-client4.so.9

2010-01-28 Thread kalpin
Hello all,

I have FreeBSD 6.3-RELEASE. Suddenly I can not start my apache webserver
which load php5. The error said, missing libc-client4.so.9.

I checked that libc-client4.so.9 should be in /usr/local/lib but I can not
find it.

How do I get this one?

Best Regards,

Kalpin E. Silaen

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Missing Library libc-client4.so.9

2010-01-28 Thread Matthew Seaman
On 28/01/2010 10:37, kal...@muliahost.com wrote:

 I checked that libc-client4.so.9 should be in /usr/local/lib but I can not
 find it.

It's installed by the mail/cclient port, which is a dependency of the
php5-imap module.

Cheers,

Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to use an older version of gcc?

2010-01-28 Thread Daniel C. Dowse
On Thu, 28 Jan 2010 00:14:14 -0800 (PST) at 
gfot giorgo...@yahoo.gr wrote:


yes i know i can call it gcc34 but the real problem is that the toolchain has
some scripts to automate the building and it uses some paths to pick up the
appropriate tools and when i run the scripts gcc42 is used. I figure out
that the path that gcc42 is located is the same as gcc34 /usr/local/bin .
But i don't know how to switch to the old gcc34 let's say for a particular
user on my system.
-- 

You could add to your make.conf.

GCC=gcc34
CXX=ccp34
CC=gcc34

greetings

Daniel 

-- 
  \\|//
  (o o)
---ooO-(_)-Ooo
- Unix is a computer virus with a user interface -
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: booting off GPT partitions

2010-01-28 Thread Robert Noland
On Wed, 2010-01-27 at 20:23 -0600, Brooks Davis wrote:
 On Thu, Jan 28, 2010 at 12:27:54AM +0100, Dimitry Andric wrote:
  On 2010-01-27 22:27, John Baldwin wrote:
  GPT was defined along with EFI, so many folks assume that you have to use 
  EFI
  to boot a GPT-labelled disk.  However, FreeBSD has its own BIOS-based
  bootstrap that can handle GPT-labelled disks.  I doubt the SuperMicro tech 
  is
  familiar with that case.  I thought I heard that some folks had added GPT
  support to grub as well.
  
  However, this won't boot disks larger than 2TiB, right?  At least not
  without BIOS support...
 
 You won't be able to boot from a partition more than 2TiB in, but you
 should still be able to boot as long as you boot from the front part of
 the disk.

John or Marcel can correct me, but I don't think that this is an issue.
The bootstrap is located in the pmbr in sector 0 and the GPT headers and
tables are in sectors 1 - 34.  The bootstrap code knows how to read the
GPT tables and can deal with  2 tb lba's.

So, as long as you can successfully load the bootstrap code from sector
0, all *should* be good.

robert.

 -- Brook
-- 
Robert Noland rnol...@freebsd.org
FreeBSD

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: booting off GPT partitions

2010-01-28 Thread Dimitry Andric

On 2010-01-28 13:06, Robert Noland wrote:

John or Marcel can correct me, but I don't think that this is an issue.
The bootstrap is located in the pmbr in sector 0 and the GPT headers and
tables are in sectors 1 - 34.  The bootstrap code knows how to read the
GPT tables and can deal with  2 tb lba's.


Ah yes, I see it now.  It uses EDD packets with the BIOS int 13
interface, which apparently have a 64-bit LBA.  This should support up
to 8 ZiB with 512-byte sectors...

OTOH, I have no idea how well most BIOSes actually implement this.
Since many OSes simply don't support anything over 2^32 sectors, I would
not be amazed to find much BIOSes out there that behave the same.  Or am
I too paranoid now? :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Strange network issue in freebsd 8

2010-01-28 Thread Andriy Gapon
on 28/01/2010 05:03 sam said the following:
 that s why I 've been so in doubt using freebsd AMD64 release.

Why again?

-- 
Andriy Gapon
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How do you manage your jails?

2010-01-28 Thread Christer Solskogen
So you have installed a FreeBSD server and setup several jails on your
system. They run the services they need and everything works smoothly. But
how do manage all of them? What do you do if you want to run a command on
all jails? Do you run cfengine/puppy? How do you setup sendmail? Do
you have sendmail on all jails?
Do you share ports to all jails? How do you keep ports up to date on them?
Do you have a set of scripts that you want to share? On
http://antarctica.no/stuff/UNIX/FreeBSD/jails/ you'll find what I use.

I'm preparing a talk for BLUG (the local Linux/BSD group) and I want to know how
YOU manage your jails, there sure are more than one way do it.

-- 
chs
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How do you manage your jails?

2010-01-28 Thread Adam Vande More
On Thu, Jan 28, 2010 at 8:21 AM, Christer Solskogen 
christer.solsko...@gmail.com wrote:

 So you have installed a FreeBSD server and setup several jails on your
 system. They run the services they need and everything works smoothly. But
 how do manage all of them? What do you do if you want to run a command on
 all jails? Do you run cfengine/puppy? How do you setup sendmail? Do
 you have sendmail on all jails?
 Do you share ports to all jails? How do you keep ports up to date on them?
 Do you have a set of scripts that you want to share? On
 http://antarctica.no/stuff/UNIX/FreeBSD/jails/ you'll find what I use.

 I'm preparing a talk for BLUG (the local Linux/BSD group) and I want to
 know how
 YOU manage your jails, there sure are more than one way do it.


you should check out /usr/ports/sysutils/ezjail


-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How do you manage your jails?

2010-01-28 Thread Christer Solskogen
On Thu, Jan 28, 2010 at 3:28 PM, Adam Vande More amvandem...@gmail.com wrote:

 you should check out /usr/ports/sysutils/ezjail


Already noted :) I use it myself.

-- 
chs,
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to use an older version of gcc?

2010-01-28 Thread b. f.
gfot wrote:
...
yes i know i can call it gcc34 but the real problem is that the toolchain has
some scripts to automate the building and it uses some paths to pick up the
appropriate tools and when i run the scripts gcc42 is used. I figure out
that the path that gcc42 is located is the same as gcc34 /usr/local/bin .
But i don't know how to switch to the old gcc34 let's say for a particular
user on my system.


I'm not sure why you would have lang/gcc42 installed on FreeBSD 8,
unless you needed certain extra components that didn't come with the
base system compiler, which is a patched version of gcc 4.2.  Are you
sure your toolchain isn't using /usr/bin/cc or /usr/bin/gcc, instead
of /usr/local/bin/gcc42?  And I'm not sure that it's a good idea to
use lang/gcc34, either.  In any event, if you are determined to do
this, you could try defining:

setenv CC gcc34
setenv CPP cpp34
alias cc gcc34
alias gcc gcc34
alias cpp cpp34
...

and so on, in the user's shell configuration file The location of that
configuration file (e.g., $HOME/.cshrc, or $HOME/.profile) and the
exact syntax will obviously depend upon the shell used.

Or you could redefine the PATH variable of the user in question, so
that, for example, $HOME/bin precedes /usr/bin and /usr/local/bin, and
set

ln -s /usr/local/bin/gcc34 $HOME/bin/gcc
ln -s /usr/local/bin/gcc34 $HOME/bin/cc
ln -s /usr/local/bin/cpp34 $HOME/bin/cpp

and so on.  Of course the aliases and links above are just typical
examples, and may not work in your specific case: you have to consult
the scripts in your MIPS tools in order to determine which values to
use.

If your user still wants to have the flexibility of using the base
system compiler in some cases, without having to undo changes like
those above, and only wants to use gcc34 with the MIPS tools, you
could try using a per-directory environment change with the
sysutils/penv port.

I don't mean to be impolite, but I would have thought that someone who
will be doing cross-development for MIPS would have been able to
figure this out, or patch the toolchain scripts.  Are you sure this
user is up to the task?

Regards,
   b.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: 8.0 and floppy support

2010-01-28 Thread Lowell Gilbert
Fbsd1 fb...@a1poweruser.com writes:

 When booting release 8.0 i no longer get the fd0 floppy device prob
 message. This pc has run freebsd 6.4 7.0 7.2 which all supported the
 floppy drive.

 Has floppy drive support been dropped in 8.0?

No; it's still in the GENERIC kernel, and it still works for me.

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Swap Partition First? Something is still Wrong.

2010-01-28 Thread Martin McCormick
Here is the output of fdisk from the drive to be formatted.

*** Working on device /dev/ad0 ***
parameters extracted from in-core disklabel are:
cylinders=77504 heads=16 sectors/track=63 (1008 blks/cyl)

Let's try a million or so blocks left as swap.

ad0s1-1=ufs 77116032 / 1
#That should the FreeBSD active partition.

ad0s1-2=swap 0 
#That should give us what's left as swap. This is the opposite
of what I want to do, but it is in the order that one would
likely do it so if it is going to work, it should. This gives a
benchmark to start from.

The complaint is that it can't write ad0s1-2 swap as
always.

I changed the syntax.

ad0s1a=ufs 77116032 / 1
ad0s1b=swap 0 

I ran sysinstall and loaded the install.cfg file with
those changes and was overjoyed to see that it had successfully
written all file system to the disk.

Not true! It writes in to MFS until that fills up and
then it overwrites some of mfs so that one must reboot. The
fdisk output never changes from the following:

*** Working on device /dev/ad0 ***
parameters extracted from in-core disklabel are:
cylinders=77504 heads=16 sectors/track=63 (1008 blks/cyl)

snip

cylinders=77504 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 78123969 (38146 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 15/ sector 63
The data for partition 2 is:
UNUSED
The data for partition 3 is:
UNUSED
The data for partition 4 is:
UNUSED

I have yet to see anything on the other 3 partitions. It
does format just fine if I manually set it up via sysinstall. I
know I am doing something wrong but not sure what.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


gjournal on compact flash

2010-01-28 Thread Nikos Vassiliadis

Hi,

I am using a 40MB journal on a 500MB compact flash.
Would that be sane, or I am causing more harm than
good?

My concerns are:
1) wear leveling. The journal is on specific part
of the disk writing again and again. That
should be handled by the CF itself. Though
I am not sure it does a good job???
2) I do care about ungraceful power cycles and I've seen
posts on the net, mentioning:

More, If
   you interrupt power at arbitrary times while the device is writing,
   you can lose the integrity of the file system being modified. The loss
   is not limited to the 512 byte sector being modified, as it generally
   is  with rotating disks; you can lose an entire erase block, maybe 64K
   at once.

I guess the above comment renders the use
of a journaling filesystem useless. But, doing
some naive tests, power cycling the machine
while writing and checksumming the data after
fsck in preen mode, revealed no error.

Thanks in advance for any insights, Nikos

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: gjournal on compact flash

2010-01-28 Thread Adam Vande More
On Thu, Jan 28, 2010 at 10:42 AM, Nikos Vassiliadis nvass9...@gmx.comwrote:

 Hi,

 I am using a 40MB journal on a 500MB compact flash.
 Would that be sane, or I am causing more harm than
 good?

 My concerns are:
 1) wear leveling. The journal is on specific part
of the disk writing again and again. That
should be handled by the CF itself. Though
I am not sure it does a good job???
 2) I do care about ungraceful power cycles and I've seen
posts on the net, mentioning:

 More, If
   you interrupt power at arbitrary times while the device is writing,
   you can lose the integrity of the file system being modified. The loss
   is not limited to the 512 byte sector being modified, as it generally
   is  with rotating disks; you can lose an entire erase block, maybe 64K
   at once.

I guess the above comment renders the use
of a journaling filesystem useless. But, doing
some naive tests, power cycling the machine
while writing and checksumming the data after
fsck in preen mode, revealed no error.

 Thanks in advance for any insights, Nikos


Soft Updates seem more appropriate for a 500MB CF drive than gjournal.
AFAIK, they are a wash in terms of reliability, and gjournal needs to write
all data twice meaning it's slower, and increases the wear on the drive.
The big drawback to soft updates is the fsck times after an unclean shutdown
which really shouldn't be an issue on a 500MB drive.

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


make doesn't see changes in /etc/mail/freebsd.mc

2010-01-28 Thread Anton Shterenlikht
I've seen this behaviour for years, but never bothered
to ask why.

Imagine I already have in /etc/mail local .mc and .cf
files. Imagine I then update freebsd.mc. When I run make
nothing happens. What I think should happen is that
local .mc should be updated and then .cf generated.

Because of this behaviour I have to manually delete
local .mc files and all .cf files before running make.

Any comments?

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make doesn't see changes in /etc/mail/freebsd.mc

2010-01-28 Thread Chris Rees
On 28 January 2010 16:59, Anton Shterenlikht me...@bristol.ac.uk wrote:
 I've seen this behaviour for years, but never bothered
 to ask why.

 Imagine I already have in /etc/mail local .mc and .cf
 files. Imagine I then update freebsd.mc. When I run make
 nothing happens. What I think should happen is that
 local .mc should be updated and then .cf generated.

 Because of this behaviour I have to manually delete
 local .mc files and all .cf files before running make.

 Any comments?

 many thanks
 anton


Because your carefully crafted local .mc files shouldn't be clobbered
whenever freebsd.mc is updated?

Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make doesn't see changes in /etc/mail/freebsd.mc

2010-01-28 Thread Anton Shterenlikht
On Thu, Jan 28, 2010 at 05:03:26PM +, Chris Rees wrote:
 On 28 January 2010 16:59, Anton Shterenlikht me...@bristol.ac.uk wrote:
  I've seen this behaviour for years, but never bothered
  to ask why.
 
  Imagine I already have in /etc/mail local .mc and .cf
  files. Imagine I then update freebsd.mc. When I run make
  nothing happens. What I think should happen is that
  local .mc should be updated and then .cf generated.
 
  Because of this behaviour I have to manually delete
  local .mc files and all .cf files before running make.
 
  Any comments?
 
  many thanks
  anton
 
 
 Because your carefully crafted local .mc files shouldn't be clobbered
 whenever freebsd.mc is updated?

I see.. so you are saying that freebsd.mc shouldn't even be
touched at all, all local chages should be made straight
to local .mc?

thank you

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Intel Pro/Wireless3945 issue

2010-01-28 Thread dhaneshk k

still   unable to connect   to wireless modem.  In dmesg  output  I am seeing  
a message  
wpi0  failed  can't load firmware image .

why it  failed to load firmware module ?

I tried to load it  by kldload firmware  then  it reports file already exists . 
 what went wrong  how to fix the  issue of
firmware module unable to load ?

Thanks in advance
Dhanesh

 Date: Wed, 27 Jan 2010 11:42:20 -0700
 From: wbl...@wonkity.com
 To: les...@eskk.nu
 CC: dhanes...@hotmail.com; freebsd-questions@freebsd.org
 Subject: Re: Intel Pro/Wireless3945  issue
 
 On Wed, 27 Jan 2010, Leslie Jensen wrote:
 
  2010-01-27 17:28, dhaneshk k skrev:
 
 I am trying to configure  my laptop for  wireless connectivity to a 
  broadband connection.
  
  these are the steps I followed, I don't know what  I made wrong, please 
  help to fix the issue..
  
  1 ) To  /boot/loader.conf
  
  if_wpi_load = YES
  wlan_load = YES
  wlan_amrr_load = YES
  firmware_load = YES
  wpifw_load = YES
  legal.intel_wpi.licence_ack=1
 ...
  3) then I checked  the out  put  ofifconfig
  
  it showing  wpi0but  no carriers  for the device
  
  I am using  FreeBSD-7.2 i386 release.  Wireless card is   Intel 
  Pro/Wireless  3945 . (In  Windows XP  it works from this Windows I am 
  sending this mail via   Wireless  access)  Any help  most welcome.
 
  You need some lines i /etc/rc.conf
 
  wpa_supplicant_enable=YES  # is for security, try without first
  wlans_wpi0=wlan0   # mine is wlans_iwn0=wlan0
  ifconfig_wlan0=WPA DHCP
 
 The virtual wlan0 was added for FreeBSD 8.  For 7.2, it should still be 
 done the old way (using the actual card, wpi0 in this case).
 
 -Warren Block * Rapid City, South Dakota USA
  
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make doesn't see changes in /etc/mail/freebsd.mc

2010-01-28 Thread Chuck Swiger
On Jan 28, 2010, at 9:11 AM, Anton Shterenlikht wrote:
 Because your carefully crafted local .mc files shouldn't be clobbered
 whenever freebsd.mc is updated?
 
 I see.. so you are saying that freebsd.mc shouldn't even be
 touched at all, all local chages should be made straight
 to local .mc?

Please see /etc/mail/Makefile:

# 
# This Makefile uses `HOSTNAME.mc' as the default MTA .mc file.  This
# can be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
#
#   SENDMAIL_MC=/etc/mail/myconfig.mc
#
# If 'HOSTNAME.mc' does not exist, it is created using 'freebsd.mc'
# as a template.

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: Is their Automatic command to send a JPG file using FTP

2010-01-28 Thread Dixit, Viraj
Thanks so much. One question, I created a .netrc file and put it in the
root (/root) directory and this is what it looks like below. I have
taken out the IP, user name  password so no body can use them. Can you
tell me if my syntax is correct and how do I activate this file and is
this file in the right place on the server. Thanks,

machine 172.16.0.38
login  
password  
macdef init
binary
lcd /ftp
cd /var/temp
get newemp.db
quit

VJ
Viraj Dixit
City of Palo Alto Information Technology
650-329-2118

-Original Message-
From: Polytropon [mailto:free...@edvax.de] 
Sent: Thursday, January 28, 2010 12:03 AM
To: Dixit, Viraj
Cc: freebsd-questions@freebsd.org
Subject: Re: Is their Automatic command to send a JPG file using FTP

On Wed, 27 Jan 2010 14:08:40 -0800, Dixit, Viraj
viraj.di...@cityofpaloalto.org wrote:
 Hi,
 I am looking to see if there a command or a script In BSD Os that will
 allow me to ftp to a server automatically and get a file from another
 server. User name and passwd will be already in the script so it will
 run ftp and download a file or a JPG from that server. Like in Linux
OS
 there is a command using .netrc file and you can script that file and
 will automatically do what is in the file at time interval that you
 want.  Thanks,

In FreeBSD, there's documentation on that; read man ftp and
see the -u option.

I'm often (ab)using a Makefile to upload (send) files per FTP to
a server, and I call this make install. You can put this into
a shell script (sh) and then call it, e. g.

#!/bin/sh
FTPUSER=my_account_name_on_ftp_server
FTPPASSWD=my_very_complicated_password
SERVER=ftp.where_my_stuff_is.foo.bar
UPLOAD=/path/to/files/to/upload
cd ${UPLOAD}  ftp -u ftp://${FTPUSER}:${ftppass...@${server} *

Of course, you can utilize .netrc to contain FTP access data. Then,
you just need to call pure ftp with server name, and you can
replace * with any file name(s) you want.

However, be aware that FTP doesn't encrypt passwords. You should
take into mind that using FTP with an SSH wrapper, or even
better - scp - is a more secure way to send files.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: named error sending response: not enough free resources

2010-01-28 Thread James Smallacombe

On Wed, 27 Jan 2010, Chuck Swiger wrote:


Hi--

On Jan 27, 2010, at 1:15 PM, James Smallacombe wrote:

Jan 26 21:50:32 host named[667]: client IP REMOVED#57938: error sending 
response: not enough free resources
Jan 26 21:50:32 host named[667]: client IP REMOVED#59830: error sending 
response: not enough free resources




OK, if the nameserver is published / authoritative, then it would be expected 
to be fielding requests from the Internet at large.


To follow up on this: Noticed the issue again this morning, which also was 
accompanied by latency so high that I could not connect (some pings got 
through at very high latency).  I emailed the provider and they told me 
that they had my port on their Ether switch set to 10Mbs.  They switched 
it to 100Mbs and only time will tell if that fixes it.


Does this sound like it could be the entire cause?  I ask because I've 
maxed out pipes before, but never seen it shut all traffic down this much. 
One key difference that I forgot to mention is that this server is running 
TWO instances of named, on two different IPs (for different domains), each 
running a few hundred zones.


Bottom line:  Would congestion cause this issue, or would this issue cause 
congestion?


Thanks again!

James Smallacombe PlantageNet, Inc. CEO and Janitor
u...@3.am   http://3.am
=
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Is their Automatic command to send a JPG file using FTP

2010-01-28 Thread Polytropon
On Thu, 28 Jan 2010 10:21:32 -0800, Dixit, Viraj 
viraj.di...@cityofpaloalto.org wrote:
 Thanks so much. One question, I created a .netrc file and put it in the
 root (/root) directory and this is what it looks like below. I have
 taken out the IP, user name  password so no body can use them.

Do you regularly work as root? :-)



 Can you
 tell me if my syntax is correct [...]

Check man ftp, there's a whole section THE .netrc FILE.
I know that the ability to rely on manpage information isn't
very common in Linux land due to missing documentation
quality. :-)



 [...] and how do I activate this file and is
 this file in the right place on the server.

The syntax is ftp -N file. The default is ~/-netrc.



 machine 172.16.0.38
 login  
 password  
 macdef init
 binary
 lcd /ftp
 cd /var/temp
 get newemp.db
 quit

That looks okay to me. You can process it with ftp -v
to check verbose output for any strange things, should they
ever happen.

In order to avoid interaction (especially when working
with more than one file), you could add prompt to supress
any manual input.

By the way, FreeBSD's ftp program accepts stdin input,
such as

printf prompt\nmdelete *\nbye\n | \
ftp ftp://$(FTPUSER):$(FTPPASSWD)@$(SERVER)/

This is what I call make deinstall for web pages. :-)

This means that you could do the same as with .netrc.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Anyone know what this CAM error at boot means? CAM_REQ_CMP_ERR

2010-01-28 Thread ericr
I've got an Adaptec 2200S RAID controller in a server running 5.3-RELEASE
with a GENERIC kernel.  (We're going to upgrade Real Soon Now, but I've got
to keep things going until then.)

It's been running fine for years, but a few days ago, it started taking
about 3 times longer than usual to boot.

The error is:

(probe0:aacp0:0:0:0): Data Overrun
(probe0:aacp0:0:0:0): Retrying Command

followed a bit later by:

(probe30:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe30:umass-sim0:0:0:0): Retrying Command

The system seems to run ok once it boots, but taking forever to boot
concerns me.  Anyone know what this error means, and what I should do about
it?

Here's the dmesg from boot -v showing the controller, and the above CAM
related error:

...
aac0: Adaptec SCSI RAID 2200S mem 0xf800-0xfbff irq 48 at device
1.0 on pci3
aac0: [FAST]
aac0: Unknown processor 100MHz, 48MB cache memory, optional battery not
installed
aac0: Kernel 4.2-0, Build 8205, S/N ba904a
aac0: Supported
Options=31d7eCLUSTERS,WCACHE,DATA64,HOSTTIME,RAID50,WINDOW4GB,SOFTERR,SGMAP64,ALARM,NONDASD
aacp0: SCSI Passthrough Bus on aac0
aacp1: SCSI Passthrough Bus on aac0
...
aacd0: RAID 5 on aac0
aacd0: 419994MB (860149632 sectors)
GEOM: new disk aacd0
[0] f:80 typ:165 s(CHS):0/1/1 e(CHS):1023/254/63 s:63 l:860136102
[1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0
[2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0
[3] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0
GEOM: Configure aacd0s1, start 32256 length 440389684224 end 440389716479
GEOM: Configure aacd0s1a, start 0 length 26843545600 end 26843545599
GEOM: Configure aacd0s1b, start 26843545600 length 4294967296 end
31138512895
GEOM: Configure aacd0s1c, start 0 length 440389684224 end 440389684223
GEOM: Configure aacd0s1d, start 31138512896 length 137438953472 end
168577466367
GEOM: Configure aacd0s1e, start 168577466368 length 4294967296 end
172872433663
GEOM: Configure aacd0s1f, start 172872433664 length 267517250560 end
440389684223
(probe0:aacp0:0:0:0): Data Overrun
(probe0:aacp0:0:0:0): Retrying Command
(probe5:aacp0:0:5:0): Data Overrun
(probe5:aacp0:0:5:0): Retrying Command
(probe4:aacp0:0:4:0): Data Overrun
(probe4:aacp0:0:4:0): Retrying Command
(probe3:aacp0:0:3:0): Data Overrun
(probe3:aacp0:0:3:0): Retrying Command
(probe2:aacp0:0:2:0): Data Overrun
(probe2:aacp0:0:2:0): Retrying Command
(probe0:aacp0:0:0:0): Data Overrun
(probe0:aacp0:0:0:0): Retrying Command
(probe5:aacp0:0:5:0): Data Overrun
(probe5:aacp0:0:5:0): Retrying Command
(probe4:aacp0:0:4:0): Data Overrun
(probe4:aacp0:0:4:0): Retrying Command
(probe3:aacp0:0:3:0): Data Overrun
(probe3:aacp0:0:3:0): Retrying Command
(probe2:aacp0:0:2:0): Data Overrun
(probe2:aacp0:0:2:0): Retrying Command
(probe0:aacp0:0:0:0): Data Overrun
(probe0:aacp0:0:0:0): Retrying Command
(probe5:aacp0:0:5:0): Data Overrun
(probe5:aacp0:0:5:0): Retrying Command
(probe4:aacp0:0:4:0): Data Overrun
(probe4:aacp0:0:4:0): Retrying Command
(probe3:aacp0:0:3:0): Data Overrun
(probe3:aacp0:0:3:0): Retrying Command
(probe2:aacp0:0:2:0): Data Overrun
(probe2:aacp0:0:2:0): Retrying Command
(probe0:aacp0:0:0:0): Data Overrun
(probe0:aacp0:0:0:0): Retrying Command
(probe5:aacp0:0:5:0): Data Overrun
(probe5:aacp0:0:5:0): Retrying Command
(probe4:aacp0:0:4:0): Data Overrun
(probe4:aacp0:0:4:0): Retrying Command
(probe3:aacp0:0:3:0): Data Overrun
(probe3:aacp0:0:3:0): Retrying Command
(probe2:aacp0:0:2:0): Data Overrun
(probe2:aacp0:0:2:0): Retrying Command
(probe0:aacp0:0:0:0): Data Overrun
(probe0:aacp0:0:0:0): error 5
(probe0:aacp0:0:0:0): Retries Exausted
(probe5:aacp0:0:5:0): Data Overrun
(probe5:aacp0:0:5:0): error 5
(probe5:aacp0:0:5:0): Retries Exausted
(probe4:aacp0:0:4:0): Data Overrun
(probe4:aacp0:0:4:0): error 5
(probe4:aacp0:0:4:0): Retries Exausted
(probe3:aacp0:0:3:0): Data Overrun
(probe3:aacp0:0:3:0): error 5
(probe3:aacp0:0:3:0): Retries Exausted
(probe2:aacp0:0:2:0): Data Overrun
(probe2:aacp0:0:2:0): error 5
(probe2:aacp0:0:2:0): Retries Exausted
(probe30:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe30:umass-sim0:0:0:0): Retrying Command
(probe30:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe30:umass-sim0:0:0:0): Retrying Command
(probe30:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe30:umass-sim0:0:0:0): Retrying Command
(probe30:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe30:umass-sim0:0:0:0): Retrying Command
(probe30:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe30:umass-sim0:0:0:0): error 5
(probe30:umass-sim0:0:0:0): Retries Exausted
pass0 at aacp0 bus 0 target 0 lun 0
pass0: SEAGATE ST3146807LC 0007 Fixed unknown SCSI-3 device
pass0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit)
pass1 at aacp0 bus 0 target 2 lun 0
pass1: SEAGATE ST3146807LC 0007 Fixed unknown SCSI-3 device
pass1: 160.000MB/s transfers (80.000MHz, offset 63, 16bit)
pass2 at aacp0 bus 0 target 3 lun 0
pass2: SEAGATE ST3146807LC 0007 Fixed unknown SCSI-3 

Re: named error sending response: not enough free resources

2010-01-28 Thread Adam Vande More
On Thu, Jan 28, 2010 at 12:59 PM, James Smallacombe u...@3.am wrote:

 To follow up on this: Noticed the issue again this morning, which also was
 accompanied by latency so high that I could not connect (some pings got
 through at very high latency).  I emailed the provider and they told me that
 they had my port on their Ether switch set to 10Mbs.  They switched it to
 100Mbs and only time will tell if that fixes it.

 Does this sound like it could be the entire cause?  I ask because I've
 maxed out pipes before, but never seen it shut all traffic down this much.
 One key difference that I forgot to mention is that this server is running
 TWO instances of named, on two different IPs (for different domains), each
 running a few hundred zones.

 Bottom line:  Would congestion cause this issue, or would this issue cause
 congestion?


I would guess no, but that guess could easily be wrong.  Have you tried
turning up the logging to verbosity to get a better idea of what's
happening?



-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Patch

2010-01-28 Thread Michael Krafczyk
Hi,

I am new to FreeBSD and recently created a FreeNAS server.  I had a problem
with GEOM: GPT rejected.  I have Award Bios and found this fix
http://www.freebsd.org/cgi/query-pr.cgi?pr=115406.  I, though, do not know
how to apply the patch.  I would appreciate any help.

Thanks,

Mike Krafczyk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Patch

2010-01-28 Thread Chris Rees
On 28 January 2010 20:18, Michael Krafczyk mkrafc...@gmail.com wrote:
 Hi,

 I am new to FreeBSD and recently created a FreeNAS server.  I had a problem
 with GEOM: GPT rejected.  I have Award Bios and found this fix
 http://www.freebsd.org/cgi/query-pr.cgi?pr=115406.  I, though, do not know
 how to apply the patch.  I would appreciate any help.

 Thanks,

 Mike Krafczyk

Are you certain that you need to? What version of FreeBSD are you using?

Chris
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


clarification on polkit upgrade

2010-01-28 Thread Chad Perrin
In /usr/ports/UPDATING, I see this:

  Due to a recent change in sysutils/policykit, both sysutils/policykit,
  and sysutils/polkit need to be rebuilt, but in a certain order.  First,
  upgrade sysutils/policykit to 0.9_6.  Then, force a rebuild and reinstall
  of sysutils/polkit.  If you do not do this, applications which depend
  on polkitd will fail.

It's a little unclear about the requirement for the polkit upgrade.  Does
this mean that `portupgrade polkit` is enough after upgrading policy kit,
or not?  If not -- what's needed?  Would a deinstall/reinstall be needed?
Is `portupgrade -f` good?

I've already used `portupgrade polkit` here, and I haven't seen any
problems yet, but then I haven't restarted anything that relies on polkit
for a while either.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]


pgpQ2knS5uOSl.pgp
Description: PGP signature


RE: Is their Automatic command to send a JPG file using FTP

2010-01-28 Thread Dixit, Viraj
Hi,

The script that I have setup does not work if I run the .netrc file. I
ran the commands in ftp -v mode and it did not like machine command, did
not like passwd or pwd etc. 

machine  0.0.0.0

login VJ

password  123456

macdef init

binary

lcd /ftp

cd /var/temp

get newemp.db

quit

 

If I use this command in .netrc it connects to the server but it does
not connect using my login name VJ, it  points to some other name.

ftp  0.0.0.0 ftp://ftp 0.0.0.0/ 

 .netrc simply doesn't work in FreeBSD.

Is their someone who has a working script. Thanks!!!

 

 

 

-Original Message-
From: Dan Nelson [mailto:dnel...@allantgroup.com] 
Sent: Wednesday, January 27, 2010 2:54 PM
To: Dixit, Viraj
Cc: freebsd-questions@freebsd.org
Subject: Re: Is their Automatic command to send a JPG file using FTP

 

In the last episode (Jan 27), Dixit, Viraj said:

 I am looking to see if there a command or a script In BSD Os that will

 allow me to ftp to a server automatically and get a file from another

 server.  User name and passwd will be already in the script so it will
run

 ftp and download a file or a JPG from that server.  Like in Linux OS
there

 is a command using .netrc file and you can script that file and will

 automatically do what is in the file at time interval that you want. 

 Thanks,

 

FreeBSD's ftp command supports .netrc files.  Is your current script not

working?

 

http://www.freebsd.org/cgi/man.cgi?query=ftp#THE_.netrc_FILE

 

-- 

Dan Nelson

dnel...@allantgroup.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: make doesn't see changes in /etc/mail/freebsd.mc

2010-01-28 Thread Giorgos Keramidas
On Thu, 28 Jan 2010 16:59:16 +, Anton Shterenlikht me...@bristol.ac.uk 
wrote:
 I've seen this behaviour for years, but never bothered
 to ask why.

 Imagine I already have in /etc/mail local .mc and .cf files. Imagine I
 then update freebsd.mc. When I run make nothing happens. What I think
 should happen is that local .mc should be updated and then .cf
 generated.

 Because of this behaviour I have to manually delete local .mc files
 and all .cf files before running make.

Or merge your local changes *into* the local.mc file.  For example, I
have several dozen lines of local customizations in HOSTNAME.mc here:

r...@kobe:/etc/mail# diff -u freebsd.mc kobe.mc | diffstat -p1
 kobe.mc |  167
 
 1 file changed, 126 insertions(+), 41 deletions(-)

I would be very annoyed if updating freebsd.mc clobbered these :-)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Problem with sftp server, static linking, pam and nss_ldap.

2010-01-28 Thread Piotr Buliński
Hello,

recently we moved our users database to LDAP server, but after that sftp stops 
working on our students server. 

We use:
 - OpenLDAP 2.4.21
 - nss_ldap-1.265_3
 - pam_ldap-1.8.5
 - FreeBSD 9.0-CURRENT amd64

When I use sftp, it drops the connection:

{volt}-{~}% sftp localhost
Connecting to localhost...
Connection closed
{volt}-{~}% 

After short investigation, I've found that problem is in 
/usr/libexec/sftp-server program (which is our default subsystem in sshd):

{volt}-{~}% /usr/libexec/sftp-server 
No user found for uid 5567
{volt}-{~}% 

what was quite weird, because sshd works perfectly with users from LDAP server 
(so I assume that PAM is configured correctly).

After that, I've tried to make a simple test with program below:

===
#include sys/types.h
#include pwd.h
#include stdarg.h
#include stdio.h
#include unistd.h

int
main(int argc, char **argv)
{
 struct passwd *user_pw;

 user_pw = getpwuid(getuid());

 if ((user_pw = getpwuid(getuid())) == NULL) {
   fprintf(stderr, No user found for uid %lu\n,
   (u_long)getuid());
   return 1;
 } else {
   fprintf(stderr, It works %s!\nYour uid is: %lu\n,
   user_pw-pw_name,
   (u_long)getuid());
 }

 return 0;
}
===

which is almost copy-pasted from /usr/src/crypto/openssh/sftp-server-main.c

I've build it twice. Once with dynamic linking:

{volt}-{~}% cc -o test test.c 
{volt}-{~}% ./test
It works bulinskp!
Your uid is: 5567
{volt}-{~}% 

another one with static linking:

{volt}-{~}% cc -o test -static test.c
{volt}-{~}% ./test   
No user found for uid 5567
{volt}-{~}% 

As you can see, it works great with dynamic linking, but if it's build with 
static linking it can't get user information from LDAP database.


Could you be so kind and help me better understand this problem and find some 
solution for it (I spend some time trying to find it, but this is probably 
beyond my scope)?

I would be really appreciate for any tip.

Below are information about my PAM and NSS configuration:

{volt}-{~}% cat /etc/nsswitch.conf | grep passwd
passwd: files ldap
{volt}-{~}% 

{volt}-{~}% cat /etc/pam.d/sshd | grep -v ^# | grep -v ^$
authsufficient  pam_opie.so no_warn no_fake_prompts
authrequisite   pam_opieaccess.so   no_warn allow_local
authrequisite   /usr/local/lib/pam_af.sodebug
authsufficient  /usr/local/lib/pam_ldap.so  no_warn
authrequiredpam_unix.so no_warn try_first_pass
account requiredpam_nologin.so
account requiredpam_login_access.so
account required/usr/local/lib/pam_ldap.so  no_warn 
ignore_authinfo_unavail ignore_unknown_user
account requiredpam_unix.so
session requiredpam_permit.so
session sufficient  /usr/local/lib/pam_ldap.so no_warn 
try_first_pass 
passwordrequiredpam_unix.so no_warn try_first_pass
{volt}-{~}% 

regards
-- 
Piotr Buliński
Informatyka na Wydziale Elektrycznym
Politechnika Warszawska


Re: OT: finding every file not in a list

2010-01-28 Thread CyberLeo Kitsana
Aryeh M. Friedman wrote:
 I have a list of files that should be in a dir tree and want to remove
 any files from the tree not in list (i.e. if it is on the list keep it
 else rm it)... any quick way to do this?

# ls -1F
keep
old/
# find old
old
old/a
old/a/1
old/a/4
old/b
old/b/2
old/b/5
old/c
old/c/3
old/c/6
# find new
find: new: No such file or directory
# cat keep
a/4
b/5
c/6
# ( cd old; cat ../keep | cpio -pld ../new )
/tmp/old
0 blocks
# ls -1F
keep
new/
old/
# find new
new
new/a
new/a/4
new/b
new/b/5
new/c
new/c/6

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Is their Automatic command to send a JPG file using FTP

2010-01-28 Thread Dan Nelson
In the last episode (Jan 28), Dixit, Viraj said:
 The script that I have setup does not work if I run the .netrc file. I
 ran the commands in ftp -v mode and it did not like machine command, did
 not like passwd or pwd etc. 

The commands in .netrc are not the same ones that you send on the ftp
commandline (except for the macdef block), so that's to be expected.  I just
tried your sample netrc file (with changes to match my system) and it worked
just fine:

 (d...@dan.19) /tmp cat ~/.netrc
 machine 127.0.0.1
 login dan 
 password xx
 macdef init
 binary
 lcd /tmp
 cd /
 get COPYRIGHT
 quit

 (d...@dan.19) /tmp ftp 127.0.0.1
 Connected to 127.0.0.1.
 220 studio FTP server (Version 6.00LS) ready.
 331 Password required for dan.
 230 User dan logged in.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 binary
 200 Type set to I.
 lcd /tmp
 Local directory now: /tmp
 cd /
 250 CWD command successful.
 get COPYRIGHT
 local: COPYRIGHT remote: COPYRIGHT
 229 Entering Extended Passive Mode (|||62084|)
 150 Opening BINARY mode data connection for 'COPYRIGHT' (6191 bytes).
 100% |*|  6191  11.48 MB/s00:00 ETA
 226 Transfer complete.
 6191 bytes received in 00:00 (6.32 MB/s)
 quit
 221 Goodbye.

 (d...@dan.19) /tmp ls -l /COPYRIGHT COPYRIGHT
 -r--r--r--  1 root  wheel  6191 Jan 13 11:14 /COPYRIGHT
 -rw-r--r--  1 dan   wheel  6191 Jan 13 11:14 COPYRIGHT

If all you really want to do is download a single file from a remote server,
you can give ftp a url-style commandline argument and it will log in and
download the file automatically:
http://www.freebsd.org/cgi/man.cgi?query=ftp#AUTO-FETCHING_FILES

 (d...@dan.19) /tmp ftp ftp://dan:xx...@127.0.0.1/%2fCOPYRIGHT 
 Connected to 127.0.0.1.
 220 studio FTP server (Version 6.00LS) ready.
 331 Password required for dan.
 230 User dan logged in.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 200 Type set to I.
 local: COPYRIGHT remote: /COPYRIGHT
 229 Entering Extended Passive Mode (|||57935|)
 150 Opening BINARY mode data connection for '/COPYRIGHT' (6191 bytes).
 100% |*|  6191   4.42 MB/s00:00 ETA
 226 Transfer complete.
 6191 bytes received in 00:00 (2.52 MB/s)
 221 Goodbye.


-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: booting off GPT partitions

2010-01-28 Thread John Baldwin
On Thursday 28 January 2010 7:26:24 am Dimitry Andric wrote:
 On 2010-01-28 13:06, Robert Noland wrote:
  John or Marcel can correct me, but I don't think that this is an issue.
  The bootstrap is located in the pmbr in sector 0 and the GPT headers and
  tables are in sectors 1 - 34.  The bootstrap code knows how to read the
  GPT tables and can deal with  2 tb lba's.
 
 Ah yes, I see it now.  It uses EDD packets with the BIOS int 13
 interface, which apparently have a 64-bit LBA.  This should support up
 to 8 ZiB with 512-byte sectors...
 
 OTOH, I have no idea how well most BIOSes actually implement this.
 Since many OSes simply don't support anything over 2^32 sectors, I would
 not be amazed to find much BIOSes out there that behave the same.  Or am
 I too paranoid now? :)

It should work fine.  The GPT boot code was originally written specifically to 
supporting booting from RAID volumes  2TB.  I've tested it on mfi(4) volumes 
that large (though I didn't verify the individual LBAs of all the various bits 
read in by the bootstrap and loader were).  I know that other folks ran into 
bugs until the ZFS GPT boot code was all made 64-bit clean and that they have 
since booted  2TB ZFS volumes ok.

-- 
John Baldwin
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Intel D510MO Mini-ITX Motherboard - Is anyone using FreeBSD on this?

2010-01-28 Thread Charlie Kester

On Mon 25 Jan 2010 at 02:00:47 PST Charlie Kester wrote:

http://www.mini-box.com/D510MO-mini-ITX-Intel

I'm thinking of ordering one of these motherboards, which have the
newest dual-core Atom processor and NM10 chipset.  I'm intrigued by its
low-power, fanless operation.  I already have FreeBSD running on one of
the older Atom mobo's, so I know not to expect high-end performance from
these inexpensive processors.  But that older board has an annoyingly
noisy fan, and I'd like to replace it.

Has anyone already tried putting FreeBSD on one of these?  Any
problems?


closing out this thread

I did go ahead and buy one of these boards and can now report that
FreeBSD-8.0/i386 boots and runs on it with no apparent problems.  A user
in the forums reports similar success running 8.0/amd64.

Extremely quiet and inexpensive board. At around $80, it is one-third
the cost of the Supermicro boards.  


Not much use as a space heater, however; I've had it running for more
than 24 hours, busily recompiling ports, and the heatsink is just barely
warm to the touch.  Next time I reboot it I'm going to plug it into my
Kill-a-Watt meter to measure its power draw...


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Intel Pro/Wireless 3945 issue

2010-01-28 Thread dhaneshk k

 
still unable to connect to wireless modem. In dmesg output I am seeing a 
message 
wpi0 failed can't load firmware image .
 
why it failed to load firmware module ?
 
I tried to load it by kldload firmware then it reports file already exists . 
what went wrong how to fix the issue of
firmware module unable to load ?
 
Thanks in advance
Dhanesh
 
 Date: Wed, 27 Jan 2010 11:42:20 -0700
 From: wbl...@wonkity.com
 To: les...@eskk.nu
 CC: dhanes...@hotmail.com; freebsd-questions@freebsd.org
 Subject: Re: Intel Pro/Wireless3945 issue
 
 On Wed, 27 Jan 2010, Leslie Jensen wrote:
 
  2010-01-27 17:28, dhaneshk k skrev:
 
  I am trying to configure my laptop for wireless connectivity to a 
  broadband connection.
  
  these are the steps I followed, I don't know what I made wrong, please 
  help to fix the issue..
  
  1 ) To /boot/loader.conf
  
  if_wpi_load = YES
  wlan_load = YES
  wlan_amrr_load = YES
  firmware_load = YES
  wpifw_load = YES
  legal.intel_wpi.licence_ack=1
 ...
  3) then I checked the out put of ifconfig
  
  it showing wpi0 but no carriers for the device
  
  I am using FreeBSD-7.2 i386 release. Wireless card is Intel 
  Pro/Wireless 3945 . (In Windows XP it works from this Windows I am 
  sending this mail via Wireless access) Any help most welcome.
 
  You need some lines i /etc/rc.conf
 
  wpa_supplicant_enable=YES # is for security, try without first
  wlans_wpi0=wlan0 # mine is wlans_iwn0=wlan0
  ifconfig_wlan0=WPA DHCP
 
 The virtual wlan0 was added for FreeBSD 8. For 7.2, it should still be 
 done the old way (using the actual card, wpi0 in this case).
 
 -Warren Block * Rapid City, South Dakota USA
 
_
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
https://signup.live.com/signup.aspx?id=60969___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
  
_
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: OT: finding every file not in a list

2010-01-28 Thread David Kelly

On Jan 28, 2010, at 4:23 PM, CyberLeo Kitsana wrote:

 Aryeh M. Friedman wrote:
 I have a list of files that should be in a dir tree and want to remove
 any files from the tree not in list (i.e. if it is on the list keep it
 else rm it)... any quick way to do this?
 
 # ls -1F
 keep
 old/

[...]

I think mtree(8) is the proper tool for this job. Especially the -r option:

 -rRemove any files in the file hierarchy that are not described in
   the specification.

--
David Kelly N4HHE, dke...@hiwaay.net

Whom computers would destroy, they must first drive mad.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


need help setting up webpage for xyxbuilders.us domain..

2010-01-28 Thread Gary Kline

can anybody help me set up my /etc/namedb/ files and mt
/usr/local/etc/apache22/ files to help a builder friend?  since
this probably isn't exactly on-topic, this might best be handled 
offlist from now on.  

nutshell is that this gentleman has saved me, my house, my family
umpteen times and i'm waaay overdue to return the favors.  i have no
idea how much work having a web page will get him, but it's
certainly worth a try.

thanks, guys,

gary


-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org