Date: Sat, 11 Feb 2012 17:23:12 -0800 From: Devin Teske <devin.teske@fisglobal.com> To: Devin Teske <devin.teske@fisglobal.com> Cc: Ron McDowell <rcm@fuzzwad.org>, freebsd-sysinstall@freebsd.org Subject: Re: Announcing bsdconfig(8) preliminary Message-ID: <D87EEA55-A933-43CD-B6AE-D38E9A2C3A46@fisglobal.com> In-Reply-To: <F7F9BEFD-8E88-489D-8B82-FA3D5C5BDE7E@fisglobal.com> References: <4F342066.2050409@fuzzwad.org> <07f501cce85b$4ac934f0$e05b9ed0$@fisglobal.com> <4F35C5E6.7010607@fuzzwad.org> <5FB150D7-BA30-406D-B8B1-5BDEF1909502@fisglobal.com> <4F35DEC0.2030904@fuzzwad.org> <F7F9BEFD-8E88-489D-8B82-FA3D5C5BDE7E@fisglobal.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 11, 2012, at 2:06 PM, Devin Teske wrote: >=20 > On Feb 10, 2012, at 7:21 PM, Ron McDowell wrote: >=20 >> On 2/10/12 8:35 PM, Devin Teske wrote: >>> On Feb 10, 2012, at 5:35 PM, Ron McDowell wrote: >>>=20 >>>> On 2/10/12 7:20 PM, Devin Teske wrote: >>>>>> -----Original Message----- >>>>>> From: owner-freebsd-sysinstall@freebsd.org [mailto:owner-freebsd- >>>>>> sysinstall@freebsd.org] On Behalf Of Ron McDowell >>>>>> Sent: Thursday, February 09, 2012 11:37 AM >>>>>> To: freebsd-sysinstall@freebsd.org >>>>>> Subject: Announcing bsdconfig(8) preliminary >>>>>>=20 >>>>>> http://fuzzwad.org/bsdconfig/ is a long way from finished, but there= is >>>>>> enough of a framework available now, that I'm wanting some feedback = on. >>>>>> Tarballs are out there and I'll guarantee you'll want to look at the >>>>>> latest, and not the earlier examples. The manpage in the tarball is= a >>>>>> good place to start. >>>>>>=20 >>>>>> Feel free to talk about it here and ask any questions you want. The >>>>>> direction I go with it will depend [I hope!] on where everyone wants= it >>>>>> to go. Thanks in advance. >>>>>>=20 >>>>> Hi Ron, >>>>>=20 >>>>> Thank you very much for working on this with everyone. >>>>>=20 >>>>> I notice that you've centralized the use of "notimplemented" to >>>>> /usr/libexec/bsdconfig/notimplemented which makes the per-module files >>>>> /usr/libexec/bsdconfig/*.*/notimplemented obsolete. >>>>>=20 >>>>> I thinking I should clean things up after installation by executing: >>>>>=20 >>>>> cd /usr/libexec/bsdconfig >>>>> sudo rm -f *.*/notimplemented >>>> Absolutely, thanks for pointing that out. I just cleaned it up on my = copy. >>>>=20 >>>>> Again, thanks for working on this, ... would you mind if I took it an= d worked on >>>>> it this weekend and passed it back to you for review? >>>> Go for it! >>>>=20 >>> How do you feel about implementing "090.time-zone" with my ports additi= on, sysutils/tzdialog? >>=20 >> tzsetup(8) is already installed in base...I haven't looked at tzdialog, = does it do more than tzsetup? If so, then tzdialog needs to be included her= e like we've done with host-setup in 120.networking. >>=20 >>> Aside, I have a question about the INDEX file... >>>=20 >>> Does the exit status of the program-to-be-executed matter in any way to= bsdconfig? >>=20 >> Not yet, but it could and probably should...if nothing else, we should a= t least pass the exit code back up the line. >>=20 >>> Reason I ask is because tzdialog has a "-e" flag which may be useful if= -desired, causing the exit status to be success if-and-only-if both a zonef= ile is selected and it was installed without error. >>=20 >> --=20 >> Ron McDowell >> San Antonio TX >=20 > I've put a significant amount of work into this over the last 24 hours an= d would like to share my contributions. >=20 > http://druidbsd.sourceforge.net/download/bsdconfig/ >=20 > http://druidbsd.sourceforge.net/download/bsdconfig/bsdconfig.120211.txz >=20 > Please try: >=20 > bsdconfig networking > bsdconfig timezone > bsdconfig networking -h > bsdconfig timezone -h > bsdconfig networking -X > bsdconfig timezone -X >=20 Here's a little trick for testing the X11 interfaces from a Mac or PC (runn= ing Windows) using X11 Forwarding over SSH to a FreeBSD 9 box as a non-root= user with sudo(8) access. =3D=3D=3D First of three pre-requisites: You have to get your FreeBSD 9.0-RELEASE (or= higher) system ready to run Xdialog(1): (as root) pkg_add -r sudo pkg_add -r xauth pkg_add -r xorg pkg_add -r xdialog pkg_add -r xdpyinfo NOTE: Since we'll be using X11 Forwarding via SSH, you won't actually have = to configure or run the X server on the FreeBSD system. However, the packag= es must still be installed. This works both on real machines and virtual ma= chines (headless or otherwise). =3D=3D=3D Second pre-requisite: You need an X Server installed on your client machine= that you're SSH'ing *from* Free 3rd Party software available for both Mac and Windows. On Mac, you can install the free Apple X11 software from the below link: http://www.apple.com/support/downloads/x11formacosx.html NOTE: On Mac, you don't have to start the Apple X11 Server (X11.app) manual= ly, it just needs to be installed before proceeding (it will launch automat= ically as-needed). On Windows, you can install the free Xming software from the below link: http://www.straightrunning.com/XmingNotes/ NOTE: On Windows, it's recommended you download and install "Xming" from th= e "Public Domain Releases", version "6.9.0.31" as well as the "Xming-fonts"= right above it, version "7.5.0.34". After installing Xming, run it from yo= ur Start menu. On PC, you'll also need the free PuTTY software from Simon Tatham; below li= nk: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html NOTE: On Windows, it's recommended you download "putty.exe". =3D=3D=3D Third pre-requisite (Windows only): Symlink /bin/xauth to /usr/local/bin/xa= uth on your FreeBSD 9.0-RELEASE (or higher) system ln -sf /usr/local/bin/xauth /bin/xauth Depends on the software you're using, you might have to create additional s= ymlinks. Alternatives also include using "~/.ssh/config" on UNIX-like hosts= to specify alternate paths to for XAuthLocation, but on Mac this usually i= sn't needed where on Windows it's pretty common. =3D=3D=3D Now with pre-requesites satisfied, we can move on with the testing of these= X features via SSH as a non-root user. =3D=3D=3D Step 1: Open a terminal On Mac, you can find "Terminal.app" in "Applications/Utilities" (Cmd+Shift+= U while in Finder to open "Utilities" folder or use the "Go" menu in the me= nubar). On PC, run "putty.exe". This is where things diverge a bit for Mac/Windows... For Mac, use the below command to start an X11 Forwarded session to a FreeB= SD 9.0-RELEASE or higher system... ssh -X someuser@somehost NOTE: Make sure to use upper-case "X" For PC, you'll have to do two things in the PuTTY new-connection dialog win= dow: A. Enter the hostname of a system running FreeBSD 9.0-RELEASE or higher B. Find "SSH" on the left and in the SSH options, enable "X11 Forwarding" = (click the checkbox) NOTE: Xming should be running in the system tray before you connect =3D=3D=3D Step 2: Test your X11 Forwarding first You'll want to know that your X11 Forwarded SSH session is working before y= ou attempt to use it via sudo(8) (which requires some xauth(1) magic). echo $DISPLAY should produce a non-null response (something like "localhost:10.0" or "som= e.host.com:10.0" -- depending on sshd_config X11UseLocalHost setting). Also, xdpyinfo Should spew some info about your display (this is info about your Mac's App= le X11 app or on Windows, Xming). If either of these fail, then X11 Forwarding via SSH is not working for you= and you need to diagnose the issue (may be administratively prohibited by = the system administrator via sshd_config(5) or xauth(1) wasn't found by you= r client software). =3D=3D=3D Step 3: Grant "root" the ability to use your X11 session The default settings in FreeBSD 9 don't allow you to do things like: sudo xdpyinfo The failure becomes: X11 connection rejected because of wrong authentication. xdpyinfo: unable to open display "localhost:10.0". =20 The solution is to execute: xauth -f ~/.Xauthority extract - ${HOSTNAME:-localhost}{/unix,}:${DISPLAY#= *:} | sudo -u root xauth -ivf ~root/.Xauthority merge - NOTE: If you want to authorize another user other than root, replace "sudo = -u root" with "sudo -u USER" and replace "~root/.Xauthority" with "~USER/.X= authority". Sample output from the above command is shown below: Ignoring locks on authority file /root/.Xauthority 1 entries read in: 0 new, 1 replacement Ignoring locks and writing authority file /root/.Xauthority Immediately after-which, re-executing the above failed command: sudo xdpyinfo now succeeds. =3D=3D=3D Step 4: Try bsdconfig hostname and timezone elements via X11 as non-root us= er via sudo(8) Execute on your FreeBSD-9 (or higher) system (via SSH or otherwise): sudo bsdconfig networking -X sudo bsdconfig timezone -X --=20 Devin _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D87EEA55-A933-43CD-B6AE-D38E9A2C3A46>