Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freebsd-questions Digest, Vol 304, Issue 13

1 view
Skip to first unread message

freebsd-ques...@freebsd.org

unread,
Apr 4, 2010, 9:19:39 PM4/4/10
to freebsd-...@freebsd.org
Send freebsd-questions mailing list submissions to
freebsd-...@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
or, via email, send a message with subject or body 'help' to
freebsd-ques...@freebsd.org

You can reach the person managing the list at
freebsd-que...@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-questions digest..."


Today's Topics:

1. Re: CyberShot DSC-S40 and FreeBSD (Alejandro Imass)
2. Re: CyberShot DSC-S40 and FreeBSD (Mikle)
3. Configuring IPFW IP range (Carmel NY)
4. Re: Configuring IPFW IP range (Maciej Suszko)
5. Re: Configuring IPFW IP range (Ashley)
6. Re: perl qstn... (Randal L. Schwartz)
7. Re: perl qstn... (Randal L. Schwartz)
8. Re: freebsd-8 support for dell R710 SATA raid-0 (LSI2008) (John)
9. Re: perl qstn... (Chad Perrin)
10. Re: perl qstn... (Alejandro Imass)
11. Re: Configuring IPFW IP range (Carmel NY)
12. Re: perl qstn... (Chad Perrin)
13. Re: perl qstn... (Alejandro Imass)
14. Re: perl qstn... (Polytropon)
15. Re: freebsd-8 support for dell R710 SATA raid-0 (LSI2008)
(pluknet)
16. Re: perl qstn... (Alejandro Imass)
17. Re: perl qstn... (Alejandro Imass)
18. Re: perl qstn... (Gary Kline)
19. Re: perl qstn... (pa...@pair.com)
20. Re: Support for Zotac MB with nVidia ION chipset (Tim Judd)
21. SSH root login with keys only (Marcin Wisnicki)
22. Caution:: Off-topic Re: perl qstn... (Gary Kline)
23. Re: Intel D945GSE vs Zotac ION ITX (was: Support for Zotac MB
with nVidia ION chipset) (Jeremie Le Hen)
24. Re: perl qstn... (Gary Kline)
25. Re: Caution:: Off-topic Re: perl qstn... (C. P. Ghost)
26. Re: SSH root login with keys only (Julian Fagir)
27. Re: SSH root login with keys only (krad)
28. Re: SSH root login with keys only (Erik Norgaard)
29. Re: SSH root login with keys only (Craig Butler)
30. Re: SSH root login with keys only (Marcin Wisnicki)
31. Re: SSH root login with keys only (Marcin Wisnicki)


----------------------------------------------------------------------

