Re: [PLUG] Terminal shortcuts

2018-06-19 Thread Larry Brigman
On Tue, Jun 19, 2018 at 10:47 PM wes  wrote:

> >
> >
> > OK, this is Linux, where someone a long time ago decided to name a root
> > folder /usr to save typing just one tiny letter. I mean, seriously.
> > There has to be a way to save constantly re-typing at the command line.
> > Any suggestions?
> >
>
> I have so many command aliases, that I've moved them out of my .bashrc into
> their own .shell_aliases file. You'll want to find a handy combination of
> letters which don't already belong to a command, and create one to suit
> your purposes. There are many ways to do this, each having their own pros
> and cons. I'll discuss one way; I'm sure others will chime in with various
> other solutions and tell me what's missing from mine.
>
> Since the utility you're calling is mkvmerge, I might be tempted to create
> an alias called "mm". That doesn't do anything on my system, but you might
> want to check yours first to make sure it's not taken. Such an alias would
> look like so:
>
> alias mm='mkvmerge -i'
>
> Thereafter, you can simply type mm , and you're off to the
> races. Bash automagically passes along any arguments you supply to an
> alias.
>
> You can place this in your .bashrc file if you want it to be available upon
> each future login.
>
> And bash (or zsh) autocomplete will try to autocomplete using esc-esc and
that applies to aliases too.
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-19 Thread wes
>
>
> OK, this is Linux, where someone a long time ago decided to name a root
> folder /usr to save typing just one tiny letter. I mean, seriously.
> There has to be a way to save constantly re-typing at the command line.
> Any suggestions?
>

I have so many command aliases, that I've moved them out of my .bashrc into
their own .shell_aliases file. You'll want to find a handy combination of
letters which don't already belong to a command, and create one to suit
your purposes. There are many ways to do this, each having their own pros
and cons. I'll discuss one way; I'm sure others will chime in with various
other solutions and tell me what's missing from mine.

Since the utility you're calling is mkvmerge, I might be tempted to create
an alias called "mm". That doesn't do anything on my system, but you might
want to check yours first to make sure it's not taken. Such an alias would
look like so:

alias mm='mkvmerge -i'

Thereafter, you can simply type mm , and you're off to the
races. Bash automagically passes along any arguments you supply to an alias.

You can place this in your .bashrc file if you want it to be available upon
each future login.

-wes
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-19 Thread Galen Seitz

On 06/19/2018 10:09 PM, John Jason Jordan wrote:

I prefer Gnome terminal because it is more visually configurable than
others that I have tried.

Often I need to repeat a command with a different object, so the up
arrow doesn't save typing. For example:

mkvmerge -i  (and repeat with a different movie)

It annoys me that I keep having to re-type 'mkvmerge -i' over and over
again. I could copy it to the clipboard and paste it in, except that I
use the clipboard to get , which overwrites the clipboard.
And besides, 'mkvmerge -i' is only one of several such commands that I
have to keep re-typing.

What would be really cool would be an 'auto-text' feature as in a word
processor, where you can create a series of letters (any length) and
assign it a short sequence of letters that you can type to invoke the
entire series of letters.

Web searching found me Ctrl-r, but if I type mkv- it pops up the entire
preceding command, including .

OK, this is Linux, where someone a long time ago decided to name a root
folder /usr to save typing just one tiny letter. I mean, seriously.
There has to be a way to save constantly re-typing at the command line.
Any suggestions?


Up arrow or Ctrl-r to get the desired command.  Ctrl-e to place the 
cursor at the end of the command (if it's not already there), ctrl-w to 
erase the last argument (the old filename).  Then type your new argument 
(the new filename), using the tab character for filename completion.


There's other fancy editing that can be done.  This is just the first 
one that comes to mind.  Note that this assumes you haven't changed the 
default editing characters.  For instance, ctrl-e is Emacs go to end of 
line.  There is at least one other alternative mappings based on vi.



galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-19 Thread Tomas Kuchta
I would check for alias

Man alias or bash is your friend.
That allows you to assign shortcuts to a command and save typing.

Another alternative, more flexible, would be to create wrapper scrtipt or
function for your long commands.

-T

On Tue, Jun 19, 2018, 10:37 PM Russell Senior 
wrote:

> You can cut/paste with ctrl-shift-c/ctrl-shift-v in gnome terminal, afaik.
> What don't you like about up-arrow?  That you have to backspace over
> things?  There's probably a delete-word binding, Ctrl-W.  So, maybe Ctrl-P
> Ctrl-W?
>
> On Tue, Jun 19, 2018 at 10:09 PM, John Jason Jordan 
> wrote:
>
> > I prefer Gnome terminal because it is more visually configurable than
> > others that I have tried.
> >
> > Often I need to repeat a command with a different object, so the up
> > arrow doesn't save typing. For example:
> >
> > mkvmerge -i  (and repeat with a different movie)
> >
> > It annoys me that I keep having to re-type 'mkvmerge -i' over and over
> > again. I could copy it to the clipboard and paste it in, except that I
> > use the clipboard to get , which overwrites the clipboard.
> > And besides, 'mkvmerge -i' is only one of several such commands that I
> > have to keep re-typing.
> >
> > What would be really cool would be an 'auto-text' feature as in a word
> > processor, where you can create a series of letters (any length) and
> > assign it a short sequence of letters that you can type to invoke the
> > entire series of letters.
> >
> > Web searching found me Ctrl-r, but if I type mkv- it pops up the entire
> > preceding command, including .
> >
> > OK, this is Linux, where someone a long time ago decided to name a root
> > folder /usr to save typing just one tiny letter. I mean, seriously.
> > There has to be a way to save constantly re-typing at the command line.
> > Any suggestions?
> > ___
> > PLUG mailing list
> > PLUG@pdxlinux.org
> > http://lists.pdxlinux.org/mailman/listinfo/plug
> >
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-19 Thread Russell Senior
F1 in the terminal will bring up the terminal help page, there is a
keyboard shortcuts link that lists them.

On Tue, Jun 19, 2018 at 10:37 PM, Russell Senior 
wrote:

> You can cut/paste with ctrl-shift-c/ctrl-shift-v in gnome terminal,
> afaik.  What don't you like about up-arrow?  That you have to backspace
> over things?  There's probably a delete-word binding, Ctrl-W.  So, maybe
> Ctrl-P Ctrl-W?
>
> On Tue, Jun 19, 2018 at 10:09 PM, John Jason Jordan 
> wrote:
>
>> I prefer Gnome terminal because it is more visually configurable than
>> others that I have tried.
>>
>> Often I need to repeat a command with a different object, so the up
>> arrow doesn't save typing. For example:
>>
>> mkvmerge -i  (and repeat with a different movie)
>>
>> It annoys me that I keep having to re-type 'mkvmerge -i' over and over
>> again. I could copy it to the clipboard and paste it in, except that I
>> use the clipboard to get , which overwrites the clipboard.
>> And besides, 'mkvmerge -i' is only one of several such commands that I
>> have to keep re-typing.
>>
>> What would be really cool would be an 'auto-text' feature as in a word
>> processor, where you can create a series of letters (any length) and
>> assign it a short sequence of letters that you can type to invoke the
>> entire series of letters.
>>
>> Web searching found me Ctrl-r, but if I type mkv- it pops up the entire
>> preceding command, including .
>>
>> OK, this is Linux, where someone a long time ago decided to name a root
>> folder /usr to save typing just one tiny letter. I mean, seriously.
>> There has to be a way to save constantly re-typing at the command line.
>> Any suggestions?
>> ___
>> PLUG mailing list
>> PLUG@pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>>
>
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Terminal shortcuts

2018-06-19 Thread Russell Senior
You can cut/paste with ctrl-shift-c/ctrl-shift-v in gnome terminal, afaik.
What don't you like about up-arrow?  That you have to backspace over
things?  There's probably a delete-word binding, Ctrl-W.  So, maybe Ctrl-P
Ctrl-W?

On Tue, Jun 19, 2018 at 10:09 PM, John Jason Jordan  wrote:

> I prefer Gnome terminal because it is more visually configurable than
> others that I have tried.
>
> Often I need to repeat a command with a different object, so the up
> arrow doesn't save typing. For example:
>
> mkvmerge -i  (and repeat with a different movie)
>
> It annoys me that I keep having to re-type 'mkvmerge -i' over and over
> again. I could copy it to the clipboard and paste it in, except that I
> use the clipboard to get , which overwrites the clipboard.
> And besides, 'mkvmerge -i' is only one of several such commands that I
> have to keep re-typing.
>
> What would be really cool would be an 'auto-text' feature as in a word
> processor, where you can create a series of letters (any length) and
> assign it a short sequence of letters that you can type to invoke the
> entire series of letters.
>
> Web searching found me Ctrl-r, but if I type mkv- it pops up the entire
> preceding command, including .
>
> OK, this is Linux, where someone a long time ago decided to name a root
> folder /usr to save typing just one tiny letter. I mean, seriously.
> There has to be a way to save constantly re-typing at the command line.
> Any suggestions?
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Terminal shortcuts

2018-06-19 Thread John Jason Jordan
I prefer Gnome terminal because it is more visually configurable than
others that I have tried.

Often I need to repeat a command with a different object, so the up
arrow doesn't save typing. For example:

mkvmerge -i  (and repeat with a different movie)

It annoys me that I keep having to re-type 'mkvmerge -i' over and over
again. I could copy it to the clipboard and paste it in, except that I
use the clipboard to get , which overwrites the clipboard.
And besides, 'mkvmerge -i' is only one of several such commands that I
have to keep re-typing.

What would be really cool would be an 'auto-text' feature as in a word
processor, where you can create a series of letters (any length) and
assign it a short sequence of letters that you can type to invoke the
entire series of letters.

Web searching found me Ctrl-r, but if I type mkv- it pops up the entire
preceding command, including .

OK, this is Linux, where someone a long time ago decided to name a root
folder /usr to save typing just one tiny letter. I mean, seriously.
There has to be a way to save constantly re-typing at the command line.
Any suggestions?
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread david

On 06/19/2018 06:02 PM, Rich Shepard wrote:

On Tue, 19 Jun 2018, david wrote:

While I believe the answer has already been found, would the 'uniq' 
command have been useful as an alternative?


david,

   Good question. Can it find a difference in a specific field and change
only one of them? Perhaps, but I've no idea.


Without a bigger sample size of data from you, I'm not sure.

I use the uniq command a lot when I pull a list of stuff (usually IPs 
and more) with grep or other utilities from log files and then pipe 
things through uniq to get a count of times an entry is found (-c flag).


Provided all data lines are unique, except for your one duplicate line, 
then yes, you could use this. A crude, but effective approach to test 
would be:


cat $file | uniq -u > $outfile

There are a lot of approaches, and I like the awk approach. This might 
just be another tool for you to use in the future to satisfy other needs.


david
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, david wrote:

While I believe the answer has already been found, would the 'uniq' command 
have been useful as an alternative?


david,

  Good question. Can it find a difference in a specific field and change
only one of them? Perhaps, but I've no idea.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files [RESOLVED]

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


Awk is a very nice "little" language. Glad to hear it worked. And thanks
for letting us know.


Robert,

  I do a lot of environmental data munging/wragling/ETL. These come to me as
.xml spreadsheets or the equivalent of line printer output sent as PDF files
(from federal resource agencies). I have found that emacs and awk, with the
occasional use of sed, do the job. Now and then I hit a new requirement
(such as reformatting a date from MM/DD/YY to -MM-DD) and my awk book
and web searches quickly find a working solution.

  I suspected that awk had flags, but the few web pages (including web fora)
did not use them the way I needed them to work. I've acquired a nice
collection of awk scripts that transform spreadsheet exports so the data can
be used in R, postgres, and GRASS.

Thanks again,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Carl Karsten wrote:


It could be done with transistors if you spend enough time ;)


