Re: Access guard

2013-07-07 Thread Helmut Schneider
Jos Chrispijn wrote:

 I am looking for a program that watches login attempts (mail and ssh
 login) and blocks the ip address after xx failed attempts.  Currently
 I am using ipfw - might be great if that program works with ipw too...

fail2ban

___
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


Trying to update from 9.0 to 9.1 via svn

2013-01-04 Thread Helmut Schneider
Hi,

I fetched sources via

$ sudo svn co svn://svn.freebsd.org/base/releng/9.1 /usr/src/
Checked out revision 244992.
$

I then recompiled and installed the kernel according to

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html

$ ls -la /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  15622342 Jan  3 19:57 /boot/kernel/kernel
$

But after reboot uname prints

FreeBSD BSDHelmut964 9.0-RELEASE-p5 FreeBSD 9.0-RELEASE-p5 #9 r244992M:
Thu Jan  3 19:57:37 CET 2013
root@BSDHelmut964:/usr/obj/usr/src/sys/GENERIC  amd64

Why?

Thanks, Helmut

___
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: Trying to update from 9.0 to 9.1 via svn

2013-01-04 Thread Helmut Schneider
Alexandre wrote:

 On Fri, Jan 4, 2013 at 2:01 PM, Helmut Schneider jumpe...@gmx.de
 wrote:
  
  I fetched sources via
  
  $ sudo svn co svn://svn.freebsd.org/base/releng/9.1 /usr/src/
  Checked out revision 244992.
  $
  
  I then recompiled and installed the kernel according to
  
  
 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html
  
  $ ls -la /boot/kernel/kernel
  -r-xr-xr-x  1 root  wheel  15622342 Jan  3 19:57 /boot/kernel/kernel
  $
  
  But after reboot uname prints
  
  FreeBSD BSDHelmut964 9.0-RELEASE-p5 FreeBSD 9.0-RELEASE-p5 #9
  r244992M:  Thu Jan  3 19:57:37 CET 2013
  root@BSDHelmut964:/usr/obj/usr/src/sys/GENERIC  amd64
  
  Why?
  
  Thanks, Helmut
 
 Have you rebuilt world before compile and install your new 9.1 kernel
 ?

Yes.

___
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: Trying to update from 9.0 to 9.1 via svn

2013-01-04 Thread Helmut Schneider
Trond Endrestøl wrote:

 On Fri, 4 Jan 2013 15:51-, Helmut Schneider wrote:
 
  Alexandre wrote:
  
   On Fri, Jan 4, 2013 at 2:01 PM, Helmut Schneider jumpe...@gmx.de
   wrote:

I fetched sources via

$ sudo svn co svn://svn.freebsd.org/base/releng/9.1 /usr/src/
Checked out revision 244992.
$

I then recompiled and installed the kernel according to



 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html

$ ls -la /boot/kernel/kernel
-r-xr-xr-x  1 root  wheel  15622342 Jan  3 19:57
/boot/kernel/kernel $

But after reboot uname prints

FreeBSD BSDHelmut964 9.0-RELEASE-p5 FreeBSD 9.0-RELEASE-p5 #9
r244992M:  Thu Jan  3 19:57:37 CET 2013
root@BSDHelmut964:/usr/obj/usr/src/sys/GENERIC  amd64

Why?