Message: 1
Date: Sun, 4 Apr 2010 08:35:38 -0400
From: Alejandro Imass <a...@p2ee.org>
Subject: Re: CyberShot DSC-S40 and FreeBSD
To: Mikle <nekoex...@gmail.com>
Cc: freebsd-...@freebsd.org
Message-ID:
<r2pa14066a01004040535tf...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Apr 3, 2010 at 8:26 PM, Mikle <nekoex...@gmail.com> wrote:
> On Sun, Apr 04, 2010 at 02:48:11AM +0400, Mikle wrote:
[...]
>
> Disregard that, it was pretty strange umass problem: i had forcibly unplugged my flash card (forgot to umount it), and after that no new usb devices have been detected. (could anyone reproduce it? I'm running pretty-recent 8-STABLE, update was about couple of weeks ago)
>
> Now, dmesg tells me:
> da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
> da0: <Sony Sony DSC 6.00> Removable Direct Access SCSI-0 device

[...]

Maybe it's not related but if you are running Gnome, try disabling HAL
and then see if you can mount it.

See this thread "xptioctl pass driver usb scsi driver problem (solved)"

Best,
Alejandro Imass


------------------------------

Message: 2
Date: Sun, 4 Apr 2010 16:59:46 +0400
From: Mikle <nekoex...@gmail.com>
Subject: Re: CyberShot DSC-S40 and FreeBSD
To: Alejandro Imass <a...@p2ee.org>
Cc: freebsd-...@freebsd.org
Message-ID: <2010040412...@takino.homeftp.org>
Content-Type: text/plain; charset=us-ascii

On Sun, Apr 04, 2010 at 08:35:38AM -0400, Alejandro Imass wrote:
>
> Maybe it's not related but if you are running Gnome, try disabling HAL
> and then see if you can mount it.
>
> See this thread "xptioctl pass driver usb scsi driver problem (solved)"
>
> Best,
> Alejandro Imass
Thank you for the reply.
On this pc i have no hal and no other auto-mounter software.

Wbr,


------------------------------

Message: 3
Date: Sun, 4 Apr 2010 09:11:47 -0400
From: Carmel NY <carm...@hotmail.com>
Subject: Configuring IPFW IP range
To: freebsd-...@freebsd.org
Message-ID: <BLU0-SMTP98F509F01...@phx.gbl>
Content-Type: text/plain; charset=UTF-8

This is my first attempt at configuring IPFW. I have it up and running;
however, I am not quite sure how to accomplish configuring it to block
an IP range.

Assume an IP range: 219.128.0.0 to 219.137.255.255

That is an actual range: CHINANET Guangdong province network

I want to block the entire range. I am not sure how to do it in IPFW. I
have read the 'man' pages; however, I am not getting the syntax correct
since I cannot get the range added.


--
Carmel
carm...@hotmail.com

|::::=======
|::::=======
|===========
|===========
|

Slurm, n.:
The slime that accumulates on the underside of a soap bar when
it sits in the dish too long.

Rich Hall, "Sniglets"


------------------------------

Message: 4
Date: Sun, 4 Apr 2010 16:56:37 +0200
From: Maciej Suszko <mac...@suszko.eu>
Subject: Re: Configuring IPFW IP range
To: freebsd-...@freebsd.org
Cc: carm...@hotmail.com
Message-ID: <20100404165637.2124e14f@arsenic>
Content-Type: text/plain; charset="us-ascii"

Carmel NY <carm...@hotmail.com> wrote:
> This is my first attempt at configuring IPFW. I have it up and
> running; however, I am not quite sure how to accomplish configuring
> it to block an IP range.
>
> Assume an IP range: 219.128.0.0 to 219.137.255.255
>
> That is an actual range: CHINANET Guangdong province network
>
> I want to block the entire range. I am not sure how to do it in IPFW.
> I have read the 'man' pages; however, I am not getting the syntax
> correct since I cannot get the range added.

#v+
tlhscd@arsenic:~ % ipcalc 219.128.0.0 - 219.137.255.255
deaggregate 219.128.0.0 - 219.137.255.255
219.128.0.0/13
219.136.0.0/15
#v-
--
regards, Maciej Suszko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100404/695bd332/signature-0001.pgp

------------------------------

Message: 5
Date: Sun, 04 Apr 2010 11:02:29 -0400
From: Ashley <ash...@cpufight.com>
Subject: Re: Configuring IPFW IP range
To: freebsd-...@freebsd.org
Message-ID: <4BB8AA05...@cpufight.com>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 04/04/2010 09:11 AM, Carmel NY wrote:
> This is my first attempt at configuring IPFW. I have it up and running;
> however, I am not quite sure how to accomplish configuring it to block
> an IP range.
>
> Assume an IP range: 219.128.0.0 to 219.137.255.255
>
> That is an actual range: CHINANET Guangdong province network
>
> I want to block the entire range. I am not sure how to do it in IPFW. I
> have read the 'man' pages; however, I am not getting the syntax correct
> since I cannot get the range added.
Carmel,

Have you tried something like what's mentioned in this excerpt quoted
below?:

Network-based filtering works similarly, and the network
notation there utilizes either bitmasks or netmasks, for instance:

add 2000 allow all from 192.168.0.0/16 to any
add 2100 deny all from any to 10.0.0.0:255.0.0.0

The first rule allows all traffic from the network whose IP range
is 192.168.0.0-192.168.255.255. It uses a bitmask to indicate this. A
bitmask specifies how many bits from the network address (192.168.0.0)
should remain the same for matching packets. In this instance, the first
16 bits out of the 32 bit address will remain the same, and as the first
16 bits happen to be the first two octets, 192.168, all addresses whose
source addresses have the first two octets as 192.168 will be matched by
this rule. The second rule accomplishes a similar thing using netmasks.
The netmask indicate how many bits from the indicated network address
should be used for rule matching. In the above example, for rule two, the
netmask is 255.0.0.0. Its first octet is set with high bits; in other
words, the first 8 bits are set high. This indicates to ipfw(8) that only
packets with the first 8 bits of the network address (10.0.0.0) should be
matched. As the first 8 bits of the network address equal 10, then all
packets whose destination address have a 10 for the first octet (all
addresses between 10.0.0.0 and 10.255.255.255) will be matched by this
rule, and then dropped, as indicated by the action.


(This excerpt from http://www.freebsd-howto.com/HOWTO/Ipfw-HOWTO)

--
Ashley


------------------------------

Message: 6
Date: Sun, 04 Apr 2010 08:25:03 -0700
From: mer...@stonehenge.com (Randal L. Schwartz)
Subject: Re: perl qstn...
To: kl...@thought.org
Cc: gla...@FreeBSD.org, FreeBSD Mailing List
<freebsd-...@FreeBSD.org>
Message-ID: <86aatjn...@red.stonehenge.com>
Content-Type: text/plain; charset=us-ascii

>>>>> "Gary" == Gary Kline <kl...@thought.org> writes:

Gary> #!/usr/bin/perl
Gary> $argc = @ARGV;
Gary> if (! $argc ) {
Gary> printf("No args; need filename.\n");
Gary> }
Gary> else {
Gary> printf("%s\n", @ARGV);
Gary> }

Even simpler:

if (@ARGV) {
print "No args\n";
} else {
print "arg is $ARGV[0]\n";
}

If you're studying perl, you might want to join the very
beginner-friendly mailing list, info at
http://lists.perl.org/list/beginners.html, or start a conversation on
perlmonks.org, also relatively beginner-friendly.

And I'd recommend a couple of good books, but I might be seen as
self-pimping. :)

But if you look at http://learn.perl.org/ you'll see a number of other
resources, including free tutorials online.

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Message: 7
Date: Sun, 04 Apr 2010 08:27:59 -0700
From: mer...@stonehenge.com (Randal L. Schwartz)
Subject: Re: perl qstn...
To: kl...@thought.org
Cc: gla...@FreeBSD.org, FreeBSD Mailing List
<freebsd-...@FreeBSD.org>
Message-ID: <861vevn...@red.stonehenge.com>
Content-Type: text/plain; charset=us-ascii

>>>>> "Randal" == Randal L Schwartz <mer...@stonehenge.com> writes:

Randal> Even simpler:

Randal> if (@ARGV) {
Randal> print "No args\n";
Randal> } else {
Randal> print "arg is $ARGV[0]\n";
Randal> }

Augh. I hit send just as I realized that's backwards. Need
more caffiene. Swap the true and false blocks there. :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Message: 8
Date: Sun, 4 Apr 2010 16:33:47 +0100
From: John <comp...@googlemail.com>
Subject: Re: freebsd-8 support for dell R710 SATA raid-0 (LSI2008)
To: krad <kra...@googlemail.com>
Cc: Adam Vande More <amvan...@gmail.com>, Varan Okul
<vara...@hotmail.com>, freebsd-...@freebsd.org,
freebsd-...@freebsd.org
Message-ID: <20100404153347.GA40823@potato>
Content-Type: text/plain; charset=us-ascii

Hi,

In the end I had to go with opensuse-11.2. I should have tried it in the
second place really, because the iDRAC has Suse enterprise as an
installation option, so it was a small leap to think of the free
version.

Here are the OSes I tried:

FreeBSD 8
FreeBSD 9
NetBSD 5.0.2
CentOS
Ubuntu 9.10 server

Basically the LSI SA2008 seems very new so it's unsurprising my
favourite OS doesn't support it. Hopefully it will in the near future,
because this card is a popular option on a popular server aimed at
small to medium sized businesses. OpenSuse-11.2 also does GPT in its
installation process. I had to raid0 the disks before they could be
seen properly though.

Current dmesg is available here: http://www.growveg.org/server/dmesg.txt
--
John - comp dot john at googlemail dot com
OpenBSD firewall | FreeBSD desktop | Ubuntu Karmic laptop
GPG: 0xF08A33C5


------------------------------

Message: 9
Date: Sun, 4 Apr 2010 09:04:44 -0600
From: Chad Perrin <per...@apotheon.com>
Subject: Re: perl qstn...
To: FreeBSD Mailing List <freebsd-...@FreeBSD.org>
Message-ID: <20100404150...@guilt.hydra>
Content-Type: text/plain; charset="us-ascii"

On Sun, Apr 04, 2010 at 08:25:03AM -0700, Randal L. Schwartz wrote:
>
> Even simpler:
>
> if (@ARGV) {
> print "No args\n";
> } else {
> print "arg is $ARGV[0]\n";
> }

As Randal noted, he accidentally swapped the conditions here. Just for
the sake of absolute clarity, I'll actually swap them:

if (@ARGV) {
print "arg is $ARGV[0]\n";
} else {
print "no args\n";
}


>
> If you're studying perl, you might want to join the very
> beginner-friendly mailing list, info at
> http://lists.perl.org/list/beginners.html, or start a conversation on
> perlmonks.org, also relatively beginner-friendly.

PerlMonks in particular is an excellent resource. I haven't been active
there recently, but when I have been active there, I've always found it
rewarding and educational. I can't recommend it enough.


>
> And I'd recommend a couple of good books, but I might be seen as
> self-pimping. :)