Carl,

  Microprocessors.


I would add some code that verifies assumptions, like
are the dates always the same
is it just the 1700 are 1600?


  Those are hours on the 24-hour clock: 16:00 (4 pm) and 17:00 (5 pm).


anyway, assuming all our descriptions and assumptions are correct,
and the file starts at 2012-10-01,14:00


  Each day starts at 00:00 and runs through 23:00 hour-by-hour.

  The awk script Robert re-did does the job and I corrected all 20 years
where my script error provided two 16:00 hours.

Thanks,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Tyrell Jentink
Oh, your right... I looked too quickly this morning. Everything looks fine!

Still more Ethernet than the "No Ethernet" that Richard originally stated
as his mission statement.

On Tue, Jun 19, 2018, 17:08 Russell Senior 
wrote:

> On Tue, Jun 19, 2018 at 9:02 AM, Tyrell Jentink 
> wrote:
>
> > On the second side, the interface name is enp0s29u1u1u4. On the first
> side,
> > the output doesn't make sense, I would try again.
> >
>
> What part doesn't make sense?  It looks like he unplugged and replugged in
> a different USB port and the interface name changed accordingly.
>
> Fwiw, I am not a fan of "predictable network interface names".  I find
> eth0, eth1 ... ethN vastly more predictable, but never mind about that.
>
> On Tue, Jun 19, 2018, 08:16 Richard Owlett  wrote:
>
> >
> > > Plug in one end of cable
> > > [ 1882.167155] usb 4-1.1.4: new high-speed USB device number 4 using
> > > ehci-pci
> > > [ 1882.278177] usb 4-1.1.4: New USB device found, idVendor=067b,
> > > idProduct=25a1
> > > [ 1882.278183] usb 4-1.1.4: New USB device strings: Mfr=1, Product=2,
> > > SerialNumber=0
> > > [ 1882.278187] usb 4-1.1.4: Product: USB Transfer Cable
> > > [ 1882.278191] usb 4-1.1.4: Manufacturer: Prolific Technology Inc.
> > > [ 1882.301597] plusb 4-1.1.4:1.0 usb0: register 'plusb' at
> > > usb-:00:1d.0-1.1.4, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1,
> > > 1e:1c:40:06:14:68
> > > [ 1882.301642] usbcore: registered new interface driver plusb
> > > [ 1882.306204] plusb 4-1.1.4:1.0 enp0s29u1u1u4: renamed from usb0
> > > [ 1882.333434] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u4: link is not
> > ready
> > >
> > >
> > > Plug in other end of cable also
> > > [ 1887.342562] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > > dropped
> > > [ 1887.342580] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > > dropped
> > > [ 1887.344176] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > > dropped
> > > [ 1887.344197] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > > dropped
> > > [ 1906.022817] usb 4-1.1.3: new high-speed USB device number 5 using
> > > ehci-pci
> > > [ 1906.133374] usb 4-1.1.3: New USB device found, idVendor=067b,
> > > idProduct=25a1
> > > [ 1906.133381] usb 4-1.1.3: New USB device strings: Mfr=1, Product=2,
> > > SerialNumber=0
> > > [ 1906.133385] usb 4-1.1.3: Product: USB Transfer Cable
> > > [ 1906.133389] usb 4-1.1.3: Manufacturer: Prolific Technology Inc.
> > > [ 1906.134334] plusb 4-1.1.3:1.0 usb0: register 'plusb' at
> > > usb-:00:1d.0-1.1.3, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1,
> > > 1e:1c:40:06:14:68
> > > [ 1906.152962] plusb 4-1.1.3:1.0 enp0s29u1u1u3: renamed from usb0
> > > [ 1906.185788] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u3: link is not
> > ready
> > > [ 1911.405952] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > > dropped
> > > [ 1911.405966] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > > dropped
> > > [ 1911.407590] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > > dropped
> > > [ 1911.407614] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > > dropped
> > > root@debian-jan13:/home/richard#
> >
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread david

On 06/19/2018 11:52 AM, Rich Shepard wrote:

   I made a mistake when writing an awk script that inserts the time of an
observation with its value. I had 16:00 twice in a row rather than 16:00 
and

17:00. This holds for every day in the year, and I have about 12 year's in
which to make the correction. Specifically, changing the second 16:00 to
17:00. A sample:

2012-10-01,16:00,297.94
2012-10-01,16:00,297.94



While I believe the answer has already been found, would the 'uniq' 
command have been useful as an alternative?


david
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Tomas Kuchta
This is great technical discussion, thanks for keeping it public.

Reminds me my journey where implementing SSO/AD/LDAP - the project scope
kept expanding beyond my initial expectations.

As per your discussion - this, central, management/authentication needs
fully configured, reverse and authoritative DNS domain and NTP. This is
part of the host chain of trust/authentication. There is no workaround.

Once you get it working though it will become great asset and absolutely
worth it; think of access to data, services, etc.

Because of the many moving parts, keep detailed notes or better a manifest
of your setup. Also, plan for future migration now, when you understand
every detail of your setup. Without that - you will find it very, very
difficult to migrate/update your setup years from now. I certainly, found
my memories and notes insufficient to effectively migrate/update 5 years
later.

-T

On Jun 19, 2018 4:12 PM, "Tyrell Jentink"  wrote:

I also didn't answer about DHCP...

DHCP and DNS shouldn't have to care about each other, unless IP addresses
are likely to change; If they are, you will need a method of updating  the
DNS records. FreeIPA lets the client update their own records; Windows
prefers to deal with it on the server. SO, the "Best Practice" is
*probably* to let Windows play DHCP server.

That's probably what I will do next.

Currently, I'm using the DHCP server in my firewall, which is
less-than-ideal for a number of reasons, not the least of which is:

Because Windows machines belong to the win.example.com|10.42.2.0 network,
and Linux machines belong to the lin.example.com|10.42.1.0 network, all of
the leases need static reservations (As an aside, I don't put ALL machines
in the domains... Things like phones and Rasperry Pi's are considered
"Untrusted," get addresses out of the 10.42.0.0 IP pool, and don't have
domain names at all...). Which sucks for onloading a new machine: I have to
add the DHCP reservations to the firewall, then add the client to the
domain... In two separate interfaces. I suppose if it were all in Windows
Server, then it's at least all in the same place...




On Tue, Jun 19, 2018, 13:35 Galen Seitz  wrote:

> On 06/19/2018 12:33 PM, Tyrell Jentink wrote:>
> > The second is FreeIPA, lives at 10.42.1.10 and it serves the
> lin.example.com
> > subdomain and the 1.42.10.arpa reverse domain. It has a conditional
> > forwarder to forward requests under win.example.com to 10.42.2.10
>
> Some questions for you:
>
> What is the FQDN of your ipa server?
>
> Are you using DHCP for client machines?  If so, where is it hosted and
> how does it interact with your DNS server?
>
>
> thanks,
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files [RESOLVED]

2018-06-19 Thread Robert Citek
Awk is a very nice "little" language.  Glad to hear it worked.  And
thanks for letting us know. - Robert

On Tue, Jun 19, 2018 at 4:58 PM, Rich Shepard  wrote:
> On Tue, 19 Jun 2018, Robert Citek wrote:
>
>> $2 != "16.00" { print ; next }  <= the decimal should be a colon, 16:00 vs
>> 16.00
>
>
> Robert,
>
>   Oy! Too often we see what we expect to see, not what's actually there. I
> had that in a FORTRAN IV program in the early 1970s.
>
>> flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next } <=
>> equality should be assignment, $2= vs $2==
>
>
>   Ah, I missed that completely, as well as the order of pattern tests.
>
>> Here's a refactored version that you can put in a file:
>>
>> BEGIN {OFS=FS=","} ;
>> flag == 1 && $2 == "16:00" { $2 = "17:00" ; flag = 0 } ;
>> $2 == "16:00" { flag = 1 } ;
>> { print } ;
>
>
>   And it works. Thanks for teaching me a tool that will be applied to other
> awk scripts.
>
>> BTW, in your sample data set the 15:00 and 16:00 entries are identical
>> in the last field.  Is that expected or coincidental?
>
>
>   Expected. This is river stage height data (the elevation of the water
> surface) and it may be constant for a while, or vary fairly regularly. What
> I'm interested in is the pattern cycles: diurnal, seasonal, and annual.
>
> Best regards,
>
> Rich
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Carl Karsten
It could be done with transistors if you spend enough time ;)