Thanks, Helmut
   
   Have you rebuilt world before compile and install your new 9.1
   kernel ?
  
  Yes.
 
 I have a question:
 
 Was /usr/src populated with 9.0 sources prior to the svn operation?
 
 If you have the time and bandwidth, I would delete everything inside 
 /usr/src, e.g.
 
   rm -Rf /usr/src/* /usr/src/.??*
 
 and retry the checkout, i.e.
 
 sudo svn co svn://svn.freebsd.org/base/releng/9.1 /usr/src

Did so, too. It's so frustrating, I mean, I compile kernel and world
since 6.0 and never had similar issues. What makes me a bit nervous is
that this happens on two different machines. And why is the revision
(r244992) of the kernel ident higher than the release revision
(r243710[1])?

http://svnweb.freebsd.org/base/

___
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: Trying to update from 9.0 to 9.1 via svn

2013-01-04 Thread Helmut Schneider
Trond Endrestøl wrote:

 BTW, do you nuke the contents of /usr/obj prior to recompiling the 
 system? The command rm -Rf /usr/obj/* should accomplish this rather 
 well.

That might have been the issue, yes. Works now. Thanks.

___
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: gPXE booting FreeBSD?

2012-12-04 Thread Helmut Schneider
Rick Miller wrote:

 Does anyone have any experience booting FreeBSD via gPXE and have
 pointers to relevant documentation and/or blog posts?

I use mfsBSD (http://mfsbsd.vx.sk/) and pxelinux.

DEFAULT boot/menu.c32

PROMPT 0
TIMEOUT 0

MENU TITLE network boot menu - FreeBSD

LABEL ^1 - mfsBSD 8.2 i386 (user=root pass=mfsroot)
KERNEL boot/memdisk
APPEND raw initrd=FreeBSD/8.2/i386/mfsboot.img

LABEL ^2 - mfsBSD 8.2 i386 mini (user=root pass=mfsroot)
KERNEL boot/memdisk
APPEND raw initrd=FreeBSD/8.2/i386/mfsboot_mini.img

LABEL ^3 - mfsBSD 8.2 amd64 (user=root pass=mfsroot)
KERNEL boot/memdisk
APPEND raw initrd=FreeBSD/8.2/amd64/mfsboot.img

LABEL ^4 - mfsBSD 8.2 amd64 mini (user=root pass=mfsroot)
KERNEL boot/memdisk
APPEND raw initrd=FreeBSD/8.2/amd64/mfsboot_mini.img

LABEL back
KERNEL boot/menu.c32
APPEND pxelinux.cfg/default

HTH, Helmut

___
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: svn and/or portsnap

2012-09-11 Thread Helmut Schneider
Thomas Mueller wrote:

 On Sun, 9 Sep 2012 10:37:03 + (UTC), Helmut Schneider wrote:
  Hi,
 
  I'm running a custom kernel so I (guess I) need svn in future to
  fetch sources instead of cvsup. Should I still use portsnap then
  for ports or also fetch them via svn?
 
 Polytropon responded:
 
  Ports and system sources are managed independently. You can
  use whatever tool you want. Note that portsnap might not
  deliver the most current ports tree for a given point in
  time. For short time deltas, CVS has often proven to be
  the better tool, but of course portsnap has significant
  advantages (e. g. faster for longer pauses between ports
  tree updates, better integration with make update target).
  Depending on your updating habits, choose the tool that
  works best for you.
 
 One question comes up that I didn't think of immediately.
 
 How do you use svn on a fresh install of FreeBSD, no ports yet?

You install ports from CD/DVD. Or use pkg_add -r subversion. :)

 svn/subversion is not part of the base system.
 
 How do you get the ports tree or svn in that case if not using
 portsnap?

ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports/

___
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


svn and/or portsnap

2012-09-09 Thread Helmut Schneider
Hi,

I'm running a custom kernel so I (guess I) need svn in future to fetch
sources instead of cvsup. Should I still use portsnap then for ports or
also fetch them via svn?

Thanks, Helmut

___
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: svn and/or portsnap

2012-09-09 Thread Helmut Schneider
Polytropon wrote:

 On Sun, 9 Sep 2012 10:37:03 + (UTC), Helmut Schneider wrote:
  Hi,
  
  I'm running a custom kernel so I (guess I) need svn in future to
  fetch sources instead of cvsup. Should I still use portsnap then
  for ports or also fetch them via svn?
 
 Ports and system sources are managed independently. You can
 use whatever tool you want.

The question should read: If I need to install svn anyway, is there an
advantage of portsnap over svn to fetch ports.

 Note that portsnap might not deliver the most current ports tree
 for a given point in time. For short time deltas, CVS has often
 proven to be the better tool, but of course portsnap has significant
 advantages (e. g. faster for longer pauses between ports
 tree updates, better integration with make update target).
 Depending on your updating habits, choose the tool that
 works best for you.

Currently I'm updating ports and src twice a day so I will keep using
svn for both.

Thanks.

___
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: svn and/or portsnap

2012-09-09 Thread Helmut Schneider
C. P. Ghost wrote:

 On Sun, Sep 9, 2012 at 1:26 PM, Helmut Schneider jumpe...@gmx.de
 wrote:
  Currently I'm updating ports and src twice a day so I will keep
  using svn for both.
 
 While you certainly can, isn't it a bit excessive to update so
 frequently?  Remember, it's not just fetching the sources and ports,
 you must also compile world and ports if you want to stay current. I
 highly doubt that you want to do this twice a day, even on a very
 fast machine.

I meant I fetch sources for src and ports twice a day. While ports
helps me to track most recent changes src indeed might not require an
update twice a day.

___
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: Execute at login

2011-09-27 Thread Helmut Schneider
Polytropon wrote:

 On Mon, 26 Sep 2011 20:41:43 + (UTC), Helmut Schneider wrote:
  Hi,
  
  which options do I have to execute at login?
  
  I would like to implement something like update-motd [1] without
  actually modifying /etc/motd. The code snippet is
  
  if [ -d /etc/motd.d ]; then
for FILE in /etc/motd.d/*; do
  [ -x ${FILE} ]  ${FILE}
done
  fi
  
  It should be executed for all users but only at login (regardless if
  she/he logs in via console or ssh). It also should be independent of
  the login shell. Therefore neither /etc/profile nor ~/.profile nor
  ~/.login seem suitable.
  
  Where can I put that code? The content of /etc/motd.d/ can change
  anytime.
 
 I'm not sure if this works, but maybe something like this
 can be an idea to create a comparable solution:
 
 You can (ab)use the login shell property of /etc/passwd
 to give all users a login shell that is the above script
 which then executes the real login shell for the users
 (I assume this will be either bash or csh).
 
 See man 5 passwd for details.
 
 However, this approach can cause trouble in combination with
 chsh. It also doesn't seem to be limited to interactive logins,
 so there should be some test in the script to check if the
 current shell is in dialog mode
 
 For csh, this can be done by
 
   if ($?prompt) then
   ... interactive shell stuff ...
   endif
 
 But again, this does not apply to different login shells.
 
 An idea to compensate this could be to employ login.conf
 instead, per the shell environmental setting. This seems
 to override the shell defined in /etc/passwd (which can be
 subject to a chsh call).
 
 See man 5 login.conf for details.
 
 The script mentioned above could therefore include the
 following steps:
 
   1. determinate kind of shell:
  in case of interactive shell, continue
 
   2. check for motd.d functionality:
  if /etc/motd.d/ exists and has executable files
  in it, execute them (basically your script concept)
 
   3. determine user's dialog shell
  read /etc/passwd and start the user's dialog shell
  by exec shellname
 
 You can write this in any (shell) script language you want.
 I would suggest plain #!/bin/sh syntax.

Thanks for that, but I prefer a straighter way. :) It seems someone
had the same idea before:

http://cvsup6.freebsd.org/pub/FreeBSD/development/FreeBSD-CVS/src/contrib/libpam/modules/pam_motd/Attic/

Anyone knows why it was discontinued?

___
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


Execute at login

2011-09-26 Thread Helmut Schneider
Hi,

which options do I have to execute at login?

I would like to implement something like update-motd [1] without
actually modifying /etc/motd. The code snippet is

if [ -d /etc/motd.d ]; then
  for FILE in /etc/motd.d/*; do
[ -x ${FILE} ]  ${FILE}
  done
fi

It should be executed for all users but only at login (regardless if
she/he logs in via console or ssh). It also should be independent of
the login shell. Therefore neither /etc/profile nor ~/.profile nor
~/.login seem suitable.

Where can I put that code? The content of /etc/motd.d/ can change
anytime.

Thanks, Helmut

[1] https://wiki.ubuntu.com/UpdateMotd

___
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


Safe to use GPT within gmirror?

2011-04-25 Thread Helmut Schneider
Hi,

can I safely use GPTs within a GEOM_MIRROR?

I created a new mirror and then used gpart to create additinal
partitions. dmesg gives:

the secondary GPT header is not in the last LBA

As far as I read by now it seems safe to ignore that message but I want
to get sure.

Or are mirrored GPTs only safe when using ZFS?

Thanks, Helmut

___
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


gpart questions

2011-04-24 Thread Helmut Schneider
Hi,

i'm playing around with (virtual) disks within a VMware ESXi 4.1 server:

[root@BSDHelmut864 ~]# uname -rsim
FreeBSD 8.2-RELEASE amd64 GENERIC
[root@BSDHelmut864 ~]# sysctl kern.geom.debugflags=17
kern.geom.debugflags: 17 - 17
[root@BSDHelmut864 ~]# gpart destroy da1
da1 destroyed
[root@BSDHelmut864 ~]# gpart list da1
gpart: No such geom: da1.
[root@BSDHelmut864 ~]#

OK, the disk is empty, now create a new scheme:

[root@BSDHelmut864 ~]# gpart create -s mbr da1
da1 created
[root@BSDHelmut864 ~]# gpart show da1
=   63  156301425  da1  MBR  (75G)
 63  156301425   - free -  (75G)

[root@BSDHelmut864 ~]# gpart list da1
Geom name: da1
state: OK
fwheads: 255
fwsectors: 63
last: 156301487
first: 63
entries: 4
scheme: MBR
Consumers:
1. Name: da1
   Mediasize: 80026361856 (75G)
   Sectorsize: 512
   Mode: r0w0e0

[root@BSDHelmut864 ~]#

Now create a new slice of ~21GB:

[root@BSDHelmut864 ~]# gpart add -b 63 -s $(echo 21500*1024*2+63 | bc)
-t freebsd da1
da1s1 added
[root@BSDHelmut864 ~]#

But - where is it?

[root@BSDHelmut864 ~]# gpart show da1s1
gpart: No such geom: da1s1.
[root@BSDHelmut864 ~]# gpart list da1s1
gpart: No such geom: da1s1.
[root@BSDHelmut864 ~]#

It should be there:

[root@BSDHelmut864 ~]# gpart list da1
Geom name: da1
state: OK
fwheads: 255
fwsectors: 63
last: 156301487
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: da1s1
   Mediasize: 22544395776 (21G)
   Sectorsize: 512
   Mode: r0w0e0
   rawtype: 165
   length: 22544395776
   offset: 32256
   type: freebsd
   index: 1
   end: 44032085
   start: 63
Consumers:
1. Name: da1
   Mediasize: 80026361856 (75G)
   Sectorsize: 512
   Mode: r0w0e0

[root@BSDHelmut864 ~]#

But it isn't. Now I start sysinstall, choose custom, partiton,
press w and quit sysinstall. There it is:

[root@BSDHelmut864 ~]# gpart show da1s1
=   0  44032023  da1s1  BSD  (21G)
 0  44032023 - free -  (21G)

[root@BSDHelmut864 ~]# gpart list da1s1
Geom name: da1s1
state: OK
fwheads: 255
fwsectors: 63
last: 44032022
first: 0
entries: 8
scheme: BSD
Consumers:
1. Name: da1s1
   Mediasize: 22544395776 (21G)
   Sectorsize: 512
   Mode: r0w0e0

[root@BSDHelmut864 ~]#

So, what did sysinstall that gpart didn't?

Thanks, Helmut

___
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