That's okay. I'll pimp them for you.

Learning Perl, also known as The Llama Book (because it has a llama on
the cover), is one of the all-time best beginner's books for *any*
language that I've ever encountered. I've gone through both the second
and fourth editions, and both are excellent books. I prefer the
organization of the second edition a bit, but the fourth is a trifle more
up to date and does a much better job of covering Windows-related Perl
development issues. If you're only worried about Unixy development and
execution environments, my personal recommendation would be the second
edition, though I suppose your mileage may vary.

As a follow-up to the Llama, the Alpaca book (it has an alpaca on the
cover, naturally) -- in its first edition known as Learning Perl Objects,
References, and Modules (or Perl PORM, as I like to call it), and in
later editions titled Intermediate Perl -- is also an excellent book. In
addition to teaching more about Perl in particular, it also teaches some
important general programming concepts from a Perl perspective, thus
helping broaden your understanding of programming in general.

The final member of the traditional camelid trilogy, and a great book to
tack onto the list after the Alpaca, is the Camel Book, titled
Programming Perl. It's sorta the definitive reference for Perl
programmers, and covers a lot more of the language and its philosophy
than the Llama and Alpaca, though in my opinion the Llama and Alpaca
together provide a needed introduction that the Camel only skims past
(out of necessity, really, since a hand-holding introduction isn't really
the book's purpose).

There's also Mastering Perl, which was written as a sequel to
Intermediate Perl, and I'm sure it's an excellent book. I haven't read
it, though, and know next to nothing about it, so I can't really
recommend it.

All four of the above are published by O'Reilly, and the three I've read
at least are each the kind of book that has given O'Reilly its reputation
as a purveyor of excellent technical books. Perl is blessed by an absurd
number of excellent programming books by knowledgeable authors, and there
are many more that are worth your time as well -- but in general the
above are the canonical starting steps, with others following from there
as you start figuring out what specific areas you want to give your focus
next. Unfortunately, there are also a number of really crappy Perl books
out there (many books that spell it PERL, in all-capital letters, are
among the not-so-great books), and as such I figured I should be explicit
in sharing my thoughts on the best books to get started in Perl.

Now that I've gotten so far off-topic for this list, I'll return you to
your regularly scheduled programming.


>
> But if you look at http://learn.perl.org/ you'll see a number of other
> resources, including free tutorials online.
>
> print "Just another Perl hacker,"; # the original

--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100404/221ad63d/attachment-0001.pgp

------------------------------

Message: 10
Date: Sun, 4 Apr 2010 12:45:30 -0400
From: Alejandro Imass <a...@p2ee.org>
Subject: Re: perl qstn...
To: "Randal L. Schwartz" <mer...@stonehenge.com>
Cc: gla...@freebsd.org, kl...@thought.org, FreeBSD Mailing List
<freebsd-...@freebsd.org>
Message-ID:
<j2ya14066a01004040945z3...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Apr 4, 2010 at 11:27 AM, Randal L. Schwartz
<mer...@stonehenge.com> wrote:
>>>>>> "Randal" == Randal L Schwartz <mer...@stonehenge.com> writes:
>
> Randal> Even simpler:
>
> Randal> � � if (@ARGV) {
did you mean unless? ;-)
> Randal> � � � print "No args\n";
> Randal> � � } else {
> Randal> � � � print "arg is $ARGV[0]\n";
> Randal> � � }
>
> Augh. �I hit send just as I realized that's backwards. �Need
> more caffiene. �Swap the true and false blocks there. :)
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
> _______________________________________________
> freebsd-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"
>


------------------------------

Message: 11
Date: Sun, 4 Apr 2010 13:04:12 -0400
From: Carmel NY <carm...@hotmail.com>
Subject: Re: Configuring IPFW IP range
To: freebsd-...@freebsd.org
Message-ID: <BLU0-SMTP8874335C9...@phx.gbl>
Content-Type: text/plain; charset=UTF-8

On Sun, 04 Apr 2010 11:02:29 -0400, Ashley <ash...@cpufight.com>
articulated:

> On 04/04/2010 09:11 AM, Carmel NY wrote:
> > This is my first attempt at configuring IPFW. I have it up and
> > running; however, I am not quite sure how to accomplish configuring
> > it to block an IP range.
> >
> > Assume an IP range: 219.128.0.0 to 219.137.255.255
> >
> > That is an actual range: CHINANET Guangdong province network
> >
> > I want to block the entire range. I am not sure how to do it in
> > IPFW. I have read the 'man' pages; however, I am not getting the
> > syntax correct since I cannot get the range added.
> Carmel,
>
> Have you tried something like what's mentioned in this excerpt quoted
> below?:
>
> Network-based filtering works similarly, and the network
> notation there utilizes either bitmasks or netmasks, for instance:
>
> add 2000 allow all from 192.168.0.0/16 to any
> add 2100 deny all from any to 10.0.0.0:255.0.0.0
>
> The first rule allows all traffic from the network whose IP range
> is 192.168.0.0-192.168.255.255. It uses a bitmask to indicate this. A
> bitmask specifies how many bits from the network address (192.168.0.0)
> should remain the same for matching packets. In this instance, the
> first 16 bits out of the 32 bit address will remain the same, and as
> the first 16 bits happen to be the first two octets, 192.168, all
> addresses whose source addresses have the first two octets as 192.168
> will be matched by this rule. The second rule accomplishes a similar
> thing using netmasks. The netmask indicate how many bits from the
> indicated network address should be used for rule matching. In the
> above example, for rule two, the netmask is 255.0.0.0. Its first
> octet is set with high bits; in other words, the first 8 bits are set
> high. This indicates to ipfw(8) that only packets with the first 8
> bits of the network address (10.0.0.0) should be matched. As the
> first 8 bits of the network address equal 10, then all packets whose
> destination address have a 10 for the first octet (all addresses
> between 10.0.0.0 and 10.255.255.255) will be matched by this rule,
> and then dropped, as indicated by the action.
>
>
> (This excerpt from http://www.freebsd-howto.com/HOWTO/Ipfw-HOWTO)

Thanks Maciej Suszko and Ashley. I used the ipcalc tool. I thought I
had seen something like that before; however, I was not able to recall
the name of the utility. I really have to study up on IPs and
networking.

--
Carmel
carm...@hotmail.com

|::::=======
|::::=======
|===========
|===========
|

BACHELOR: A man who chases women and never Mrs. one.


------------------------------

Message: 12
Date: Sun, 4 Apr 2010 10:33:53 -0600
From: Chad Perrin <per...@apotheon.com>
Subject: Re: perl qstn...
To: FreeBSD Mailing List <freebsd-...@freebsd.org>
Message-ID: <20100404163...@guilt.hydra>
Content-Type: text/plain; charset="iso-8859-1"

On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote:
> On Sun, Apr 4, 2010 at 11:27 AM, Randal L. Schwartz
> <mer...@stonehenge.com> wrote:
> >>>>>> "Randal" == Randal L Schwartz <mer...@stonehenge.com> writes:
> >
> > Randal> Even simpler:
> >
> > Randal> � � if (@ARGV) {
> did you mean unless? ;-)

I find "if" to be clearer than "unless" when there's an "else", so
instead of making that "if" into an "unless", I'd just swap the
conditional actions.

--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100404/8dd1e1ef/attachment-0001.pgp

------------------------------

Message: 13
Date: Sun, 4 Apr 2010 14:14:18 -0400
From: Alejandro Imass <a...@p2ee.org>
Subject: Re: perl qstn...
To: FreeBSD Mailing List <freebsd-...@freebsd.org>
Message-ID:
<y2ja14066a01004041114o3...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Apr 4, 2010 at 11:04 AM, Chad Perrin <per...@apotheon.com> wrote:
> On Sun, Apr 04, 2010 at 08:25:03AM -0700, Randal L. Schwartz wrote:
[...]
> The final member of the traditional camelid trilogy, and a great book to

Hmm, so there _are_ in fact several trilogies! <g> I would swap the
Camel for the Black Leopard anyday. Not implying that the author is
not a great writer, but the Camel book is mostly a printout of perldoc
perl <g> sure hope Larry is not on this list <lol>

> tack onto the list after the Alpaca, is the Camel Book, titled
> Programming Perl. �It's sorta the definitive reference for Perl
> programmers, and covers a lot more of the language and its philosophy
> than the Llama and Alpaca, though in my opinion the Llama and Alpaca
> together provide a needed introduction that the Camel only skims past
> (out of necessity, really, since a hand-holding introduction isn't really
> the book's purpose).
>
> There's also Mastering Perl, which was written as a sequel to
> Intermediate Perl, and I'm sure it's an excellent book. �I haven't read
> it, though, and know next to nothing about it, so I can't really
> recommend it.
>

Perhaps the Vicu�a and kids is in fact the thrid member of the
"trilogy", but the Black Leopard is a must have to become a respected
Perl hacker IMHO. Anyway, since this is all OT I started this thread
in PM for your comments: http://www.perlmonks.org/?node_id=832725


Cheers,
Alejandro Imass


------------------------------

Message: 14
Date: Sun, 4 Apr 2010 20:14:42 +0200
From: Polytropon <fre...@edvax.de>
Subject: Re: perl qstn...
To: Chad Perrin <per...@apotheon.com>
Cc: FreeBSD Mailing List <freebsd-...@freebsd.org>
Message-ID: <20100404201442....@edvax.de>
Content-Type: text/plain; charset=US-ASCII

On Sun, 4 Apr 2010 10:33:53 -0600, Chad Perrin <per...@apotheon.com> wrote:
> On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote:
> > did you mean unless? ;-)
>
> I find "if" to be clearer than "unless" when there's an "else", so
> instead of making that "if" into an "unless", I'd just swap the
> conditional actions.

A quite language-independent technical sidenote :-) ...

If your if() conditional is to test an exception, something
that you usually DON'T want to happen - i. e. missing command
line parameters - you can use the ! negation operator to
indicate this in the if() argument.

if(!@ARGV) {
print "No args\n";
exit;
}

In a short error message, you should indicate what you are
expecting, e. g. with a synopsis or a simple example (no
need for a 25 line help text here, e. g.

print "Input file name is missing.\n";
print "usage: blabla.pl <filename>\n";

or

print "Use: blabla.pl <inputfile>\n";

And you could even force perl to exit with an exit code != 0
to indicate that something happened (e. g. program wasn't run
successfully).

Now, as the "don't want case" has been considered, you can
easily continue with your program, no need to put it into
an else { } branch.


PS. I'm not familiar with perl enough to be sure that the !
operator can be used at @ARGV to make sure it's > 0,
and how or if to use exit() to set the return code.
I hardly can read perl at all, so the essence of my
examples is of a rather generic nature. :-)

--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


------------------------------

Message: 15
Date: Sun, 4 Apr 2010 21:19:19 +0400
From: pluknet <plu...@gmail.com>
Subject: Re: freebsd-8 support for dell R710 SATA raid-0 (LSI2008)
To: John <comp...@googlemail.com>
Cc: Adam Vande More <amvan...@gmail.com>, Varan Okul
<vara...@hotmail.com>, krad <kra...@googlemail.com>,
freebsd-...@freebsd.org, freebsd-...@freebsd.org
Message-ID:
<z2ya31046fc1004041019kd...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On 4 April 2010 19:33, John <comp...@googlemail.com> wrote:
> Hi,
>
> In the end I had to go with opensuse-11.2. I should have tried it in the
> second place really, because the iDRAC has Suse enterprise as an
> installation option, so it was a small leap to think of the free
> version.
>
> Here are the OSes I tried:
>
> FreeBSD 8
> FreeBSD 9
> NetBSD 5.0.2
> CentOS
> Ubuntu 9.10 server
>
> Basically the LSI SA2008 seems very new so it's unsurprising my
> favourite OS doesn't support it. Hopefully it will in the near future,
> because this card is a popular option on a popular server aimed at
> small to medium sized businesses. OpenSuse-11.2 also does GPT in its
> installation process. I had to raid0 the disks before they could be
> seen properly though.
>
> Current dmesg is available here: http://www.growveg.org/server/dmesg.txt

A wild guess it's just not listed in mfi(4) pciids table (as well as
for rest H200 family).
What if you try this?