I would add some code that verifies assumptions, like
are the dates always the same
is it just the 1700 are 1600?

anyway, assuming all our descriptions and assumptions are correct,
and the file starts at 2012-10-01,14:00


import csv
from datetime import datetime, timedelta

year = 2012
file_name = 'observation_{}.csv'.format(year)

start_time = datetime(year,10,1,14)

for h,input_line in enumerate(csv.reader(open(file_name))):
timestamp = start_time + timedelta(hours=h)
data_line = "{},{}".format(
timestamp.strftime("%Y-%m-%d,%H:%M"), input_line[2] )
print(data_line)

carl@twist:~/temp$ python allhours.py
2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,17:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

On Tue, Jun 19, 2018 at 6:24 PM, Rich Shepard  wrote:
> On Tue, 19 Jun 2018, Carl Karsten wrote:
>
>> Python will be the easiest to understand.
>> is it always 16:00, or is it any time the whole line is duplicated,
>> bump the 2nds hour?
>
>
> Carl,
>
>   The values may differ by hour. It's only the second 16:00 hour each day
> that
> is incorrect.
>
>> also, if you have one line for every hour of the year, how about
>> looping over all those datetimes, pared up with your data, and replace
>> all the datetimes (both good and flawed) with the calculated datetime.
>
>
>   I have everything correct but for the duplicated 4pms.
>
>> Here is 1/2 of it:
>>
>> from datetime import datetime, timedelta
>>
>> for h in range(8760):
>>timestamp = datetime(2012,1,1) + timedelta(hours=h)
>>data_line = "{},{}".format(
>>timestamp.strftime("%Y-%m-%d,%H:%M"),
>>"123.456")
>>print(data_line)
>
>
>   Here's my test file (test.dat):
>
> 2012-10-01,14:00,90.7999
> 2012-10-01,15:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,18:00,90.8091
> 2012-10-01,19:00,90.8030
>
>   I know it can be done in awk with a flag; but don't know how to do this
> correctly. :-)
>
>
> Thanks,
>
> Rich
>
>
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug



-- 
Carl K
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Russell Senior
On Tue, Jun 19, 2018 at 9:02 AM, Tyrell Jentink  wrote:

> On the second side, the interface name is enp0s29u1u1u4. On the first side,
> the output doesn't make sense, I would try again.
>

What part doesn't make sense?  It looks like he unplugged and replugged in
a different USB port and the interface name changed accordingly.

Fwiw, I am not a fan of "predictable network interface names".  I find
eth0, eth1 ... ethN vastly more predictable, but never mind about that.

On Tue, Jun 19, 2018, 08:16 Richard Owlett  wrote:

>
> > Plug in one end of cable
> > [ 1882.167155] usb 4-1.1.4: new high-speed USB device number 4 using
> > ehci-pci
> > [ 1882.278177] usb 4-1.1.4: New USB device found, idVendor=067b,
> > idProduct=25a1
> > [ 1882.278183] usb 4-1.1.4: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=0
> > [ 1882.278187] usb 4-1.1.4: Product: USB Transfer Cable
> > [ 1882.278191] usb 4-1.1.4: Manufacturer: Prolific Technology Inc.
> > [ 1882.301597] plusb 4-1.1.4:1.0 usb0: register 'plusb' at
> > usb-:00:1d.0-1.1.4, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1,
> > 1e:1c:40:06:14:68
> > [ 1882.301642] usbcore: registered new interface driver plusb
> > [ 1882.306204] plusb 4-1.1.4:1.0 enp0s29u1u1u4: renamed from usb0
> > [ 1882.333434] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u4: link is not
> ready
> >
> >
> > Plug in other end of cable also
> > [ 1887.342562] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > dropped
> > [ 1887.342580] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > dropped
> > [ 1887.344176] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > dropped
> > [ 1887.344197] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> > dropped
> > [ 1906.022817] usb 4-1.1.3: new high-speed USB device number 5 using
> > ehci-pci
> > [ 1906.133374] usb 4-1.1.3: New USB device found, idVendor=067b,
> > idProduct=25a1
> > [ 1906.133381] usb 4-1.1.3: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=0
> > [ 1906.133385] usb 4-1.1.3: Product: USB Transfer Cable
> > [ 1906.133389] usb 4-1.1.3: Manufacturer: Prolific Technology Inc.
> > [ 1906.134334] plusb 4-1.1.3:1.0 usb0: register 'plusb' at
> > usb-:00:1d.0-1.1.3, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1,
> > 1e:1c:40:06:14:68
> > [ 1906.152962] plusb 4-1.1.3:1.0 enp0s29u1u1u3: renamed from usb0
> > [ 1906.185788] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u3: link is not
> ready
> > [ 1911.405952] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > dropped
> > [ 1911.405966] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > dropped
> > [ 1911.407590] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > dropped
> > [ 1911.407614] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> > dropped
> > root@debian-jan13:/home/richard#
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files [RESOLVED]

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


$2 != "16.00" { print ; next }  <= the decimal should be a colon, 16:00 vs 16.00


Robert,

  Oy! Too often we see what we expect to see, not what's actually there. I
had that in a FORTRAN IV program in the early 1970s.


flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next } <=
equality should be assignment, $2= vs $2==


  Ah, I missed that completely, as well as the order of pattern tests.


Here's a refactored version that you can put in a file:

BEGIN {OFS=FS=","} ;
flag == 1 && $2 == "16:00" { $2 = "17:00" ; flag = 0 } ;
$2 == "16:00" { flag = 1 } ;
{ print } ;


  And it works. Thanks for teaching me a tool that will be applied to other
awk scripts.


BTW, in your sample data set the 15:00 and 16:00 entries are identical
in the last field.  Is that expected or coincidental?


  Expected. This is river stage height data (the elevation of the water
surface) and it may be constant for a while, or vary fairly regularly. What
I'm interested in is the pattern cycles: diurnal, seasonal, and annual.

Best regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Carl Karsten wrote:


Python will be the easiest to understand.
is it always 16:00, or is it any time the whole line is duplicated,
bump the 2nds hour?


Carl,

  The values may differ by hour. It's only the second 16:00 hour each day that
is incorrect.


also, if you have one line for every hour of the year, how about
looping over all those datetimes, pared up with your data, and replace
all the datetimes (both good and flawed) with the calculated datetime.


  I have everything correct but for the duplicated 4pms.


Here is 1/2 of it:

from datetime import datetime, timedelta

for h in range(8760):
   timestamp = datetime(2012,1,1) + timedelta(hours=h)
   data_line = "{},{}".format(
   timestamp.strftime("%Y-%m-%d,%H:%M"),
   "123.456")
   print(data_line)


  Here's my test file (test.dat):

2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

  I know it can be done in awk with a flag; but don't know how to do this
correctly. :-)

Thanks,

Rich


___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Tyrell Jentink
I also didn't answer about DHCP...

DHCP and DNS shouldn't have to care about each other, unless IP addresses
are likely to change; If they are, you will need a method of updating  the
DNS records. FreeIPA lets the client update their own records; Windows
prefers to deal with it on the server. SO, the "Best Practice" is
*probably* to let Windows play DHCP server.

That's probably what I will do next.

Currently, I'm using the DHCP server in my firewall, which is
less-than-ideal for a number of reasons, not the least of which is:

Because Windows machines belong to the win.example.com|10.42.2.0 network,
and Linux machines belong to the lin.example.com|10.42.1.0 network, all of
the leases need static reservations (As an aside, I don't put ALL machines
in the domains... Things like phones and Rasperry Pi's are considered
"Untrusted," get addresses out of the 10.42.0.0 IP pool, and don't have
domain names at all...). Which sucks for onloading a new machine: I have to
add the DHCP reservations to the firewall, then add the client to the
domain... In two separate interfaces. I suppose if it were all in Windows
Server, then it's at least all in the same place...



On Tue, Jun 19, 2018, 13:35 Galen Seitz  wrote:

> On 06/19/2018 12:33 PM, Tyrell Jentink wrote:>
> > The second is FreeIPA, lives at 10.42.1.10 and it serves the
> lin.example.com
> > subdomain and the 1.42.10.arpa reverse domain. It has a conditional
> > forwarder to forward requests under win.example.com to 10.42.2.10
>
> Some questions for you:
>
> What is the FQDN of your ipa server?
>
> Are you using DHCP for client machines?  If so, where is it hosted and
> how does it interact with your DNS server?
>
>
> thanks,
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Tyrell Jentink
Oh... I meant to also mention... If you want to have a service authenticate
both inside and outside your network, that particular service will need to
have the same FQDN on both the inside and the outside of the network...
Since they aren't likely to share the same IP address (Public vs Private),
you MAY need to get very clever about your "Split Horizon DNS," Google for
more details.

On Tue, Jun 19, 2018, 13:35 Galen Seitz  wrote:

> On 06/19/2018 12:33 PM, Tyrell Jentink wrote:>
> > The second is FreeIPA, lives at 10.42.1.10 and it serves the
> lin.example.com
> > subdomain and the 1.42.10.arpa reverse domain. It has a conditional
> > forwarder to forward requests under win.example.com to 10.42.2.10
>
> Some questions for you:
>
> What is the FQDN of your ipa server?
>
> Are you using DHCP for client machines?  If so, where is it hosted and
> how does it interact with your DNS server?
>
>
> thanks,
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Tyrell Jentink
Both "Domain Controllers" are called 'pdc' on their respective subdomain;
So, 'pdc.win.example.com' and 'pdc.lin.example.com.'

Yes, my network has A LOT of infrastructure, for what is essentially a 3
user network... I did it as a learning experience, a "Home Lab," so to
speak (Or, "Home Production," if you will, since my wife would slaughter me
in my sleep if the Plex server ever went down...). I'm not convinced that I
would recommend it to anyone... LOL.

On Tue, Jun 19, 2018, 13:35 Galen Seitz  wrote:

> On 06/19/2018 12:33 PM, Tyrell Jentink wrote:>
> > The second is FreeIPA, lives at 10.42.1.10 and it serves the
> lin.example.com
> > subdomain and the 1.42.10.arpa reverse domain. It has a conditional
> > forwarder to forward requests under win.example.com to 10.42.2.10
>
> Some questions for you:
>
> What is the FQDN of your ipa server?
>
> Are you using DHCP for client machines?  If so, where is it hosted and
> how does it interact with your DNS server?
>
>
> thanks,
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Carl Karsten
On Tue, Jun 19, 2018 at 2:29 PM, Rich Shepard  wrote:
> On Tue, 19 Jun 2018, Robert Citek wrote:
>
>> I don't fully understand your question, but here are some examples
>> that may be a step in the right direction:
>
>
> Robert,
>
>   I did not provide as complete an explanation as I should have.
>
>   Each file has 8761 lines, one for each hour of each day during the
> (non-leap) year, plus a header line. It's not just two isolated lines,
> unfortunately.
>
>   I don't follow the logic of your two examples for finding only the
> duplicate 16:00 hours in each day, and changing only the second instance to
> 17:00.
>
>> $ seq 1 5 | sed -e '1~2s/$/ --/'
>> 1 --
>> 2
>> 3 --
>> 4
>> 5 --
>>
>> $ seq 1 5 | sed -e '0~2s/$/ --/'
>> 1
>> 2 --
>> 3
>> 4 --
>> 5
>
>
>   Perhaps I need to write a python script that looks for the string, 16:00,
> and sets a flag the first time that's found. The next time it's found, in
> the following row, the flag is set so the string is changed to 17:00 and the
> flag is unset. Then the script keeps reading until it encounters the next
> day's 16:00 row.
>

Python will be the easiest to understand.

is it always 16:00, or is it any time the whole line is duplicated,
bump the 2nds hour?


also, if you have one line for every hour of the year, how about
looping over all those datetimes, pared up with your data, and replace
all the datetimes (both good and flawed) with the calculated datetime.

Here is 1/2 of it:

from datetime import datetime, timedelta

for h in range(8760):
timestamp = datetime(2012,1,1) + timedelta(hours=h)
data_line = "{},{}".format(
timestamp.strftime("%Y-%m-%d,%H:%M"),
"123.456")
print(data_line)


2012-01-01,00:00,123.456
2012-01-01,01:00,123.456
2012-01-01,02:00,123.456
2012-01-01,03:00,123.456
2012-01-01,04:00,123.456
2012-01-01,05:00,123.456
...
2012-12-30,14:00,123.456
2012-12-30,15:00,123.456
2012-12-30,16:00,123.456
2012-12-30,17:00,123.456
2012-12-30,18:00,123.456
2012-12-30,19:00,123.456
2012-12-30,20:00,123.456
2012-12-30,21:00,123.456
2012-12-30,22:00,123.456
2012-12-30,23:00,123.456

If you will post the top of your file, (so I can get csv headers and
data that lines up with my timestamps)
I'll add the rest.

I am guessing you have filenames based on year, like
observation-2012.csv  - give me the file name and I'll roll that in.


> Thanks,
>
>
> Rich
>
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug



-- 
Carl K
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Robert Citek
$2 != "16.00" { print ; next }  <= the decimal should be a colon, 16:00 vs 16.00
flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next } <=
equality should be assignment, $2= vs $2==

Here's a refactored version that you can put in a file:

BEGIN {OFS=FS=","} ;
flag == 1 && $2 == "16:00" { $2 = "17:00" ; flag = 0 } ;
$2 == "16:00" { flag = 1 } ;
{ print } ;


BTW, in your sample data set the 15:00 and 16:00 entries are identical
in the last field.  Is that expected or coincidental?

Regards,
- Robert


On Tue, Jun 19, 2018 at 3:31 PM, Rich Shepard  wrote:
> On Tue, 19 Jun 2018, Robert Citek wrote:
>
>> Couple of typos and an addition (-F,) :
>
>
>   I'm not seeing the typos.
>
>> { cat <> 2012-10-01,14:00,90.7999
>> 2012-10-01,15:00,90.8121
>> 2012-10-01,16:00,90.8121
>> 2012-10-01,16:00,90.8121
>> 2012-10-01,18:00,90.8091
>> 2012-10-01,19:00,90.8030
>> eof
>> } | awk -F,  '
>> $2 != "16:00" { print ; next }
>> flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
>> flag == 1 && $2 == "16:00" { $2="17:00"; print; flag=0 ; next }
>> '
>
>
>   I have the code in a file and run it with the '-f' option:
> gawk -f correct-double-hour.awk test.dat > out.dat
>
> correct-double-hour.awk:
>
> #!/usr/bin/gawk
> #
> # This script replaces the second instance of 16:00 with 17:00.
>
> BEGIN { FS=","; OFS="," }
> $2 != "16.00" { print ; next }
> flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
> flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }
>
> Thanks,
>
> Rich
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


Couple of typos and an addition (-F,) :


  I'm not seeing the typos.


{ cat <

  I have the code in a file and run it with the '-f' option:
gawk -f correct-double-hour.awk test.dat > out.dat

correct-double-hour.awk:

#!/usr/bin/gawk
#
# This script replaces the second instance of 16:00 with 17:00.

BEGIN { FS=","; OFS="," }
$2 != "16.00" { print ; next }
flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Robert Citek
Couple of typos and an addition (-F,) :

{ cat < wrote:
> On Tue, 19 Jun 2018, Robert Citek wrote:
>
>> A quick pass.  Needs testing and refactoring.
>>
>> $2 != "16.00" { print ; next }
>> flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
>> flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }
>
>
>   Thanks, Robert. I tried variations of this using if and regex for the
> patterns, but they didn't work. Here's my test file (cleverly named
> test.dat):
>
> 2012-10-01,14:00,90.7999
> 2012-10-01,15:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,18:00,90.8091
> 2012-10-01,19:00,90.8030
>
>   Your script did what mine did, added two more rows with 16:00:
>
> 2012-10-01,14:00,90.7999
> 2012-10-01,15:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,16:00,90.8121
> 2012-10-01,18:00,90.8091
> 2012-10-01,19:00,90.8030
>
>   Wrapping the patterns in parentheses and forward slashes makes no
> difference. I'm sure the correct script will appear to be obvious once I
> learn how to do this.
>
> Best regards,
>
>
> Rich
>
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


A quick pass.  Needs testing and refactoring.

$2 != "16.00" { print ; next }
flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }


  Thanks, Robert. I tried variations of this using if and regex for the
patterns, but they didn't work. Here's my test file (cleverly named
test.dat):

2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

  Your script did what mine did, added two more rows with 16:00:

2012-10-01,14:00,90.7999
2012-10-01,15:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,16:00,90.8121
2012-10-01,18:00,90.8091
2012-10-01,19:00,90.8030

  Wrapping the patterns in parentheses and forward slashes makes no
difference. I'm sure the correct script will appear to be obvious once I
learn how to do this.

Best regards,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Robert Citek
A quick pass.  Needs testing and refactoring.

$2 != "16.00" { print ; next }
flag == 0 && $2 == "16:00" { print ; flag=1 ; next }
flag == 1 && $2 == "16:00" { $2=="17:00"; print; flag=0 ; next }


On Tue, Jun 19, 2018 at 2:04 PM, Rich Shepard  wrote:
> On Tue, 19 Jun 2018, Robert Citek wrote:
>
>> Good luck and let us know how things go.
>
>
>   This can be done using awk and flags. I've not before used flags in awk so
> I don't know the proper sequence of commands. What I have now is:
>
> $2!="16.00" { print }
> $2=="16:00" { print; flag=1 }
> $2=="16:00" { $2=="17:00"; print; flag=0 }
>
>   This prints the input file without change. If anyone has thoughts on how
> to use a flag to change the value of field 2 please share them with me.
>
>
> Rich
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


Good luck and let us know how things go.


  This can be done using awk and flags. I've not before used flags in awk so
I don't know the proper sequence of commands. What I have now is:

$2!="16.00" { print }
$2=="16:00" { print; flag=1 }
$2=="16:00" { $2=="17:00"; print; flag=0 }

  This prints the input file without change. If anyone has thoughts on how
to use a flag to change the value of field 2 please share them with me.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] looking for an iptables guru

2018-06-19 Thread wes
I have a couple of somewhat complex firewall related tasks to get finished
and could use some help. Looking for probably 2-3 hours worth of help from
someone very familiar with iptables, paying whatever your normal consulting
rate is.

There are tag-based routing issues involved, I expect that will be the
hardest part.

Let me know what's available.

thanks,
-wes
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Galen Seitz

On 06/19/2018 12:33 PM, Tyrell Jentink wrote:>

The second is FreeIPA, lives at 10.42.1.10 and it serves the lin.example.com
subdomain and the 1.42.10.arpa reverse domain. It has a conditional
forwarder to forward requests under win.example.com to 10.42.2.10


Some questions for you:

What is the FQDN of your ipa server?

Are you using DHCP for client machines?  If so, where is it hosted and 
how does it interact with your DNS server?



thanks,
galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Galen Seitz

On 06/19/2018 12:33 PM, Tyrell Jentink wrote:

Yeah, this was a struggle for me, too... Not just the forward domains, but
the reverse zones, too. It all required some thinking, and I think I'm
about to change some of it... But this is what I did at the get-go:

My domain name, let's use example.com, points at my public website, and my
FreeIPA domain is only accessible internally; I just don't have a need to
authenticate outside of the network.


My desired setup is similar to yours, except that my public web presence 
just a port forward to an internal machine.  I will need to authenticate 
on that machine.




Inside the network, I have three DNS servers... One is just a resolver on a
OPNSense firewall, and lives at 10.0.0.1. That isn't authoritative on any
domain.

The second is FreeIPA, lives at 10.42.1.10 and it serves the lin.example.com
subdomain and the 1.42.10.arpa reverse domain. It has a conditional
forwarder to forward requests under win.example.com to 10.42.2.10

The third is ActiveDirectory, serves the win.example.com subdomain and the
2.42.10.arpa reverse domain. It has a conditional forwarder to forward
requests under lin.example.com to 10.42.1.10.

Both of the authoritative servers point unresolved addresses to the
resolver at 10.0.0.1; It forwards to 1.1.1.1.

