[Discuss] linux.conf.au - Linux Conference in New Zealand

2015-01-17 Thread Tom Metro
I ran across mention on Twitter that there is a Linux conference
happening in New Zealand right now, and it looks like they are
publishing all of their sessions on YouTube, plus a live stream:

http://linux.conf.au/

YouTube channel:
https://www.youtube.com/channel/UCnIMb-fa7vesn2m95gHio_w

I've only sampled a portion of a video, but the quality seemed good
(intelligible audio and decent video) and many of the topics sounded
intriguing. Here are some talk titles:

Keynote: Linus Torvalds
SD Cards and filesystems for Embedded Systems
Hacking 3D Printers
Building Services in Go
A CoreOS Tutorial
Software Patents: Trolls and Other Bullies
Advanced Linux Server-Side Threats: How they work and what you can do
  about them
Flying with Linux (drones)
When Your Codebase Is Nearly Old Enough To Vote
Open Source Protocols and Architectures to Fix the Internet of Things
Getting More Out Of System Suspend In Linux
REST APIs and the Return of the Console App
PostgreSQL Replication Tutorial
Bashing the Shell: Advanced Scripting
Juju Deployments at Canonical
Introducing OpenStack Swift
Deploying OpenStack Using Containers
The Free Ride: How to Road-Test Automotive Linux on Your Own
Why you should consider using btrfs ... like Google does.
The Democratisation of Radio (Software Defined Radio)
Getting More Out Of System Suspend In Linux
Deploying to the cloud with golden images, Heat and Docker
Tales from the Trenches: Battling Browser Bugs for "Fun" and
  (Non-)Profit
Reverse engineering embedded software using Radare2
IPMI - because ACPI and UEFI weren't terrifying enough


Seems like a good mix of topics covering programing, devops, hardware
hacking, legal (copyright, patents, taxes), etc.

Over 100 videos posted in just 2 days.

 -Tom

-- 
Tom Metro
The Perl Shop, Newton, MA, USA
"Predictable On-demand Perl Consulting."
http://www.theperlshop.com/
___
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss


Re: [Discuss] linux.conf.au - Linux Conference in New Zealand

2015-01-17 Thread Greg Rundlett (freephile)
Thanks for posting... looks really useful.  Now to find time to watch.

Greg Rundlett
http://eQuality-Tech.com
http://freephile.org

On Sat, Jan 17, 2015 at 3:39 AM, Tom Metro  wrote:

> I ran across mention on Twitter that there is a Linux conference
> happening in New Zealand right now, and it looks like they are
> publishing all of their sessions on YouTube, plus a live stream:
>
> http://linux.conf.au/
>
> YouTube channel:
> https://www.youtube.com/channel/UCnIMb-fa7vesn2m95gHio_w
>
> I've only sampled a portion of a video, but the quality seemed good
> (intelligible audio and decent video) and many of the topics sounded
> intriguing. Here are some talk titles:
>
> Keynote: Linus Torvalds
> SD Cards and filesystems for Embedded Systems
> Hacking 3D Printers
> Building Services in Go
> A CoreOS Tutorial
> Software Patents: Trolls and Other Bullies
> Advanced Linux Server-Side Threats: How they work and what you can do
>   about them
> Flying with Linux (drones)
> When Your Codebase Is Nearly Old Enough To Vote
> Open Source Protocols and Architectures to Fix the Internet of Things
> Getting More Out Of System Suspend In Linux
> REST APIs and the Return of the Console App
> PostgreSQL Replication Tutorial
> Bashing the Shell: Advanced Scripting
> Juju Deployments at Canonical
> Introducing OpenStack Swift
> Deploying OpenStack Using Containers
> The Free Ride: How to Road-Test Automotive Linux on Your Own
> Why you should consider using btrfs ... like Google does.
> The Democratisation of Radio (Software Defined Radio)
> Getting More Out Of System Suspend In Linux
> Deploying to the cloud with golden images, Heat and Docker
> Tales from the Trenches: Battling Browser Bugs for "Fun" and
>   (Non-)Profit
> Reverse engineering embedded software using Radare2
> IPMI - because ACPI and UEFI weren't terrifying enough
>
>
> Seems like a good mix of topics covering programing, devops, hardware
> hacking, legal (copyright, patents, taxes), etc.
>
> Over 100 videos posted in just 2 days.
>
>  -Tom
>
> --
> Tom Metro
> The Perl Shop, Newton, MA, USA
> "Predictable On-demand Perl Consulting."
> http://www.theperlshop.com/
> ___
> Discuss mailing list
> Discuss@blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>
___
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss


[Discuss] My first contribution to MediaWiki

2015-01-17 Thread Greg Rundlett (freephile)
The project page: http://www.mediawiki.org/wiki/Extension:Html2Wiki

Code is hosted on Wikimedia Foundation servers, but also co-located on
github (https://github.com/freephile/Html2Wiki)

It's an extension to MediaWiki that lets you "import a website or web page
into your wiki".

There is still a lot to do, which is why I'm working on it all weekend.  I
hope it gains some traction because I think it could have a tremendous
amount of users.  In any event, I'm proudly announcing my first extension
to MediaWiki.

p.s. Collaborators welcome!


Greg Rundlett
http://eQuality-Tech.com
http://freephile.org
___
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss


Re: [Discuss] Using sftp without a shell account - [SOLVED]

2015-01-17 Thread Bill Horne

On 12/28/2014 8:58 PM, Bill Horne wrote:
I'm setting up an LDAP-based server, which will be used for file 
transfers among other things. I'd like to allow LDAP users to access 
the machine via sftp, but I can't figure out how to do that without 
giving each user a local shell account, and I'm looking for advice.


The LDAP users can access ftp without trouble, but not sftp.

It's a Mac Mini, running OS X "Yosemite", with Server v4.1.



Keywords: Solved Answered Fixed  Resolved

Here's the procedure to allow Open Directory users to have SFTP access 
without Shell Access on an OS X Yosemite Server. This was done on OS X 
10.10.1, with server version 4, which is the latest release as of 
December 2014.


If this breaks your machine, you get to keep all the pieces and chalk it 
up to experience and I'm not to blame. You've been warned.


The plan:

A. Some users will be placed in an "sftp-only" group.
B. The "sftp-only" members will be able to use sftp to access their 
"home" directories, and to create subdirectories, but they won't be able 
to write anything outside their home directory, and they will only have 
"read" access within a chroot jail that we will create for them.
C. Members of the "sftp-only" group will receive an error message if 
they try to use ssh (Secure Shell) to log in to the server.
D. The ftp server will be turned off, so that only sftp may be used to 
transfer files. All users will have sftp access, but users whom are NOT 
in the "sftp-only" group will also be able to

 use a secure shell.

Step-by-step procedure: you must have root privileges to create this new 
environment. That means your ID must be in the /etc/sudoers file: if you 
use the "sudo" command and get an error saying that your ID is not in 
the sudoers file, logout and login again with a different ID that has 
sudo privileges.


1. Decide on where you will put the new "root" directory that your SFTP 
users will use. I recommend that you create a new directory just under 
the root.


N.B. ALL the directories that are "above" your users' new root MUST be 
owned by the root user and writable ONLY by root! The "administrator" 
account will NOT work: you must sudo to create this new directory. I 
chose to use "ftp" as the directory name.


sudo mkdir -p /ftp/Users

(The above creates a new "ftp" directory under the root, and a "Users" 
directory under /ftp, if you don't already have one. This will be a 
"chroot jail" which will be the only part of the machine which  
sftp-only users will have access to.


2. Test to make sure the new directory is "read only" for all except root.

myserver:~ myusername$ ls -ld /ftp
drwxr-xr-x  4 root  wheel  136 Jan 11 00:08 /ftp

... and it looks good.

If your listing shows write permissions for "group" or "anyone", chmod 
the directory to 755: skip this step if the "ls" output shows it's not 
needed.


sudo chmod 755 /ftp# sets /ftp so that only root has write permission.

If the listing does not show "root" as the directory owner, then use 
chmod: if the "ls" shows root already owns the directory, skip this step.


sudo chmod root /ftp

3. Copy the existing user's files into the new chroot jail directory: 
this assumes that your users have their home directories in /Users. The 
"-a" option will preserve the existing ownership and attributes: since 
the users will be switched to the "home" directory which is shown in 
their Open Directory profile, it's much easier to simply copy the whole 
/Users directory so that we don't have to change the OD entries. In 
other words, once the sftp daemon accepts a user's credentials, that 
user's "home" will be set to whatever is shown in OD, UNDER THE CHRROT 
ROOT (in this case, /ftp),


sudo cp -a /Users  /ftp/Users

4. Decide if you want to remove the sftp-only users' old "home" 
directories. I recommend that you leave them "as is" until the users 
have confirmed that they sill have all their files.


5. You MIGHT need to have a /dev/ file under /ftp for syslogd to get 
logging info. In my machine, there was no /dev/log, but there was a 
/dev/klog device, so I copied that to /ftp. I'm not sure if it's needed, 
but it doesn't hurt. If we were allowing shell access to users in the 
jail, we'd need to provide a shell and assorted other files, but the 
internal-sftp option doesn't require it.


sudo cp -a /dev/klog  /ftp

6. Edit the /etc/sshd_config file by adding the following lines:

Subsystem   sftpinternal-sftp

Match Group sftp-only
  X11Forwarding no
  AllowTcpForwarding no
  ForceCommand internal-sftp
  ChrootDirectory /ftp

N.B.: there is no "end-of-match" keyword. Be sure you leave whitespace 
at the beginning of each line that is part of the match.


Stop. Take a breath. Have a BOYC.

Now, the "gotcha": the sshd_config file is sensitive to CR/LF entries! 
If you are reading this on a Windoze machine and copying lines into OS X 
from there, it's a good idea to delete all the line-ends and separate 
the lines by hand while using a co

Re: [Discuss] My first contribution to MediaWiki

2015-01-17 Thread Tom Metro
Greg Rundlett (freephile) wrote:
> The project page: http://www.mediawiki.org/wiki/Extension:Html2Wiki
> 
> It's an extension to MediaWiki that lets you "import a website or web page
> into your wiki".

  "It does this by first "normalizing" the content with HTMLTidy, and
  then "sanitizing" it with Purify and Regular Expressions. Then the
  content is "converted" from HTML to WikiText using Regular Expressions
  and a Parsoid service."

Amazing that such a conversion is even possible, given how problematic
most HTML is. In some ways this job is harder than what browsers do when
parsing HTML, as you aren't just rendering the result, but trying to
extract structure - or semantic meaning - from it.

Does HTMLTidy do a lot of the heavy lifting for you? Do you still end up
with a lot of situations where you have multiple HTML constructs that
map to a single wiki markup construct?

How does it handle HTML generated or loaded by JS, as is quite common
now? (You might be able to work around that with one of the projects
that use an embedded and programmatically controlled web rendering
engine, like webkit.)

What are the advantages to implementing this as a plugin rather than a
separate command line tool (which would then support other markup
formats, like Markdown)?

If you couldn't find an existing HTML to wiki markup converter, did you
look for something similar, like a converter to markdown? A search for
this turns up hits, such as:

http://johnmacfarlane.net/pandoc/README.html

with an example:

  pandoc -f html -t markdown http://www.fsf.org

which presumably retrieves content from http://www.fsf.org, specified to
be in HTML format, and outputs Markdown. (It also supports MediaWiki
format.)

If using a tool that doesn't support MediaWiki directly, once in
Markdown, I imagine the conversion to MediaWiki is relatively easy.

 -Tom

-- 
Tom Metro
The Perl Shop, Newton, MA, USA
"Predictable On-demand Perl Consulting."
http://www.theperlshop.com/
___
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss


Re: [Discuss] My first contribution to MediaWiki

2015-01-17 Thread Greg Rundlett (freephile)
Thanks Tom, good questions.

On Sat, Jan 17, 2015 at 10:10 PM, Tom Metro  wrote:

> Greg Rundlett (freephile) wrote:
> > The project page: http://www.mediawiki.org/wiki/Extension:Html2Wiki
> >
> > It's an extension to MediaWiki that lets you "import a website or web
> page
> > into your wiki".
>
>   "It does this by first "normalizing" the content with HTMLTidy, and
>   then "sanitizing" it with Purify and Regular Expressions. Then the
>   content is "converted" from HTML to WikiText using Regular Expressions
>   and a Parsoid service."
>
> Amazing that such a conversion is even possible, given how problematic
> most HTML is. In some ways this job is harder than what browsers do when
> parsing HTML, as you aren't just rendering the result, but trying to
> extract structure - or semantic meaning - from it.
>
> Does HTMLTidy do a lot of the heavy lifting for you? Do you still end up
> with a lot of situations where you have multiple HTML constructs that
> map to a single wiki markup construct?
>

Tidy was chosen to parse non-conforming HTML into (hopefully) valid HTML.
At the very least, Tidy would be able to get us from ugly hackish HTML
source to something with consistent tag case, attribute quoting, and having
a Doctype.

>
> How does it handle HTML generated or loaded by JS, as is quite common
> now? (You might be able to work around that with one of the projects
> that use an embedded and programmatically controlled web rendering
> engine, like webkit.)
>

Right now, I'm not trying to work with any scripted content.  Actually,