--- sys/dev/mfi/mfi_pci.c.orig 2010-04-04 20:02:26.000000000 +0400
+++ sys/dev/mfi/mfi_pci.c 2010-04-04 20:06:17.000000000 +0400
@@ -117,6 +117,7 @@
} mfi_identifiers[] = {
{0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"},
{0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"},
+ {0x1000, 0x0072, 0x1028, 0x1f1e, MFI_FLAGS_GEN2, "Dell PERC
H200 Integrated"},
{0x1000, 0x0078, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"},
{0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2, "Dell PERC
H800 Adapter"},
{0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2, "Dell PERC
H700 Adapter"},

--
wbr,
pluknet


------------------------------

Message: 16
Date: Sun, 4 Apr 2010 14:48:14 -0400
From: Alejandro Imass <a...@p2ee.org>
Subject: Re: perl qstn...
To: Polytropon <fre...@edvax.de>
Cc: Chad Perrin <per...@apotheon.com>, FreeBSD Mailing List
<freebsd-...@freebsd.org>
Message-ID:
<o2oa14066a01004041148zd...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Apr 4, 2010 at 2:14 PM, Polytropon <fre...@edvax.de> wrote:
> On Sun, 4 Apr 2010 10:33:53 -0600, Chad Perrin <per...@apotheon.com> wrote:
>> On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote:
>> > did you mean unless? ;-)
>>
>> I find "if" to be clearer than "unless" when there's an "else", so
>> instead of making that "if" into an "unless", I'd just swap the
>> conditional actions.
>
> A quite language-independent technical sidenote :-) ...
>

<grin>

> If your if() conditional is to test an exception, something
> that you usually DON'T want to happen - i. e. missing command
> line parameters - you can use the ! negation operator to
> indicate this in the if() argument.
>

_precisely_ what unless is for. it's just a funny way of writing
if(!... or should I say if(! is a funny way to write unless ;-)

But honestly pun aside unless(){} is far more readable than if(!){}
and _especially_ if you are programming in an exception manner as you
correctly point out. Every language should have an unless construct.

[...]
> And you could even force perl to exit with an exit code != 0
> to indicate that something happened (e. g. program wasn't run
> successfully).
>

a good practice in any language...

> Now, as the "don't want case" has been considered, you can
> easily continue with your program, no need to put it into
> an else { } branch.
>

ahh! the clarity of unless

>
>
>
> PS. I'm not familiar with perl enough to be sure that the !
> � �operator can be used at @ARGV to make sure it's > 0,

In "scalar context" will automagically return the number of elements

perldoc perlintro (section Perl variable types)

> � �and how or if to use exit() to set the return code.

die "Bailing cause you forgot the filename" unless @ARGV

Yes, that _is_ actual code :) Will not only die with a pretty message
on STDERR but will return the value of $! (errno) as exit value. (no
need to make up exit codes) Good thing we are on a FBSD list, because
I can't see the sense of programming in a non-nix environment ;-)

> � �I hardly can read perl at all, so the essence of my
> � �examples is of a rather generic nature. :-)

Look mommi! Reading Perl is just like reading plain english! (or in
Nigerian spam for that matter
http://search.cpan.org/~jwalt/Acme-Lingua-NIGERIAN-1.0.0/NIGERIAN.pm)

Cheers,
Alejandro Imass

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


------------------------------

Message: 17
Date: Sun, 4 Apr 2010 15:01:46 -0400
From: Alejandro Imass <a...@p2ee.org>
Subject: Re: perl qstn...
To: "Randal L. Schwartz" <mer...@stonehenge.com>
Cc: gla...@freebsd.org, kl...@thought.org, FreeBSD Mailing List
<freebsd-...@freebsd.org>
Message-ID:
<x2ka14066a01004041201m6...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Apr 4, 2010 at 11:25 AM, Randal L. Schwartz
<mer...@stonehenge.com> wrote:
>>>>>> "Gary" == Gary Kline <kl...@thought.org> writes:
[...]

> And I'd recommend a couple of good books, but I might be seen as
> self-pimping. :)
>
> But if you look at http://learn.perl.org/ you'll see a number of other
> resources, including free tutorials online.
>

The "trilogy" is a must-have regardless if you are beginner
intermediate or advanced, and regardless of who wrote them ;-)

- Learning Perl
- Intermediate Perl
- Advanced Perl Programming

Of course, the Camel book (Programming Perl), and Perl Best Practices
which IMHO is a must read for _any_ language but especially for Perl
hackers. More here: http://oreilly.com/pub/topic/perl

Best,
Alejandro Imass

> print "Just another Perl hacker,"; # the original
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
> _______________________________________________
> freebsd-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"
>


------------------------------

Message: 18
Date: Sun, 4 Apr 2010 13:39:51 -0700
From: Gary Kline <kl...@thought.org>
Subject: Re: perl qstn...
To: "Randal L. Schwartz" <mer...@stonehenge.com>
Cc: gla...@FreeBSD.org, FreeBSD Mailing List
<freebsd-...@FreeBSD.org>
Message-ID: <20100404203...@thought.org>
Content-Type: text/plain; charset=us-ascii

On Sun, Apr 04, 2010 at 08:25:03AM -0700, Randal L. Schwartz wrote:
> >>>>> "Gary" == Gary Kline <kl...@thought.org> writes:
>
> Gary> #!/usr/bin/perl
> Gary> $argc = @ARGV;
> Gary> if (! $argc ) {
> Gary> printf("No args; need filename.\n");
> Gary> }
> Gary> else {
> Gary> printf("%s\n", @ARGV);
> Gary> }
>
> Even simpler:
>
> if (@ARGV) {
> print "No args\n";
> } else {
> print "arg is $ARGV[0]\n";
> }
>
> If you're studying perl, you might want to join the very
> beginner-friendly mailing list, info at
> http://lists.perl.org/list/beginners.html, or start a conversation on
> perlmonks.org, also relatively beginner-friendly.
>
> And I'd recommend a couple of good books, but I might be seen as
> self-pimping. :)


hey man, pimp away! we'll all learn a few tricks. ---i had
to teach myself perl around '96 and bought a couple books,
one with a floppy full of short programs. After doing a
find . -name "*" -exec head -15 {} \; | more thru the
truckload of these nifties, i finally came across the "$argc"
idea.

there are around a dozen no-longer-throwaways that need the
kind of no-arg tip just to make the scripts more user
friendly. even tho i'm the Only person who'll ever use them.

---Maybe you can clue me in on this one: around a dozen years
ago i somw found a recursive grep named tgrep online. to save
tying, i renamed it "rgr". i can start anywhere and 'rgr pattern'
--WITHOUT ANY ASTERISK-- will find any pattern and skip
binary or tarballs or compressed files. given this, rgr has
become my favorite utility, but since it doesn't have All of grep's
options, yes, it's tru e, there are times whrn i have to use
the real thing. i have searched for tgrep and cannot find a
newer more complete version. would you or anyone reading
this know where an upgraded version is?

Here is the Usage string:


p4 13:07 <tao> [5524] rgr
Usage: tgrep [-iredblLnf] regexp filepat ...
tgrep -h for help

if not for trgep/rgr my shoulder would've fallen off and just
laid on the floor; that's how much i use this script. having
the 'w' switch would be nice, so would the -N switch.


>
> But if you look at http://learn.perl.org/ you'll see a number of other
> resources, including free tutorials online.


tx for the pointer; i'll add it to my bookmarks.

gary

>
> print "Just another Perl hacker,"; # the original
>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

------------------------------

Message: 19
Date: Sun, 4 Apr 2010 10:58:35 -1000
From: pa...@pair.com
Subject: Re: perl qstn...
To: Gary Kline <kl...@thought.org>
Cc: gla...@FreeBSD.org, FreeBSD Mailing List
<freebsd-...@FreeBSD.org>, "Randal L. Schwartz"
<mer...@stonehenge.com>
Message-ID: <20100404205...@holstein.holy.cow>
Content-Type: text/plain; charset=us-ascii

in message <20100404203...@thought.org>,
wrote Gary Kline thusly...
>
> ---Maybe you can clue me in on this one: around a dozen years ago
> i somw found a recursive grep named tgrep online. to save tying,
> i renamed it "rgr". i can start anywhere and 'rgr pattern'
> --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or
> tarballs or compressed files. given this, rgr has become my
> favorite utility, but since it doesn't have All of grep's
> options, yes, it's tru e, there are times whrn i have to use the
> real thing. i have searched for tgrep and cannot find a newer
> more complete version. would you or anyone reading this know
> where an upgraded version is?
>
> Here is the Usage string:
>
> p4 13:07 <tao> [5524] rgr
> Usage: tgrep [-iredblLnf] regexp filepat ...
> tgrep -h for help
>
>
> if not for trgep/rgr my shoulder would've fallen off and just
> laid on the floor; that's how much i use this script. having the
> 'w' switch would be nice, so would the -N switch.

What does "-N" do in grep included with FreeBSD? My version
(FreeBSD 8) only has "-n".

I know of one tcgrep (by Tom Christiansen) ...

http://www.perl.com/CPAN/authors/id/TOMC/scripts/tcgrep.gz


Then, there is ack ...

http://search.cpan.org/dist/ack/ack


... may need to tinker with option to search non-Perl files (see -a
option).

Or, simply ...

#!/bin/sh

# If your particular egrep is laced with potent PCRE, may use -P
# option (before "$@") to specify Perl regex.
egrep -r $@ .


- parv

--

------------------------------

Message: 20
Date: Sun, 4 Apr 2010 15:00:09 -0600
From: Tim Judd <taj...@gmail.com>
Subject: Re: Support for Zotac MB with nVidia ION chipset
To: Jeremie Le Hen <jer...@le-hen.org>
Cc: freebsd-...@freebsd.org
Message-ID:
<q2yade45ae91004041400z1...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On 4/4/10, Jeremie Le Hen <jer...@le-hen.org> wrote:
> Hi,
>
> --->> Please Cc: me when replying, I'm not subscribed. <<---
>
> I plan to purchase a Zotac motherboard with a embedded ATOM processor.
> It uses an NVidia chipset.
>
> http://www.zotacusa.com/zotac-ionitx-f-e-atom-n330-1-6ghz-dual-core-mini-itx-intel-motherboard.html
>
> My intent is to build a small NAS with ZFS and NFS/CIFS. I'd like to
> know if anyone successfully ran FreeBSD on this motherboard and what
> performance could be achieved, especially if ZFS is used. I checked the
> archives without luck.
>
> Thanks!
> --
> Jeremie Le Hen


A NAS w/ ZFS, NFS and CIFS/SMB, doesn't need any feature of the ion
chipset. Why are you electing for this board if you're not running
any graphical environment?

And ZFS is memory hungry, the Atom is a i386-like chip, so you'd have
too much overhead with ZFS.


I think you've elected the wrong board for your purposes. Will
FreeBSD run on it? yes. I have freebsd on another atom N-series ASUS
box.

--Tim


------------------------------

Message: 21
Date: Sun, 4 Apr 2010 21:04:35 +0000 (UTC)
From: Marcin Wisnicki <mwisnick...@gmail.com>
Subject: SSH root login with keys only
To: freebsd-...@freebsd.org
Message-ID: <hpaut3$4gl$1...@dough.gmane.org>
Content-Type: text/plain; charset=UTF-8

Is it possible to configure sshd such that both conditions are met:

1. Root will be able to login only by using keys
2. Normal users will still be able to use pam/keyboard-interactive

------------------------------

Message: 22
Date: Sun, 4 Apr 2010 14:33:02 -0700
From: Gary Kline <kl...@thought.org>
Subject: Caution:: Off-topic Re: perl qstn...
To: Alejandro Imass <a...@p2ee.org>
Cc: gla...@freebsd.org, FreeBSD Mailing List
<freebsd-...@freebsd.org>, "Randal L. Schwartz"
<mer...@stonehenge.com>
Message-ID: <20100404213...@thought.org>
Content-Type: text/plain; charset=iso-8859-1

On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote:
> On Sun, Apr 4, 2010 at 11:27 AM, Randal L. Schwartz
> <mer...@stonehenge.com> wrote:
> >>>>>> "Randal" == Randal L Schwartz <mer...@stonehenge.com> writes:
> >
> > Randal> Even simpler:
> >
> > Randal> � � if (@ARGV) {
> did you mean unless? ;-)
> > Randal> � � � print "No args\n";
> > Randal> � � } else {
> > Randal> � � � print "arg is $ARGV[0]\n";
> > Randal> � � }
> >
> > Augh. �I hit send just as I realized that's backwards. �Need
> > more caffiene. �Swap the true and false blocks there. :)