You run into problems if any given domain has two authoritative servers;
That is in both the forward and reverse domains, so you have to ensure that
each subdomain has a unique name -AND- a unique IP Address Space.

Does that set you on the right path, or do you need me to retry?


Yes, this helps.  I really didn't want to learn more about DNS and BIND, 
but clearly it's necessary.  The thing that was tripping me up was the 
need to send DNS updates to an authoritative server.  The only 
authoritative server currently on my internal network is for the 
ipa.example.com domain.  If a client is not in that domain, then the DNS 
updates are sent to the SOA of example.com.  This fails since my DNS 
host is not configured to support this.  Now that I understand what is 
going on, I need to decide how to best move forward.  It feels like I 
need a lot of infrastructure for what is a tiny network.  Perhaps I'm 
feeling how Richard Owlett is feeling about his network.



galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Tyrell Jentink
Yeah, this was a struggle for me, too... Not just the forward domains, but
the reverse zones, too. It all required some thinking, and I think I'm
about to change some of it... But this is what I did at the get-go:

My domain name, let's use example.com, points at my public website, and my
FreeIPA domain is only accessible internally; I just don't have a need to
authenticate outside of the network.

Inside the network, I have three DNS servers... One is just a resolver on a
OPNSense firewall, and lives at 10.0.0.1. That isn't authoritative on any
domain.

The second is FreeIPA, lives at 10.42.1.10 and it serves the lin.example.com
subdomain and the 1.42.10.arpa reverse domain. It has a conditional
forwarder to forward requests under win.example.com to 10.42.2.10

The third is ActiveDirectory, serves the win.example.com subdomain and the
2.42.10.arpa reverse domain. It has a conditional forwarder to forward
requests under lin.example.com to 10.42.1.10.

Both of the authoritative servers point unresolved addresses to the
resolver at 10.0.0.1; It forwards to 1.1.1.1.

You run into problems if any given domain has two authoritative servers;
That is in both the forward and reverse domains, so you have to ensure that
each subdomain has a unique name -AND- a unique IP Address Space.

Does that set you on the right path, or do you need me to retry?

On Tue, Jun 19, 2018, 12:11 Galen Seitz  wrote:

> Dredging up an old thread here...
>
> On 05/02/2018 08:25 PM, Tyrell Jentink wrote:
> > I'm using FreeIPA here at home; As a product, it's really just a bunch of
> > scripts and a web interface for LDAP+Kerberos+Certificate
> management+Samba;
> > It aims to be a complete identity management system, a product designed
> to
> > compete with (Or at the very least, perform an analogous set of tasks to)
> > ActiveDirectory. It is completely open source, developed by Red Hat, for
> > Fedora, and I use it on CentOS, but it is available for a number of other
> > distros.
>
> If you (Tyrell) have the time, could you please describe whether you are
> using the BIND part of FreeIPA, and if so, the DNS architecture of your
> home network?  I've been struggling to come up to speed on this.
>
> I use openwrt as a router on my home network.  dnsmasq is enabled, and
> all of my internal machines have host.example.com names.  If dnsmasq
> doesn't recognize a name, it forwards the lookup upstream to the real
> dns host for my domain.  Given this setup, I tried several naming
> schemes for my ipa server.  With some setups the ipa-server-install
> failed early.  With others, the server install would basically work, but
> then in the client portion it would try to send DNS updates to the
> upstream DNS host.  These updates fail because my upstream DNS host
> isn't configured to expect updates.  My understanding is that these
> updates shouldn't be going to this host anyway.
>
> What finally worked for me was to create a separate subdomain.  I named
> my ipa server ipa-1.ipa.example.com, and my ipa domain ipa.example.com
> (with the Kerberos realm named IPA.SEITZASSOC.COM).  I had to add a
> server option in dnsmasq on my openwrt box to tell it to forward lookups
> in the ipa.example.com domain to my ipa server.
>
> Note that example.com is just an example.  I was using my actual domain
> name above.
>
> thanks,
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

On Tue, 19 Jun 2018, Robert Citek wrote:


I don't fully understand your question, but here are some examples
that may be a step in the right direction:


Robert,

  I did not provide as complete an explanation as I should have.

  Each file has 8761 lines, one for each hour of each day during the
(non-leap) year, plus a header line. It's not just two isolated lines,
unfortunately.

  I don't follow the logic of your two examples for finding only the
duplicate 16:00 hours in each day, and changing only the second instance to
17:00.


$ seq 1 5 | sed -e '1~2s/$/ --/'
1 --
2
3 --
4
5 --

$ seq 1 5 | sed -e '0~2s/$/ --/'
1
2 --
3
4 --
5


  Perhaps I need to write a python script that looks for the string, 16:00,
and sets a flag the first time that's found. The next time it's found, in
the following row, the flag is set so the string is changed to 17:00 and the
flag is unset. Then the script keeps reading until it encounters the next
day's 16:00 row.

Thanks,

Rich

___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Correcting duplicate strings in files

2018-06-19 Thread Robert Citek
I don't fully understand your question, but here are some examples
that may be a step in the right direction:

$ seq 1 5 | sed -e '1~2s/$/ --/'
1 --
2
3 --
4
5 --

$ seq 1 5 | sed -e '0~2s/$/ --/'
1
2 --
3
4 --
5

$ echo -e "2012-10-01,16:00,297.94\n2012-10-01,16:00,297.94" | sed -e
'0~2s/16:00/17:00/'
2012-10-01,16:00,297.94
2012-10-01,17:00,297.94

Good luck and let us know how things go.

Regards,
- Robert

On Tue, Jun 19, 2018 at 11:52 AM, Rich Shepard  wrote:
>   I made a mistake when writing an awk script that inserts the time of an
> observation with its value. I had 16:00 twice in a row rather than 16:00 and
> 17:00. This holds for every day in the year, and I have about 12 year's in
> which to make the correction. Specifically, changing the second 16:00 to
> 17:00. A sample:
>
> 2012-10-01,16:00,297.94
> 2012-10-01,16:00,297.94
>
>   I'm stuck trying to find a way to make the change using sed, awk, or grep.
> How do I ignore the first instance and change only the second instance?
>
>   If there's a perl script to do this, please share it with me as I'm not a
> perl coder.
>
>   I'm looking forward to learning how to do this job.
>
> Rich
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Linux centralized authentication

2018-06-19 Thread Galen Seitz

Dredging up an old thread here...

On 05/02/2018 08:25 PM, Tyrell Jentink wrote:

I'm using FreeIPA here at home; As a product, it's really just a bunch of
scripts and a web interface for LDAP+Kerberos+Certificate management+Samba;
It aims to be a complete identity management system, a product designed to
compete with (Or at the very least, perform an analogous set of tasks to)
ActiveDirectory. It is completely open source, developed by Red Hat, for
Fedora, and I use it on CentOS, but it is available for a number of other
distros.


If you (Tyrell) have the time, could you please describe whether you are 
using the BIND part of FreeIPA, and if so, the DNS architecture of your 
home network?  I've been struggling to come up to speed on this.


I use openwrt as a router on my home network.  dnsmasq is enabled, and 
all of my internal machines have host.example.com names.  If dnsmasq 
doesn't recognize a name, it forwards the lookup upstream to the real 
dns host for my domain.  Given this setup, I tried several naming 
schemes for my ipa server.  With some setups the ipa-server-install 
failed early.  With others, the server install would basically work, but 
then in the client portion it would try to send DNS updates to the 
upstream DNS host.  These updates fail because my upstream DNS host 
isn't configured to expect updates.  My understanding is that these 
updates shouldn't be going to this host anyway.


What finally worked for me was to create a separate subdomain.  I named 
my ipa server ipa-1.ipa.example.com, and my ipa domain ipa.example.com 
(with the Kerberos realm named IPA.SEITZASSOC.COM).  I had to add a 
server option in dnsmasq on my openwrt box to tell it to forward lookups 
in the ipa.example.com domain to my ipa server.


Note that example.com is just an example.  I was using my actual domain 
name above.


thanks,
galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


[PLUG] Correcting duplicate strings in files

2018-06-19 Thread Rich Shepard

  I made a mistake when writing an awk script that inserts the time of an
observation with its value. I had 16:00 twice in a row rather than 16:00 and
17:00. This holds for every day in the year, and I have about 12 year's in
which to make the correction. Specifically, changing the second 16:00 to
17:00. A sample:

2012-10-01,16:00,297.94
2012-10-01,16:00,297.94

  I'm stuck trying to find a way to make the change using sed, awk, or grep.
How do I ignore the first instance and change only the second instance?

  If there's a perl script to do this, please share it with me as I'm not a
perl coder.

  I'm looking forward to learning how to do this job.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Galen Seitz

On 06/19/2018 09:02 AM, Tyrell Jentink wrote:

On the second side, the interface name is enp0s29u1u1u4. On the first side,
the output doesn't make sense, I would try again.

BUT, of interest, it looks like the hardware in the middle of the cable
turns out to be two Prolific USB-to-serial adapters back to back in
Ethernet Emulator mode... So, while this WILL work, it was also suggested
already, and failed the "Not ethernet" requirement in the original problem
statement...


Yes, the only place where this is "serial" is on the two USB links to 
the Prolific PL25A1 device.


For those that are interested, I took a quick look at the datasheet. 
The PL25A1 is basically two USB bulk endpoints back to back, with large 
fifos in between.  There's also an 8032 microcontroller.  The 
combination of the usbnet and plusb kernel modules makes this look like 
a simple network interface.



galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Galen Seitz

On 06/19/2018 08:15 AM, Richard Owlett wrote:

Plug in one end of cable
[ 1882.167155] usb 4-1.1.4: new high-speed USB device number 4 using 
ehci-pci
[ 1882.278177] usb 4-1.1.4: New USB device found, idVendor=067b, 
idProduct=25a1
[ 1882.278183] usb 4-1.1.4: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0

[ 1882.278187] usb 4-1.1.4: Product: USB Transfer Cable
[ 1882.278191] usb 4-1.1.4: Manufacturer: Prolific Technology Inc.
[ 1882.301597] plusb 4-1.1.4:1.0 usb0: register 'plusb' at 
usb-:00:1d.0-1.1.4, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1, 
1e:1c:40:06:14:68

[ 1882.301642] usbcore: registered new interface driver plusb
[ 1882.306204] plusb 4-1.1.4:1.0 enp0s29u1u1u4: renamed from usb0
[ 1882.333434] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u4: link is not ready


Plug in other end of cable also
[ 1887.342562] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1887.342580] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1887.344176] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1887.344197] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1906.022817] usb 4-1.1.3: new high-speed USB device number 5 using 
ehci-pci
[ 1906.133374] usb 4-1.1.3: New USB device found, idVendor=067b, 
idProduct=25a1
[ 1906.133381] usb 4-1.1.3: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0

[ 1906.133385] usb 4-1.1.3: Product: USB Transfer Cable
[ 1906.133389] usb 4-1.1.3: Manufacturer: Prolific Technology Inc.
[ 1906.134334] plusb 4-1.1.3:1.0 usb0: register 'plusb' at 
usb-:00:1d.0-1.1.3, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1, 
1e:1c:40:06:14:68

[ 1906.152962] plusb 4-1.1.3:1.0 enp0s29u1u1u3: renamed from usb0
[ 1906.185788] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u3: link is not ready
[ 1911.405952] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped
[ 1911.405966] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped
[ 1911.407590] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped
[ 1911.407614] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped

root@debian-jan13:/home/richard#


Well, your Prolific PL25A1-based cable isn't just two Ethernet chips 
back to back, but it's close.  It uses the same networking framework as 
USB to Ethernet adapters.  Here's a bit of info on the driver.  This is 
as much for Russell as for you.



With both ends of the cable connected, please run the ip addr command on 
one of your hosts and post the complete output.


galen
--
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Tyrell Jentink
On the second side, the interface name is enp0s29u1u1u4. On the first side,
the output doesn't make sense, I would try again.

BUT, of interest, it looks like the hardware in the middle of the cable
turns out to be two Prolific USB-to-serial adapters back to back in
Ethernet Emulator mode... So, while this WILL work, it was also suggested
already, and failed the "Not ethernet" requirement in the original problem
statement...

On Tue, Jun 19, 2018, 08:16 Richard Owlett  wrote:

> Plug in one end of cable
> [ 1882.167155] usb 4-1.1.4: new high-speed USB device number 4 using
> ehci-pci
> [ 1882.278177] usb 4-1.1.4: New USB device found, idVendor=067b,
> idProduct=25a1
> [ 1882.278183] usb 4-1.1.4: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [ 1882.278187] usb 4-1.1.4: Product: USB Transfer Cable
> [ 1882.278191] usb 4-1.1.4: Manufacturer: Prolific Technology Inc.
> [ 1882.301597] plusb 4-1.1.4:1.0 usb0: register 'plusb' at
> usb-:00:1d.0-1.1.4, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1,
> 1e:1c:40:06:14:68
> [ 1882.301642] usbcore: registered new interface driver plusb
> [ 1882.306204] plusb 4-1.1.4:1.0 enp0s29u1u1u4: renamed from usb0
> [ 1882.333434] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u4: link is not ready
>
>
> Plug in other end of cable also
> [ 1887.342562] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> dropped
> [ 1887.342580] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> dropped
> [ 1887.344176] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> dropped
> [ 1887.344197] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been
> dropped
> [ 1906.022817] usb 4-1.1.3: new high-speed USB device number 5 using
> ehci-pci
> [ 1906.133374] usb 4-1.1.3: New USB device found, idVendor=067b,
> idProduct=25a1
> [ 1906.133381] usb 4-1.1.3: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
> [ 1906.133385] usb 4-1.1.3: Product: USB Transfer Cable
> [ 1906.133389] usb 4-1.1.3: Manufacturer: Prolific Technology Inc.
> [ 1906.134334] plusb 4-1.1.3:1.0 usb0: register 'plusb' at
> usb-:00:1d.0-1.1.3, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1,
> 1e:1c:40:06:14:68
> [ 1906.152962] plusb 4-1.1.3:1.0 enp0s29u1u1u3: renamed from usb0
> [ 1906.185788] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u3: link is not ready
> [ 1911.405952] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> dropped
> [ 1911.405966] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> dropped
> [ 1911.407590] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> dropped
> [ 1911.407614] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been
> dropped
> root@debian-jan13:/home/richard#
>
>
>
>
> On 06/19/2018 08:12 AM, Russell Senior wrote:
> > Just as an example of something remotely like what you might expect to
> see
> > in the dmesg output, here's what I see when I plug a usb-ethernet adapter
> > into a Ubuntu 16.04 USB 3 port:
> >
> > [...]
> > [2793539.351788] usb 3-2: new SuperSpeed USB device number 2 using
> xhci_hcd
> > [2793539.378837] usb 3-2: New USB device found, idVendor=0b95,
> > idProduct=1790
> > [2793539.378846] usb 3-2: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=3
> > [2793539.378851] usb 3-2: Product: AX88179
> > [2793539.378856] usb 3-2: Manufacturer: ASIX Elec. Corp.
> > [2793539.378861] usb 3-2: SerialNumber: 50B61F4505
> > [2793540.800220] ax88179_178a 3-2:1.0 eth0: register 'ax88179_178a' at
> > usb-:00:14.0-2, ASIX AX88179 USB 3.0 Gigabit Ethernet,
> 00:50:b6:1f:45:05
> > [2793540.801218] usbcore: registered new interface driver ax88179_178a
> > [2793540.842186] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> > [2793541.169959] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
> >
> > The link is not ready because I haven't connected an ethernet cable to
> the
> > adapter, nor an active device to the other end of the ethernet cable.
> > Note, in my case I see the ethernet interface is named eth0. Your mileage
> > may vary.
> >
> > On Tue, Jun 19, 2018 at 5:27 AM, Russell Senior <
> russ...@personaltelco.net>
> > wrote:
> >
> >> So, do you see the usbN interface or not?
> >>
> >> On Tue, Jun 19, 2018 at 5:12 AM, Richard Owlett 
> >> wrote:
> >>
> >>> On 06/19/2018 06:45 AM, Russell Senior wrote:
> >>>
>  Here is someone 10 years ago, using debian:
> 
> 
>  https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-
>  usb-to-usb-bridge-in-linux/
> 
> >>>
> >>> Now bookmarked. I read. It stated in part "... a new usbX network
> >>> interface (view with `ifconfig -a`)."
> >>> I tried and was given much - need to read up to understand what it
> tells
> >>> me.
> >>>
> >>> Then I read the rest of your post ;/
> >>>
> >>>
> >>>
>  What your distribution does (even if it is still Debian) might be
>  different
>  today, but it looks like it creates a network interface (usbN, in this
>  case).  Again, your mileage might vary, but the dmesg output should
> tell
>  you what interf

Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Larry Brigman
On Tue, Jun 19, 2018 at 5:13 AM Richard Owlett  wrote:

> On 06/19/2018 06:45 AM, Russell Senior wrote:
> > Here is someone 10 years ago, using debian:
> >
> >
> >
> https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-usb-to-usb-bridge-in-linux/
>
> Now bookmarked. I read. It stated in part "... a new usbX network
> interface (view with `ifconfig -a`)."
> I tried and was given much - need to read up to understand what it tells
> me.
>
> Then I read the rest of your post ;/
>
> ifconfig will only output the interfaces that have been configured.  If
the usbN interface(or some other name) has been created but not configured,
you will only see it in the dmesg or the ip link command output.
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Richard Owlett

Plug in one end of cable
[ 1882.167155] usb 4-1.1.4: new high-speed USB device number 4 using 
ehci-pci
[ 1882.278177] usb 4-1.1.4: New USB device found, idVendor=067b, 
idProduct=25a1
[ 1882.278183] usb 4-1.1.4: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0

[ 1882.278187] usb 4-1.1.4: Product: USB Transfer Cable
[ 1882.278191] usb 4-1.1.4: Manufacturer: Prolific Technology Inc.
[ 1882.301597] plusb 4-1.1.4:1.0 usb0: register 'plusb' at 
usb-:00:1d.0-1.1.4, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1, 
1e:1c:40:06:14:68

[ 1882.301642] usbcore: registered new interface driver plusb
[ 1882.306204] plusb 4-1.1.4:1.0 enp0s29u1u1u4: renamed from usb0
[ 1882.333434] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u4: link is not ready


Plug in other end of cable also
[ 1887.342562] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1887.342580] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1887.344176] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1887.344197] plusb 4-1.1.4:1.0 enp0s29u1u1u4: kevent 12 may have been 
dropped
[ 1906.022817] usb 4-1.1.3: new high-speed USB device number 5 using 
ehci-pci
[ 1906.133374] usb 4-1.1.3: New USB device found, idVendor=067b, 
idProduct=25a1
[ 1906.133381] usb 4-1.1.3: New USB device strings: Mfr=1, Product=2, 
SerialNumber=0

[ 1906.133385] usb 4-1.1.3: Product: USB Transfer Cable
[ 1906.133389] usb 4-1.1.3: Manufacturer: Prolific Technology Inc.
[ 1906.134334] plusb 4-1.1.3:1.0 usb0: register 'plusb' at 
usb-:00:1d.0-1.1.3, Prolific PL-2301/PL-2302/PL-25A1/PL-27A1, 
1e:1c:40:06:14:68

[ 1906.152962] plusb 4-1.1.3:1.0 enp0s29u1u1u3: renamed from usb0
[ 1906.185788] IPv6: ADDRCONF(NETDEV_UP): enp0s29u1u1u3: link is not ready
[ 1911.405952] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped
[ 1911.405966] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped
[ 1911.407590] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped
[ 1911.407614] plusb 4-1.1.3:1.0 enp0s29u1u1u3: kevent 12 may have been 
dropped

root@debian-jan13:/home/richard#




On 06/19/2018 08:12 AM, Russell Senior wrote:

Just as an example of something remotely like what you might expect to see
in the dmesg output, here's what I see when I plug a usb-ethernet adapter
into a Ubuntu 16.04 USB 3 port:

[...]
[2793539.351788] usb 3-2: new SuperSpeed USB device number 2 using xhci_hcd
[2793539.378837] usb 3-2: New USB device found, idVendor=0b95,
idProduct=1790
[2793539.378846] usb 3-2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[2793539.378851] usb 3-2: Product: AX88179
[2793539.378856] usb 3-2: Manufacturer: ASIX Elec. Corp.
[2793539.378861] usb 3-2: SerialNumber: 50B61F4505
[2793540.800220] ax88179_178a 3-2:1.0 eth0: register 'ax88179_178a' at
usb-:00:14.0-2, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:50:b6:1f:45:05
[2793540.801218] usbcore: registered new interface driver ax88179_178a
[2793540.842186] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[2793541.169959] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

The link is not ready because I haven't connected an ethernet cable to the
adapter, nor an active device to the other end of the ethernet cable.
Note, in my case I see the ethernet interface is named eth0. Your mileage
may vary.

On Tue, Jun 19, 2018 at 5:27 AM, Russell Senior 
wrote:


So, do you see the usbN interface or not?

On Tue, Jun 19, 2018 at 5:12 AM, Richard Owlett 
wrote:


On 06/19/2018 06:45 AM, Russell Senior wrote:


Here is someone 10 years ago, using debian:


https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-
usb-to-usb-bridge-in-linux/



Now bookmarked. I read. It stated in part "... a new usbX network
interface (view with `ifconfig -a`)."
I tried and was given much - need to read up to understand what it tells
me.

Then I read the rest of your post ;/




What your distribution does (even if it is still Debian) might be
different
today, but it looks like it creates a network interface (usbN, in this
case).  Again, your mileage might vary, but the dmesg output should tell
you what interface name is assigned.

You could also compare the output before and after plugging in the cable
of
the command: ip addr

For example:

   ip addr > /tmp/before-plugging.txt
   [plug in device]
   ip addr > /tmp/after-plugging.txt
   diff -u /tmp/before-plugging.txt /tmp/after-plugging.txt

The difference should be the newly created network interface.



___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug





___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug





___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Russell Senior
Now that you know how to find the interface names, you can use them to
replace eth0 in my examples.

On Mon, Jun 18, 2018 at 8:14 AM, Russell Senior 
wrote:

>
>
>
> The description says, in part:
>
> "Supported by Linux kernel 3.0 and later as a high-speed virtual network
> interface, no special file transfer support."
>
> That implies the cable should provide a network interface to both sides.
>
> What happens when you plug it in?  Look in dmesg (near the bottom right
> after you plug it in) and you should see something that implies a network
> interface has been created.
>
> Then, since it is a a direct network connection, and neither end is
> running a DHCP server, you will need to give both sides a static or manual
> network configuration.
>
> On host A, at shell prompt, you can run the command:
>
>   ip addr add 192.168.66.1/24 dev eth0
>
> and on host B:
>
>   ip addr add 192.168.66.2/24 dev eth0
>
> note that you will need to replace "eth0" with whatever interface name you
> find in dmesg.  It might well have a different name, and the names might be
> different on the two hosts.  You will need to do that every time you plug
> in the cable, or figure out how your distribution can do this for you when
> you plug in the cable.
>
> From a shell on host A, you can then run a command:
>
>   scp  192.168.66.2:
>
> and the file will land with the same name on in your home directory on
> host B.  That assumes your usernames are the same on both computers.  More
> generally:
>
>   scp   192.168.66.2: filename-where-you-want-it-to-land-on-host-B>
>
> "scp" is the secure copy command.  You can also use the command "rsync" to
> move larger swaths of files.  See manpages for scp and rsync for full
> details.
>
>
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Richard Owlett

On 06/19/2018 06:45 AM, Russell Senior wrote:

Here is someone 10 years ago, using debian:


https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-usb-to-usb-bridge-in-linux/

What your distribution does (even if it is still Debian) might be different
today, but it looks like it creates a network interface (usbN, in this
case).  Again, your mileage might vary, but the dmesg output should tell
you what interface name is assigned.

You could also compare the output before and after plugging in the cable of
the command: ip addr

For example:

  ip addr > /tmp/before-plugging.txt
  [plug in device]
  ip addr > /tmp/after-plugging.txt
  diff -u /tmp/before-plugging.txt /tmp/after-plugging.txt

The difference should be the newly created network interface.


The output of the "diff" command was visually cluttered.
I found it easier to just run "ip addr" for each of my test cases. None 
of the tests exceeded the display capability of MATE Terminal.


I have a four port USB expander. I did of one/both end(s) of cable 
plugged in and using permutation of which port(s) used.


All results were of the form:

8: enp0s29u1u1u4:  mtu 1500 qdisc pfifo_fast 
state UNKNOWN group default qlen 1000
link/ether 5a:29:e7:d9:d6:dd brd ff:ff:ff:ff:ff:ff


ONLY

  mtu 1500 qdisc pfifo_fast state UNKNOWN 
group default qlen 1000

was consistent throughout.

All other content was dependent ONLY on physical port used.

More later.




___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Russell Senior
Just as an example of something remotely like what you might expect to see
in the dmesg output, here's what I see when I plug a usb-ethernet adapter
into a Ubuntu 16.04 USB 3 port:

[...]
[2793539.351788] usb 3-2: new SuperSpeed USB device number 2 using xhci_hcd
[2793539.378837] usb 3-2: New USB device found, idVendor=0b95,
idProduct=1790
[2793539.378846] usb 3-2: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[2793539.378851] usb 3-2: Product: AX88179
[2793539.378856] usb 3-2: Manufacturer: ASIX Elec. Corp.
[2793539.378861] usb 3-2: SerialNumber: 50B61F4505
[2793540.800220] ax88179_178a 3-2:1.0 eth0: register 'ax88179_178a' at
usb-:00:14.0-2, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:50:b6:1f:45:05
[2793540.801218] usbcore: registered new interface driver ax88179_178a
[2793540.842186] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[2793541.169959] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

The link is not ready because I haven't connected an ethernet cable to the
adapter, nor an active device to the other end of the ethernet cable.
Note, in my case I see the ethernet interface is named eth0. Your mileage
may vary.

On Tue, Jun 19, 2018 at 5:27 AM, Russell Senior 
wrote:

> So, do you see the usbN interface or not?
>
> On Tue, Jun 19, 2018 at 5:12 AM, Richard Owlett 
> wrote:
>
>> On 06/19/2018 06:45 AM, Russell Senior wrote:
>>
>>> Here is someone 10 years ago, using debian:
>>>
>>>
>>> https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-
>>> usb-to-usb-bridge-in-linux/
>>>
>>
>> Now bookmarked. I read. It stated in part "... a new usbX network
>> interface (view with `ifconfig -a`)."
>> I tried and was given much - need to read up to understand what it tells
>> me.
>>
>> Then I read the rest of your post ;/
>>
>>
>>
>>> What your distribution does (even if it is still Debian) might be
>>> different
>>> today, but it looks like it creates a network interface (usbN, in this
>>> case).  Again, your mileage might vary, but the dmesg output should tell
>>> you what interface name is assigned.
>>>
>>> You could also compare the output before and after plugging in the cable
>>> of
>>> the command: ip addr
>>>
>>> For example:
>>>
>>>   ip addr > /tmp/before-plugging.txt
>>>   [plug in device]
>>>   ip addr > /tmp/after-plugging.txt
>>>   diff -u /tmp/before-plugging.txt /tmp/after-plugging.txt
>>>
>>> The difference should be the newly created network interface.
>>>
>>
>> ___
>> PLUG mailing list
>> PLUG@pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>>
>
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Russell Senior
So, do you see the usbN interface or not?

On Tue, Jun 19, 2018 at 5:12 AM, Richard Owlett  wrote:

> On 06/19/2018 06:45 AM, Russell Senior wrote:
>
>> Here is someone 10 years ago, using debian:
>>
>>
>> https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-
>> usb-to-usb-bridge-in-linux/
>>
>
> Now bookmarked. I read. It stated in part "... a new usbX network
> interface (view with `ifconfig -a`)."
> I tried and was given much - need to read up to understand what it tells
> me.
>
> Then I read the rest of your post ;/
>
>
>
>> What your distribution does (even if it is still Debian) might be
>> different
>> today, but it looks like it creates a network interface (usbN, in this
>> case).  Again, your mileage might vary, but the dmesg output should tell
>> you what interface name is assigned.
>>
>> You could also compare the output before and after plugging in the cable
>> of
>> the command: ip addr
>>
>> For example:
>>
>>   ip addr > /tmp/before-plugging.txt
>>   [plug in device]
>>   ip addr > /tmp/after-plugging.txt
>>   diff -u /tmp/before-plugging.txt /tmp/after-plugging.txt
>>
>> The difference should be the newly created network interface.
>>
>
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Richard Owlett

On 06/19/2018 06:48 AM, Tyrell Jentink wrote:

Wow... He doesn't know what dmesg is, and you're throwing him straight into
pipes, tail, and less? What's wrong with just running a command naked?

This is how people get overwhelmed... And overwhelmed people start asking
questions like "How do I make my Linux system single-user?"



Not to worry! **<*GRIN*>
Though still exploring Linux, I took my first programming course in 60's.



___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Richard Owlett

On 06/19/2018 06:45 AM, Russell Senior wrote:

Here is someone 10 years ago, using debian:


https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-usb-to-usb-bridge-in-linux/


Now bookmarked. I read. It stated in part "... a new usbX network 
interface (view with `ifconfig -a`)."

I tried and was given much - need to read up to understand what it tells me.

Then I read the rest of your post ;/




What your distribution does (even if it is still Debian) might be different
today, but it looks like it creates a network interface (usbN, in this
case).  Again, your mileage might vary, but the dmesg output should tell
you what interface name is assigned.

You could also compare the output before and after plugging in the cable of
the command: ip addr

For example:

  ip addr > /tmp/before-plugging.txt
  [plug in device]
  ip addr > /tmp/after-plugging.txt
  diff -u /tmp/before-plugging.txt /tmp/after-plugging.txt

The difference should be the newly created network interface.


___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Tyrell Jentink
Wow... He doesn't know what dmesg is, and you're throwing him straight into
pipes, tail, and less? What's wrong with just running a command naked?