just having my 77th mug of french roast, so i'm hip.
...Anyway, here's one i'v been wanting to ask for years but
don't know where to pose. Is C dead? i mean, since it's
been "official" for years, can C add things like the unless
keyword? Can C include the perl regex packages?

if i asked this anywhere else, they would send out the men in
white coats an d haul me away. here i'm safe:)

anybody know if we need a new C [[maybe D]] that would be
allowed to grow?

gary


> >
> > --
> > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> > <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
> > Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
> > See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
> > _______________________________________________
> > freebsd-...@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"
> >
> _______________________________________________
> freebsd-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"

--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

------------------------------

Message: 23
Date: Sun, 4 Apr 2010 23:54:55 +0200
From: Jeremie Le Hen <jer...@le-hen.org>
Subject: Re: Intel D945GSE vs Zotac ION ITX (was: Support for Zotac MB
with nVidia ION chipset)
To: Tim Judd <taj...@gmail.com>
Cc: Jeremie Le Hen <jer...@le-hen.org>,
freebsd-...@freebsd.org, freebsd-...@freebsd.org
Message-ID: <20100404215...@felucia.tataz.chchile.org>
Content-Type: text/plain; charset=us-ascii

Hi,

--->> Cc: me when replying, as I'm not subscribed. <<---

I cross-post this reply to freebsd-hardware@ since the result of my
little study around Atom-based motherboard may be of interest for
readers of this ML too.