This is how people get overwhelmed... And overwhelmed people start asking
questions like "How do I make my Linux system single-user?"

On Tue, Jun 19, 2018, 04:38 Russell Senior 
wrote:

> On Tue, Jun 19, 2018 at 4:22 AM, Richard Owlett 
> wrote:
>
> > On 06/18/2018 10:14 AM, Russell Senior wrote:
> >
> >> On Mon, Jun 18, 2018 at 2:55 AM, Richard Owlett 
> >> wrote:
> >> [snip]
> >>
> >>> You say "USB Master-USB Master" cable.  Which one?
> 
> 
> >>> I didn't buy online but from local computer store.
> >>> This page describes what I bought.
> >>> https://www.castleproductshop.com/products/Plugable-Windows-
> >>> Transfer-Cable-for-Windows-10-8-1-8-7-Vista-XP-Includes/588583685
> >>>
> >>>
> >> The description says, in part:
> >>
> >> "Supported by Linux kernel 3.0 and later as a high-speed virtual network
> >> interface, no special file transfer support."
> >>
> >> That implies the cable should provide a network interface to both sides.
> >>
> >> What happens when you plug it in?  Look in dmesg (near the bottom right
> >> after you plug it in) and you should see something that implies a
> network
> >> interface has been created.
> >>
> >
> > I found /usr/share/bash-completion/completions/dmesg dated last year.
> > It was not changed when I plugged or unplugged the cable.
> > HOWEVER, MATE's Network Icon never showed completion.
> > Am I looking in right place?
> >
>
> No, I mean run the dmesg command and look at the tail, something like this:
>
>  # dmesg | tail -n 20
>
> right after you have plugged in the cable.  The tail command prints only
> the (in this case) last 20 lines of output.  If you want to see more, you
> can pipe to less instead:
>
>   # dmesg | less
>
> ... and you can scroll around.
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Russell Senior
Here is someone 10 years ago, using debian:


https://jonmccune.wordpress.com/2008/12/09/prolific-pl-25a1-usb-to-usb-bridge-in-linux/

What your distribution does (even if it is still Debian) might be different
today, but it looks like it creates a network interface (usbN, in this
case).  Again, your mileage might vary, but the dmesg output should tell
you what interface name is assigned.

You could also compare the output before and after plugging in the cable of
the command: ip addr

For example:

 ip addr > /tmp/before-plugging.txt
 [plug in device]
 ip addr > /tmp/after-plugging.txt
 diff -u /tmp/before-plugging.txt /tmp/after-plugging.txt

The difference should be the newly created network interface.

On Tue, Jun 19, 2018 at 4:37 AM, Russell Senior 
wrote:

>
>
> On Tue, Jun 19, 2018 at 4:22 AM, Richard Owlett 
> wrote:
>
>> On 06/18/2018 10:14 AM, Russell Senior wrote:
>>
>>> On Mon, Jun 18, 2018 at 2:55 AM, Richard Owlett 
>>> wrote:
>>> [snip]
>>>
 You say "USB Master-USB Master" cable.  Which one?
>
>
 I didn't buy online but from local computer store.
 This page describes what I bought.
 https://www.castleproductshop.com/products/Plugable-Windows-
 Transfer-Cable-for-Windows-10-8-1-8-7-Vista-XP-Includes/588583685


>>> The description says, in part:
>>>
>>> "Supported by Linux kernel 3.0 and later as a high-speed virtual network
>>> interface, no special file transfer support."
>>>
>>> That implies the cable should provide a network interface to both sides.
>>>
>>> What happens when you plug it in?  Look in dmesg (near the bottom right
>>> after you plug it in) and you should see something that implies a network
>>> interface has been created.
>>>
>>
>> I found /usr/share/bash-completion/completions/dmesg dated last year.
>> It was not changed when I plugged or unplugged the cable.
>> HOWEVER, MATE's Network Icon never showed completion.
>> Am I looking in right place?
>>
>
> No, I mean run the dmesg command and look at the tail, something like this:
>
>  # dmesg | tail -n 20
>
> right after you have plugged in the cable.  The tail command prints only
> the (in this case) last 20 lines of output.  If you want to see more, you
> can pipe to less instead:
>
>   # dmesg | less
>
> ... and you can scroll around.
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Russell Senior
On Tue, Jun 19, 2018 at 4:22 AM, Richard Owlett  wrote:

> On 06/18/2018 10:14 AM, Russell Senior wrote:
>
>> On Mon, Jun 18, 2018 at 2:55 AM, Richard Owlett 
>> wrote:
>> [snip]
>>
>>> You say "USB Master-USB Master" cable.  Which one?


>>> I didn't buy online but from local computer store.
>>> This page describes what I bought.
>>> https://www.castleproductshop.com/products/Plugable-Windows-
>>> Transfer-Cable-for-Windows-10-8-1-8-7-Vista-XP-Includes/588583685
>>>
>>>
>> The description says, in part:
>>
>> "Supported by Linux kernel 3.0 and later as a high-speed virtual network
>> interface, no special file transfer support."
>>
>> That implies the cable should provide a network interface to both sides.
>>
>> What happens when you plug it in?  Look in dmesg (near the bottom right
>> after you plug it in) and you should see something that implies a network
>> interface has been created.
>>
>
> I found /usr/share/bash-completion/completions/dmesg dated last year.
> It was not changed when I plugged or unplugged the cable.
> HOWEVER, MATE's Network Icon never showed completion.
> Am I looking in right place?
>

No, I mean run the dmesg command and look at the tail, something like this:

 # dmesg | tail -n 20

right after you have plugged in the cable.  The tail command prints only
the (in this case) last 20 lines of output.  If you want to see more, you
can pipe to less instead:

  # dmesg | less

... and you can scroll around.
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Richard Owlett

On 06/18/2018 12:58 PM, Galen Seitz wrote:

On 06/18/2018 02:55 AM, Richard Owlett wrote:

On 06/18/2018 02:44 AM, Russell Senior wrote:

 >

That said, consider the following questions as you begin your quest:

You say "networking".  Can you define what you mean by that word?


A LAN with only two computers at a time.



You say "USB Master-USB Master" cable.  Which one?


I didn't buy online but from local computer store.
This page describes what I bought.
https://www.castleproductshop.com/products/Plugable-Windows-Transfer-Cable-for-Windows-10-8-1-8-7-Vista-XP-Includes/588583685 





And, what is your goal in this "networking"?



It started as file sharing. I was using "sneaker net" with flash drives.
When I found that standard Linux can use utilities originally aimed at 
Ethernet for this hardware, the purpose became educational. 
Philosophically very similar to motivation of _Linux from Scratch_ 
without "compile, link, load", but targeting networks.


I must say that I would find it highly amusing if it were discovered 
that said "Transfer-Cable" were to contain two USB to Ethernet adapters 
wired together.  That wart in the middle is certainly big enough for 
that to be the case.


One of the references {which???} said it was based on the USB-serial 
product.




Please post the output from the lsusb command after connecting the cable.



Done. See my reply to Russell.





___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] [OT ? ?? ???] Linux and computer literacy

2018-06-19 Thread Richard Owlett

On 06/18/2018 10:14 AM, Russell Senior wrote:

On Mon, Jun 18, 2018 at 2:55 AM, Richard Owlett  wrote:
[snip]

You say "USB Master-USB Master" cable.  Which one?



I didn't buy online but from local computer store.
This page describes what I bought.
https://www.castleproductshop.com/products/Plugable-Windows-
Transfer-Cable-for-Windows-10-8-1-8-7-Vista-XP-Includes/588583685



The description says, in part:

"Supported by Linux kernel 3.0 and later as a high-speed virtual network
interface, no special file transfer support."

That implies the cable should provide a network interface to both sides.

What happens when you plug it in?  Look in dmesg (near the bottom right
after you plug it in) and you should see something that implies a network
interface has been created.


I found /usr/share/bash-completion/completions/dmesg dated last year.
It was not changed when I plugged or unplugged the cable.
HOWEVER, MATE's Network Icon never showed completion.
Am I looking in right place?

I did a similar exercise yesterday using "lsusb -t" and "lsusb -v"
The relevant extracts are:> With mouse connected, plugin left end of cable
richard@debian-jan13:~$ lsusb -t 
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M

|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 16, If 0, Class=Vendor Specific Class, 
Driver=plusb, 480M
|__ Port 3: Dev 15, If 0, Class=Human Interface Device, 
Driver=usbhid, 1.5M

With mouse connected, plugin both ends of cable
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/3p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 17, If 0, Class=Vendor Specific Class, 
Driver=plusb, 480M
|__ Port 2: Dev 18, If 0, Class=Vendor Specific Class, 
Driver=plusb, 480M
|__ Port 3: Dev 15, If 0, Class=Human Interface Device, 
Driver=usbhid, 1.5M


Do lsusb -v > /home/richard/Desktop/bothends.txt
Extract relavant entries



Bus 004 Device 018: ID 067b:25a1 Prolific Technology, Inc. PL25A1 Host-Host 
Bridge
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  255 Vendor Specific Class
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize064

  idVendor   0x067b Prolific Technology, Inc.
  idProduct  0x25a1 PL25A1 Host-Host Bridge
  bcdDevice   80.06
  iManufacturer   1 
  iProduct2 
  iSerial 0 
  bNumConfigurations  1

  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   39
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x80

  (Bus Powered)
MaxPower  100mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   3
  bInterfaceClass   255 Vendor Specific Class
  bInterfaceSubClass  0 
  bInterfaceProtocol  0 
  iInterface  0 
  Endpoint Descriptor:

bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval   1
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83  EP 3 IN
bmAttributes2
  Transfer TypeBulk
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0200  1x 512 bytes
bInterval   0

Bus 004 Device 017: ID 067b:25a1 Prolific Technology, Inc. PL25A1 Host-Host 
Bridge
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   2.00
  bDeviceClass  255 Vendor Specific Class
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize064

  idVendor   0x067b Prolific Technology, Inc.
  idProduct  0x25a1 PL25A1 Host-Host Bridge
  bcdDevice   80.06
  iManufacturer   1 
  iProduct2 
  iSerial 0