On Sun, Apr 04, 2010 at 03:00:09PM -0600, Tim Judd wrote:
> On 4/4/10, Jeremie Le Hen <jer...@le-hen.org> wrote:
> > Hi,
> >
> > --->> Please Cc: me when replying, I'm not subscribed. <<---
> >
> > I plan to purchase a Zotac motherboard with a embedded ATOM processor.
> > It uses an NVidia chipset.
> >
> > http://www.zotacusa.com/zotac-ionitx-f-e-atom-n330-1-6ghz-dual-core-mini-itx-intel-motherboard.html
> >
> > My intent is to build a small NAS with ZFS and NFS/CIFS. I'd like to
> > know if anyone successfully ran FreeBSD on this motherboard and what
> > performance could be achieved, especially if ZFS is used. I checked the
> > archives without luck.
>
> A NAS w/ ZFS, NFS and CIFS/SMB, doesn't need any feature of the ion
> chipset. Why are you electing for this board if you're not running
> any graphical environment?
>
> And ZFS is memory hungry, the Atom is a i386-like chip, so you'd have
> too much overhead with ZFS.
>
> I think you've elected the wrong board for your purposes. Will
> FreeBSD run on it? yes. I have freebsd on another atom N-series ASUS
> box.

Yeah, you are right. I should have mentionned that I do not want
necessarily a high-performance NAS, it's for home use so my premary
concern is the low power consumption. This is why I want an Atom-based
motherboard. By the way, I found an post on OpenSolaris forums where
the author achieves something like 35MB/s on a ZFS filesystem through
CIFS using an Intel Atom-based motherboard [1]. This is enough for the
use I intend to have.

Zotac mobo is better than Intel D954GSE because it provides a wireless
interface - although I couldn't figure out which chipset yet, so I don't
know if it's corretly supported on FreeBSD - and three S-ATA connectors.

I'm still not sure about which motherboard to buy actually. After some
additional reading, my leaning seems to go towards Intel's one as it is
less expensive and consumes half the power of the Zotac's one (13W with
a HDD [2] vs. 25W [3]). I can live with two S-ATA connectors and I can
plug a wireless interface on the available PCI connector if I ever need
it.

Regards,

[1] http://mail.opensolaris.org/pipermail/opensolaris-discuss/2009-June/048214.html
[2] http://www.homeserverhacks.com/2009/06/hands-on-whs-build-with-intel-d945gsejt.html
[3] http://www.anandtech.com/show/2765/12
--
Jeremie Le Hen

Humans are born free and equal. But some are more equal than others.
Coluche


------------------------------

Message: 24
Date: Sun, 4 Apr 2010 15:13:49 -0700
From: Gary Kline <kl...@thought.org>
Subject: Re: perl qstn...
To: "Randal L. Schwartz" <mer...@stonehenge.com>, gla...@FreeBSD.org,
FreeBSD Mailing List <freebsd-...@FreeBSD.org>
Message-ID: <20100404221...@thought.org>
Content-Type: text/plain; charset=us-ascii

On Sun, Apr 04, 2010 at 10:58:35AM -1000, pa...@pair.com wrote:
> in message <20100404203...@thought.org>,
> wrote Gary Kline thusly...
> >
> > ---Maybe you can clue me in on this one: around a dozen years ago
> > i somw found a recursive grep named tgrep online. to save tying,
> > i renamed it "rgr". i can start anywhere and 'rgr pattern'
> > --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or
> > tarballs or compressed files. given this, rgr has become my
> > favorite utility, but since it doesn't have All of grep's
> > options, yes, it's tru e, there are times whrn i have to use the
> > real thing. i have searched for tgrep and cannot find a newer
> > more complete version. would you or anyone reading this know
> > where an upgraded version is?
> >
> > Here is the Usage string:
> >
> > p4 13:07 <tao> [5524] rgr
> > Usage: tgrep [-iredblLnf] regexp filepat ...
> > tgrep -h for help
> >
> >
> > if not for trgep/rgr my shoulder would've fallen off and just
> > laid on the floor; that's how much i use this script. having the
> > 'w' switch would be nice, so would the -N switch.
>
> What does "-N" do in grep included with FreeBSD? My version
> (FreeBSD 8) only has "-n".


Sorry, my bad. I should have said that "N" was any positive
integer. Sometimes I'll be searching for a phrase that i'm
not certain of and will type grep -7 PATTERN file[s] where
PATTERN is a known. I'll pipe around for various other
strings.
>
> I know of one tcgrep (by Tom Christiansen) ...
>
> http://www.perl.com/CPAN/authors/id/TOMC/scripts/tcgrep.gz
>
>
> Then, there is ack ...
>
> http://search.cpan.org/dist/ack/ack
>
>
> ... may need to tinker with option to search non-Perl files (see -a
> option).
>
> Or, simply ...
>
> #!/bin/sh
>
> # If your particular egrep is laced with potent PCRE, may use -P
> # option (before "$@") to specify Perl regex.
> egrep -r $@ .
>


this tgrep is from the NL; by a Prof Piet van Oostrum and is
dated 5/19/93. i think ii wrote this fellow many years ago.
Zip. I'll ck out ack when i'm using a gui mailer, thanks.

gary


>
> - parv
>
> --
>

--
Gary Kline kl...@thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 7.79a release of Jottings: http://jottings.thought.org/index.php

------------------------------

Message: 25
Date: Mon, 5 Apr 2010 00:14:48 +0200
From: "C. P. Ghost" <cpg...@cordula.ws>
Subject: Re: Caution:: Off-topic Re: perl qstn...
To: Gary Kline <kl...@thought.org>
Cc: freebsd-...@freebsd.org
Message-ID:
<l2md74eb87c1004041514n5...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Apr 4, 2010 at 11:33 PM, Gary Kline <kl...@thought.org> wrote:
> Can C include the perl regex packages?

Yes! Just use PCRE. Or, if you prefer C++, Boost.Regex:

http://www.pcre.org/
http://www.boost.org/doc/libs/1_42_0/libs/regex/doc/html/index.html

--
Cordula's Web. http://www.cordula.ws/


------------------------------

Message: 26
Date: Sun, 4 Apr 2010 23:49:59 +0200
From: Julian Fagir <gn...@gnrp.in-berlin.de>
Subject: Re: SSH root login with keys only
To: freebsd-...@freebsd.org
Message-ID: <20100404234959.23966b02@eselhitler>
Content-Type: text/plain; charset=US-ASCII

Hi,

> Is it possible to configure sshd such that both conditions are met:
>
> 1. Root will be able to login only by using keys
> 2. Normal users will still be able to use pam/keyboard-interactive

perhaps the sshd-option "PermitRootLogin" does match your requirements.
To be found in sshd_config (5).


Regards, Julian


------------------------------

Message: 27
Date: Sun, 4 Apr 2010 23:25:56 +0100
From: krad <kra...@googlemail.com>
Subject: Re: SSH root login with keys only
To: Julian Fagir <gn...@gnrp.in-berlin.de>
Cc: freebsd-...@freebsd.org
Message-ID:
<i2hd36406631004041525j2...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On 4 April 2010 22:49, Julian Fagir <gn...@gnrp.in-berlin.de> wrote:

> Hi,
>
> > Is it possible to configure sshd such that both conditions are met:
> >
> > 1. Root will be able to login only by using keys
> > 2. Normal users will still be able to use pam/keyboard-interactive
>
> perhaps the sshd-option "PermitRootLogin" does match your requirements.
> To be found in sshd_config (5).
>
>
> Regards, Julian
> _______________________________________________
> freebsd-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questi...@freebsd.org"
>

Why do you need to do this? It is generally a bad thing to allow. Why not
use su or sudo?


------------------------------

Message: 28
Date: Mon, 05 Apr 2010 01:25:09 +0200
From: Erik Norgaard <norg...@locolomo.org>
Subject: Re: SSH root login with keys only
To: freebsd-...@freebsd.org
Message-ID: <4BB91FD5...@locolomo.org>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 04/04/10 23:04, Marcin Wisnicki wrote:
> Is it possible to configure sshd such that both conditions are met:
>
> 1. Root will be able to login only by using keys
> 2. Normal users will still be able to use pam/keyboard-interactive

Yes, you can create a Match block with the criteria User, something like
this I guess will work (haven't tested):

PermitRootLogin yes
Match User root
PasswordAuthentication no

check the man page. You might also want to restrict from where root can
login with another match block.

I assume that you have decided root login is acceptable with the
increased security of key authentication. Just beware that the key must
be password protected.

BR, Erik
--
Erik Nørgaard
Ph: +34.666334818/+34.915211157 http://www.locolomo.org


------------------------------

Message: 29
Date: Mon, 05 Apr 2010 00:27:20 +0100
From: Craig Butler <crai...@lerwick.hopto.org>
Subject: Re: SSH root login with keys only
To: Marcin Wisnicki <mwisnick...@gmail.com>
Cc: freebsd-...@freebsd.org
Message-ID: <4BB92058...@lerwick.hopto.org>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 04/04/2010 22:04, Marcin Wisnicki wrote:
> Is it possible to configure sshd such that both conditions are met:
>
> 1. Root will be able to login only by using keys
>
Yes
> 2. Normal users will still be able to use pam/keyboard-interactive
>
Yes

see PermitRootLogin section in man sshd_config...

/Craig B


------------------------------

Message: 30
Date: Sun, 4 Apr 2010 23:35:13 +0000 (UTC)
From: Marcin Wisnicki <mwisnick...@gmail.com>
Subject: Re: SSH root login with keys only
To: freebsd-...@freebsd.org
Message-ID: <hpb7nh$csf$1...@dough.gmane.org>
Content-Type: text/plain; charset=UTF-8

On Mon, 05 Apr 2010 01:25:09 +0200, Erik Norgaard wrote:

> On 04/04/10 23:04, Marcin Wisnicki wrote:
>> Is it possible to configure sshd such that both conditions are met:
>>
>> 1. Root will be able to login only by using keys 2. Normal users will
>> still be able to use pam/keyboard-interactive
>
> Yes, you can create a Match block with the criteria User, something like
> this I guess will work (haven't tested):
>
> PermitRootLogin yes
> Match User root
> PasswordAuthentication no
>
> check the man page. You might also want to restrict from where root can
> login with another match block.
>

PasswordAuthentication is already disabled (by default).
I need to disable ChallengeResponseAuthentication however:

/etc/ssh/sshd_config line 131: Directive 'ChallengeResponseAuthentication'
is not allowed within a Match block

Same thing for "UsePAM no" (though I would like to keep pam for accounting
and session management)

> I assume that you have decided root login is acceptable with the
> increased security of key authentication. Just beware that the key must
> be password protected.
>
> BR, Erik


------------------------------

Message: 31
Date: Sun, 4 Apr 2010 23:39:15 +0000 (UTC)
From: Marcin Wisnicki <mwisnick...@gmail.com>
Subject: Re: SSH root login with keys only
To: freebsd-...@freebsd.org
Message-ID: <hpb7v3$csf$2...@dough.gmane.org>
Content-Type: text/plain; charset=UTF-8

On Sun, 04 Apr 2010 23:49:59 +0200, Julian Fagir wrote:

> Hi,
>
>> Is it possible to configure sshd such that both conditions are met:
>>
>> 1. Root will be able to login only by using keys 2. Normal users will
>> still be able to use pam/keyboard-interactive
>
> perhaps the sshd-option "PermitRootLogin" does match your requirements.
> To be found in sshd_config (5).
>

Unfortunately it doesn't. Assuming you mean 'without-password' option,
I would have to disable ChallengeResponseAuthentication for everyone
which I would like to avoid.
It is not possible to disable ChallengeResponseAuthentication inside
match block.

------------------------------


End of freebsd-questions Digest, Vol 304, Issue 13
**************************************************

0 new messages