Re: tbird AND javamail both broken

2022-11-19 Thread Gareth Evans
On Sat 19 Nov 2022, at 17:09, gene heskett  
[...]
>> received from this online seller:
[...]

Hi Gene,

If I copy the message source you posted above, starting from  

"Return Path:..." 

and ending at the end of 

"--=_Part_88_360748977.1668870493425--"

then 
- paste that into a into a text file
- save it as gene.eml 
- double-click gene.eml

...it opens with Thunderbird in plaintext view and appears to be empty.  

If I then go to 

View > Message Body As > Original HTML

I can see your original email and their reply, in HTML format.

If you haven't already tried

View > Message Body As > Original HTML

when viewing the "empty" plaintext version of the message, I think it should 
produce the same result as I got from saving the source to a separate file.  If 
not, I'm afraid I can't suggest any reason for that.

> [...] javamail is base64'ing all of the html composed reply to my query. But 
> because t-bird is broken and not re-entrant as it should be, I'm not seeing 
> it. 

It's sometimes necessary to "base64" messages from web-based wrappers to avoid 
bugs in header/message formatting.  I've had this experience with PHPMailer.  
But the failure of "re-entrance" is because one of the blank lines in the 
text/plain multipart section of the raw message is interpreted as content, and 
Tb is displaying it (and more).

If I click on the "blank" plaintext version's window in the (would-be) message 
display area, to give it focus, then 

select all
copy
paste into a text editor

...two line breaks are pasted.  I'm not convinced *two* line breaks should be 
pasted, but there we are.  

I use MATE DE and the Caja file manager.  Tb is my default email client.  
Evolution offers to import the message from mbox format when I: 

- right-click gene.eml 
- Open with... > other application > Evolution Mail and Calendar

...and it shows a preview of the HTML version immediately.  

I'm not sure this is a Tb bug, just perhaps a "purist" way of doing things 
which avoids "knowing what the user really wants", which (more generally) seems 
liable to unintended consequences.

> Or, is there some option I can set that will enable its display.

Much as I seem to recall one, I can't find a way to make Tb display HTML by 
default if it exists.

This rather old forum post suggests that's the way things are, or at least were:

"'View' > 'Message Body As' > 'Original HTML' is the setting to display 
received emails in HTML format"
https://support.mozilla.org/en-US/questions/1113744

The reply there refers to a Tb extension "Allow HTML Temp" 

https://addons.thunderbird.net/en-GB/thunderbird/addon/allow-html-temp/?src=cb-dl-mostpopular?src=cb-dl-mostpopular

but from the description, I'm not sure if this does quite what you want.

Best wishes,
Gareth



Re: FIREFOX is killing the whole PC

2022-11-19 Thread Gareth Evans




> On 19 Nov 2022, at 15:44, Gareth Evans  wrote:
> 
> 
> 
>>> On 19 Nov 2022, at 15:25, Andrew M.A. Cater  wrote:
>>> 
>>> On Sat, Nov 19, 2022 at 09:34:40AM +, Schwibinger Michael wrote:
>>> Hello
>>> 
>>> Any idea?
>>> 
>>> What did happen?
>>> FF did open a page with bad PC,
>>> so it needs 5 minutes to open it.
>>> We killed the tab.
>>> When we now try to open FF
>>> whole PC is blocked.
>>> How can we clean FF
>>> because bad page is in it.
>>> 
>>> Regards
>>> Sophie
>>> 
>> 
>> Hi Sophie,
>> 
> 
>> If you can start the machine and leave it for ten minutes to let Firefox run
>> you may find that you can clear the cache and history. 
> 
> Hi Andy,
> 
> How could history be related?
> 

> Might it be worth just deleting
> 
> /home/username/.cache/mozilla/firefox
> 

(And switching off restoring previous tabs)

> ?
> 
> Thanks
> Gareth



Re: FIREFOX is killing the whole PC

2022-11-19 Thread Gareth Evans



> On 19 Nov 2022, at 15:25, Andrew M.A. Cater  wrote:
> 
> On Sat, Nov 19, 2022 at 09:34:40AM +, Schwibinger Michael wrote:
>> Hello
>> 
>> Any idea?
>> 
>> What did happen?
>> FF did open a page with bad PC,
>> so it needs 5 minutes to open it.
>> We killed the tab.
>> When we now try to open FF
>> whole PC is blocked.
>> How can we clean FF
>> because bad page is in it.
>> 
>> Regards
>> Sophie
>> 
> 
> Hi Sophie,
> 

> If you can start the machine and leave it for ten minutes to let Firefox run
> you may find that you can clear the cache and history. 

Hi Andy,

How could history be related?

Might it be worth just deleting

/home/username/.cache/mozilla/firefox

?

Thanks
Gareth


Re: FIREFOX is killing the whole PC

2022-11-19 Thread Gareth Evans
On Sat 19 Nov 2022, at 13:14, DdB  
wrote:
> Am 19.11.2022 um 10:34 schrieb Schwibinger Michael:
>> Hello
>> 
>> Any idea?
>> 
>> What did happen?
>> FF did open a page with bad PC,
>> so it needs 5 minutes to open it.
>> We killed the tab.
>> When we now try to open FF
>> whole PC is blocked.
>> How can we clean FF
>> because bad page is in it.
>> 
>> Regards
>> Sophie
>> 

> Did you try to start it from the commandline with the option safe-mode?
>
> firefox --safe-mode

If the idea is to prevent previous tabs from opening on startup, that only 
works for me if firefox is already running when I run 

firefox --safe-mode

...which may not be possible for Sophie.

Removing the line:

user_pref("browser.startup.page", 3);

from

/home/username/.mozilla/firefox/XXX.default-esr/prefs.js

has the desired effect (where "XXX" is the appropriate string of letters and 
numbers).

There may be more than one such profile directory, in which case, if other 
users don't rely on tabs being restored, then remove that line from all the 

XXX.whatever/prefs.js 

files you can find.

It may also be necessary to add the line

user_pref("browser.sessionstore.resume_from_crash", false);

I don't know if the order of lines matters.  In my prefs.js, this appears in 
the sequence

user_pref("browser.search.region", "GB");
user_pref("browser.search.widget.inNavBar", true);
user_pref("browser.sessionstore.resume_from_crash", false);

when added from about:config, but the 2nd line is non-default as well as the 
3rd, and these are only present if added manually or set in settings or 
about:config, as appropriate.

Hope that helps
Gareth





Re: tbird broken

2022-11-19 Thread Gareth Evans
On Sat 19 Nov 2022, at 11:23, gene heskett  wrote:
[...]
> Looks like that is part of the problem. viewing src, the only thing 
> wrong is:
>
> --=_Part_191_372484550.1668746343067
> Content-Type: text/plain;charset=UTF-8
> Content-Transfer-Encoding: base64
>
>
> --=_Part_191_372484550.1668746343067
> Content-Type: text/html;charset=UTF-8
> Content-Transfer-Encoding: base64
>
> Separated by the two blanks you see here. 

That looks OK to me.  

If I view the source of a multipart message in Thunderbird (View > Message 
Source), this is the format... (best viewed where lines won't be wrapped as 
this may introduce the appearance of hard line breaks where there are none, 
particularly at "boundary=..."):

### raw message begins
[...headers...]
Date: Thu, 10 Nov 2022 17:07:49 +
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="05d45c0af5b4a05c4d1a60402fc7d9d8c838760bf374b72dc544e84ccb23"
[...more headers...]
Message-Id: [redacted] 

--05d45c0af5b4a05c4d1a60402fc7d9d8c838760bf374b72dc544e84ccb23
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Never miss a deal!  [...]
--05d45c0af5b4a05c4d1a60402fc7d9d8c838760bf374b72dc544e84ccb23
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=ascii

 [...]

--05d45c0af5b4a05c4d1a60402fc7d9d8c838760bf374b72dc544e84ccb23--
### raw message ends

So it seems a single blank line is required: 

- after the headers
- to separate boundary blocks from _subsequent_ content

but newlines preceding a boundary block (except the line after the headers) 
seem to be optional, and part of the section's content if present.

Does a single blank line appear in the plaintext view of your message?  If you 
ctrl+A ctrl+C, can you paste a blank line into a text editor?



Re: tbird broken

2022-11-19 Thread Gareth Evans


> On 19 Nov 2022, at 10:17, Gareth Evans  wrote:
> 
> 
>> On 19 Nov 2022, at 04:08, gene heskett  wrote:
>> 
>> On 11/18/22 19:05, Gareth Evans wrote:
>>>>> [...]
>>> iirc, headers (that is, the lot of them) are supposed to be terminated by a 
>>> blank line (double line break) before message content/multipart 
>>> boundaries/blocks begin
> 
> [...]
> 
>> You're right of coarse, and yes, that was a straight copy paste from a geany 
>> session on the saved message [...]
> 
> If you view the message source in Thunderbird, are the individual headers 
> still separated by blank lines?  Saving the message and examining the output  
> introduces the possibility of CRLF line endings, which Geany may not convert.

I think David Wright is correct that Tb is showing the (empty) plain text 
section.  I didn't notice this at first as I was struck by the blank lines and 
didn't look any further.  

If there were blank lines between headers in the raw message, I think Tb would 
be displaying the contents of the raw message after the first blank line, in 
plaintext, because the chain of headers had been broken at that point, and 
multipart boundaries etc not interpreted.

So I think the blank lines in headers are probably a red herring, however they 
got there.

The base64-encoded string in the text/html part (which begins "PEhUT...") 
converts to HTML:

https://devpal.co/base64-decode/?data=PEhUTUw%2BPEJPRFk%2BPHNwYW4gc3R5bGU9ImNvbG9yOiMwMDAwMDA7Ij48c3BhbiBzdHlsZT0iZm9u%0A%0AdC1mYW1pbHk6QXJpYWwsSG

>> =_Part_164_535344686.1668739861264
>> Content-Type: text/html;charset=UTF-8
>> Content-Transfer-Encoding: base64
>> PEhUT...

What happens if you try (in Tb)

View > Message Body As > Original HTML

?







Re: tbird broken

2022-11-19 Thread Gareth Evans



> On 19 Nov 2022, at 04:08, gene heskett  wrote:
> 
> On 11/18/22 19:05, Gareth Evans wrote:
>>>> [...]
>> iirc, headers (that is, the lot of them) are supposed to be terminated by a 
>> blank line (double line break) before message content/multipart 
>> boundaries/blocks begin

[...]

> You're right of coarse, and yes, that was a straight copy paste from a geany 
> session on the saved message [...]

If you view the message source in Thunderbird, are the individual headers still 
separated by blank lines?  Saving the message and examining the output  
introduces the possibility of CRLF line endings, which Geany may not convert.


Re: tbird broken

2022-11-18 Thread Gareth Evans



> On 18 Nov 2022, at 23:29, gene heskett  wrote:
> 
> On 11/18/22 15:48, Curt wrote:
>>> On 2022-11-18, gene heskett  wrote:
>>> On 11/18/22 08:05, Jeffrey Walton wrote:
>>>> On Thu, Nov 17, 2022 at 11:53 PM gene heskett  wrote:
>>>>> 
>>>>> I've just discovered that either tbird  is busted, or its missing
>>>>> whatever it takes to display a properly mimetyped base64 encoded content.
>>>>> 
>>>>> What do I install to make this work, I'm looking at an empty screen when
>>>>> the raw msg has bout 10k of base64'd content.
>>>>> 
>>>>> bullseye, intel i5, uptodate yesterday.
>>>> 
>>>> Maybe https://bugzilla.mozilla.org/show_bug.cgi?id=1777439 ?
>>>> 
>>>> .
>>> This seems to be NNTP related. But this is imap email, and no errors are
>>> reported, it simply does not decode and display base64'd content that
>>> appears to be properly MIMETYPED, boundary lines present and matched.
>> Maybe show the headers of the problem email, because I've read
>> Thunderbird is strict in that regard.
>>> Cheers, Gene Heskett.
> 
> here is the msg up to the first line of the base64:
> Return-Path: 
> 
> Received: from 216.163.176.191 unverified ([216.163.176.191]) by 
> mwde08oc.mail2world.com with Mail2World SMTP Server;
> 
>Thu, 17 Nov 2022 18:50:54 -0800
> 
> Received: from [115.124.28.121] (port=37128 helo=out28-121.mail.aliyun.com)
> 
>by prd-mail2world-inbound-ash1-018.ash1.cynet with esmtps  (TLS1.2) tls 
> TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
> 
>(Exim 4.94.2)
> 
>(envelope-from )
> 
>id 1ovrT7-000c7v-2g
> 
>for ghesk...@shentel.net; Fri, 18 Nov 2022 02:51:05 +
> 
> X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R211e2;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047194;MF=c...@omc-stepperonline.com;NM=1;PH=DS;RN=1;RT=1;SR=0;TI=SMTPD_---.QADTSrI_1668739861;
> 
> Received: from iZuf677iw3xihpZ(mailfrom:c...@omc-stepperonline.com 
> fp:SMTPD_---.QADTSrI_1668739861)
> 
>  by smtp.aliyun-inc.com;
> 
>  Fri, 18 Nov 2022 10:51:01 +0800
> 
> Date: Fri, 18 Nov 2022 10:51:01 +0800 (CST)
> 
> From: c...@omc-stepperonline.com
> 
> To: gene heskett 
> 
> Message-ID: <288312227.165.1668739861266@iZuf677iw3xihpZ>
> 
> Subject: Re:Re: STEPPERONLINE - Enquiry from ghesk...@shentel.net
> 
> MIME-Version: 1.0
> 
> Content-Type: multipart/alternative;
> 
>boundary="=_Part_164_535344686.1668739861264"
> 
> X-mailer: javamail@rebee
> 
> X-CTCH-Spam: Unknown
> 
> X-CTCH-VOD: Unknown
> 
> x-ctasd: uncategorized
> 
> x-ctasd-vod: uncategorized
> 
> X-CTCH-Flags: 0
> 
> X-CTCH-RefID: 
> str=0001.0A742F21.6376F319.001D:SCFSTAT68748618,ss=1,re=-4.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0
> 
> X-CTASD-IP: 115.124.28.121
> 
> X-CTASD-Sender: c...@omc-stepperonline.com
> 
> X-OpenTrafficX: clean
> 
> X-OpenTrafficX-type: clean
> 
> X-OpenTrafficX-ID: 155810::1668739865-C1AB8BFC-07DF5517/0/0
> 
> 
> 
> --=_Part_164_535344686.1668739861264
> 
> Content-Type: text/plain;charset=UTF-8
> 
> Content-Transfer-Encoding: base64
> 
> 
> 
> 
> 
> --=_Part_164_535344686.1668739861264
> 
> Content-Type: text/html;charset=UTF-8
> 
> Content-Transfer-Encoding: base64
> 
> 
> 
> PEhUTUw+PEJPRFk+PHNwYW4gc3R5bGU9ImNvbG9yOiMwMDAwMDA7Ij48c3BhbiBzdHlsZT0iZm9u
> 
> dC1mYW1pbHk6QXJpYWwsSG
>> .
> 
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
> - Louis D. Brandeis
> Genes Web page <http://geneslinuxbox.net:6309/>
> 

Are the blank lines between the headers verbatim from the source?

iirc, headers (that is, the lot of them) are supposed to be terminated by a 
blank line (double line break) before message content/multipart 
boundaries/blocks begin, so that may be part of the problem.  Do the headers of 
other base64 messages look like this?

Thanks
Gareth


Re: Increased read IO wait times after Bullseye upgrade

2022-11-11 Thread Gareth Evans


> On 11 Nov 2022, at 16:59, Vukovics Mihály  wrote:
> 
> Hi Gareth,
> 
> dmesg is "clean", there disks are not shared in any way and there is no 
> virtualization layer installed.
> 
Hello, but the message was from Nicholas :)

Looking at your first graph, I noticed the upgrade seems to introduce a broad 
correlation between read and write iowait.  Write wait before the uptick is 
fairly consistent and apparently unrelated to read wait.

Does that suggest anything to anyone?

In your atop stats, one drive (sdc) is ~50% more "busy" than the others, has 
double the number of writes, a higher avq value and lower avio time.  Is it 
normal for raid devices to vary this much?

Is this degree of difference consistent over time?  Might atop stats during 
some eg. fio tests be useful?

Have you done any filesystem checks? 

Thanks,
Gareth






Re: Increased read IO wait times after Bullseye upgrade

2022-11-10 Thread Gareth Evans
On Thu 10 Nov 2022, at 11:36, Gareth Evans  wrote:
[...]
> I might be barking up the wrong tree ...

But simpler inquiries first.

I was wondering if MD might be too high-level to cause what does seem more like 
a "scheduley" issue -

https://www.thomas-krenn.com/de/wikiDE/images/d/d0/Linux-storage-stack-diagram_v4.10.pdf

but, apparently, even relatively "normal" processes can cause high iowait too:

NFS...
https://www.howtouselinux.com/post/troubleshoot-high-iowait-issue-on-linux-system
https://www.howtouselinux.com/post/use-linux-nfsiostat-to-troubleshoot-nfs-performance-issue

SSH...
Use iotop to find io-hogs...
https://www.howtouselinux.com/post/quick-guide-to-fix-linux-iowait-issue
https://www.howtouselinux.com/post/check-disk-io-usage-per-process-with-iotop-on-linux

What's a typical wa value (%) from top?

Thanks,
G






Re: Increased read IO wait times after Bullseye upgrade

2022-11-10 Thread Gareth Evans
On Thu 10 Nov 2022, at 11:36, Gareth Evans  wrote:
[...]
> This assumes the identification of the driver in [3] (below) is 
> anything to go by.  

I meant [1] not [3].

Also potentially of interest:

"Queue depth

The queue depth is a number between 1 and ~128 that shows how many I/O requests 
are queued (in-flight) on average. Having a queue is beneficial as the requests 
in the queue can be submitted to the storage subsystem in an optimised manner 
and often in parallel. A queue improves performance at the cost of latency.

If you have some kind of storage performance monitoring solution in place, a 
high queue depth could be an indication that the storage subsystem cannot 
handle the workload. You may also observe higher than normal latency figures. 
As long as latency figures are still within tolerable limits, there may be no 
problem."

https://louwrentius.com/understanding-storage-performance-iops-and-latency.html

See 

$ cat /sys/block/sdX/device/queue_depth



Re: Increased read IO wait times after Bullseye upgrade

2022-11-10 Thread Gareth Evans
On Thu 10 Nov 2022, at 07:04, Vukovics Mihaly  wrote:
> Hi Gareth,
>
> - Smartmon/smarctl does not report any hw issues on the HDDs.
> - Fragmentation score is 1 (not fragmented at all)
> - 18% used only
> - RAID status is green (force-resynced)
> - rebooted several times
> - the IO utilization is almost zero(!) - chart attached
> - tried to change the io scheduler of the disks from mq-deadline to noop: 
> does not bring change.
> - the read latency increased on ALL 4 discs by the bullseye upgrade!
> - no errors/warnings in kern.log/syslog/messages
>
> Br,
> Mihaly

Hi Mihaly,

People here often recommend SATA cable/connection checks - might this be 
worthwhile?

"[using] 

iostat -mxy 10 

[...]

If %util is consistently under 30% most of the time, most likely you don’t have 
a problem with disk i/o. If you’re on the fence, you can also look at r_await 
and w_await columns — the average amount of time in milliseconds a read or 
write disk request is waiting before being serviced — to see if the drive is 
able to handle requests in a timely manner. A value less than 10ms for SSD or 
100ms for hard drives is usually not cause for concern,"

(-- from the article linked in my first response)

Are the {r,w}_await values what is shown in your first chart, inter alia?  I 
imagine so.

Does performance actually seem to be suffering?

Unfortunately I can't try to replicate this as I don't have a HDD system, let 
alone MDRAID5, hence the rather basic questions, which you may well already 
have considered.  

Write wait time has also increased somewhat, according to your first graph.

Is anything hogging CPU?  

Free memory/swap usage seems unlikely to be the issue after several reboots.

I might be barking up the wrong tree here but do you know which kernel version 
you were using on Buster?  

There were minor version changes to mdadm in Bullseye 
https://packages.debian.org/buster/mdadm
https://packages.debian.org/bullseye/mdadm

which made me wonder if in-kernel parts of MD changed too.

It might be interesting to diff the relevant kernel sources between Buster and 
Bullseye, perhaps starting with drivers/md/raid5.c extracted from 
/usr/src/linux-source-{KERNEL-VERSION}.tar.xz

https://packages.debian.org/search?keywords=linux-source=names=oldstable=all

https://packages.debian.org/bullseye/linux-source-5.10

This assumes the identification of the driver in [3] (below) is anything to go 
by.  

$ apt-file search md/raid456

[on Bullseye] seems to agree.

[though are sources up to date?...
$ uname -a 
... 5.10.149-2 ...

vs

"Package: ... (5.10.140-1)"
https://packages.debian.org/bullseye/linux-source-5.10]

I'm somewhat out of my range of experience here and this would be very much "an 
exercise" for me.  

I'm sorry I can't try to replicate the issue.  Can you, on another system, if 
you have time?

Best wishes,
G

[1]  "Initial driver: 
/lib/modules/4.18.0-305.el8.x86_64/kernel/drivers/md/raid456.ko.xz
I think this has been changed?"
https://grantcurell.github.io/Notes%20on%20mdraid%20Performance%20Testing/




Re: Increased read IO wait times after Bullseye upgrade

2022-11-08 Thread Gareth Evans
On Tue  8 Nov 2022, at 09:48, Vukovics Mihály  wrote:
> Hello Community,
>
> since I have upgraded my debian 10 to 11, the read IO wait time of all 
> disks have been increased dramatically.
[...]
> Chart attached, you can clearly see the date of the upgrade.
>
> Any ideas?

Hello,

I'm not an expert in the area, but a few thoughts:

---
(Seemingly unlikely issues)
Hardware problems coincident with upgrade - smartmon tests?
Fragmentation?  What % capacity is used?  What filesystem?
---

RAID status?

Have you rebooted?

After a quick web search, this article suggests iowait may not be the best 
indicator of problems (though not sure if this extends to wait times for 
particular operations)...

https://ioflood.com/blog/2021/01/25/iowait-in-linux-is-iowait-too-high/

...does iostat's %util give cause for concern? (per the article)

HDDs or SSDs?  The article suggests ~100ms may be reasonble for HDDs - your 
chart only seems to show one outstandingly high wait time - do you actually 
notice a difference in performance?

Not sure if any of that helps but I will follow the thread with interest.

Nice chart btw.  What produced the data and the chart itself?

Best wishes,
Gareth



Re: OT : Debian VPS for backup through SFTP protocol for a win10 client

2022-09-28 Thread Gareth Evans
On Thu 29 Sep 2022, at 00:29, Gareth Evans  wrote:
[...]
> Alternatively, BackupPC supports Windows:
>
> https://backuppc.github.io/backuppc

Actually rsync (as opposed to tar or SMB over the internet) seems to be the 
only BackupPC option for a Windows backup source where the backup server is 
remote, so either cygwin or WSL or cwrsync are required here too afaics.  
BackupPC also deduplicates backups though, with optional compression.

See "Features"
https://backuppc.github.io/backuppc/info.html



Re: OT : Debian VPS for backup through SFTP protocol for a win10 client

2022-09-28 Thread Gareth Evans
On Wed 28 Sep 2022, at 17:25, rudu  wrote:
> Hello,
>
> I've set up openssh-server on a debian bullseye VPS which serves as a 
> backup for some folders of debian testing laptops.
> I'm using luckybackup for the clients part and all seems fine so far.
> Now I'm asked to add a pair of win10 boxes to the clients of that VPS, 
> and I don't know how I could do this.
> I tried successfully to mount my VPS volume as a network drive using 
> SSHFS for windows :
> https://github.com/winfsp/sshfs-win
> But I can't find a way or a software (preferably free) able to schedule 
> some incremental backup on it.
>
> I know I'm a bit OT on this, but maybe someone has already been there 
> and could send me in the right direction.
>
> Thanks for reading me anyway,
> Rudu

Hi Rudu,

I must admit to not having actually done this with Windows, but as no one has 
yet replied  with concrete experience, some ideas:

Borgbackup is excellent 

https://borgbackup.readthedocs.io/en/stable/

and is said to work on Windows via either Windows Subsystem for Linux (WSL) 

https://learn.microsoft.com/en-us/windows/wsl/install

or Cygwin

https://www.cygwin.com/

For the latter approach, the script below (or one like it) may be useful:

https://github.com/santiagobiali/borg-cygwin

Alternatively, BackupPC supports Windows:

https://backuppc.github.io/backuppc

Alternatively, rsync (again via WSL or Cygwin) or cwrsync may be useful.

https://www.itefix.net/cwrsync

It might be simpler (or at least another option is...) to use rsync to sync 
changes to the server, then use borg to create local (automatically 
deduplicated) archives on the server, from the ever-current/latest backup.

I would be interested to know if you discover anything else good for Windows.

robocopy + server-side borg might work (and might be simpler than Cygwin/WSL 
etc), but I'm not sure if robocopy is capable of operating beyond the LAN.  All 
of the examples I can find, such as

https://recoverit.wondershare.com/computer-backup/sync-changes-only-with-robocopy.html

https://pureinfotech.com/robocopy-transfer-files-fast-network-windows-10/

make use of local hostnames or local IP addresses, though if you can mount 
sshfs as a drive/folder that may not be an issue.

I'd be interested to hear how you get on, however you approach it.

Best wishes,
Gareth



Re: OT: mysql-workbench alternative

2022-09-25 Thread Gareth Evans
On 24 Sep 2022, at 22:55, Nicholas Geovanis  wrote:On Sat, Sep 24, 2022, 2:47 PM Gareth Evans <donots...@fastmail.fm> wrote:Given what looks to be the ongoing absence of mysql-workbench in stable:

https://tracker.debian.org/pkg/mysql-workbench

Can anyone recommend a free (at least as in beer) alternative that creates ERDs automatically from MariaDB?It's just an educated guess but can't doxygen do that?I'll have a look at that.Search results for doxygen include schemaspy as a preferred alternative (at least for someone) - so will try that too.I was hoping for a database... IDE? ... rather than a diagramming tool alone, but one of the above in combination with my current preferred DB admin front end might just do.Thanks,Gareth

OT: mysql-workbench alternative

2022-09-24 Thread Gareth Evans
Given what looks to be the ongoing absence of mysql-workbench in stable:

https://tracker.debian.org/pkg/mysql-workbench

Can anyone recommend a free (at least as in beer) alternative that creates ERDs 
automatically from MariaDB?

I tried installing mysql-workbench-community from mysql.com on Ubuntu 22.04, 
but it wouldn't find MariaDB (which was running) to attempt to connect with, so 
not sure if that's what I really want anyway!

Running under Wine is an option if necessary.  

Thanks,
Gareth



Re: How do I install PHPMailer on a Debian/Bullseye Apache2 server -- resolved

2022-09-07 Thread Gareth Evans


> On 8 Sep 2022, at 02:52, Gary Dale  wrote:
> 
> 
> On 2022-09-07 17:49, Gareth Evans wrote:
>> 
>> 
>>> On 7 Sep 2022, at 22:24, Gareth Evans  wrote:
>>> 
>>> 
>>> 
>>> 
>>>> On 7 Sep 2022, at 22:01, Gareth Evans  wrote:
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On 7 Sep 2022, at 21:27, Gareth Evans  wrote:
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>> On 7 Sep 2022, at 17:55, Gary Dale  wrote:
>>>>>> I'm using a web hosting company that pretty much limits me to using 
>>>>>> PHPMailer on their servers for sending complex e-mails (e.g. with 
>>>>>> attachments). That is working.
>>>>>> 
>>>>>> [...]
>>>>> 
>>>>>> However when I try it with my local Apache2 server, it doesn't work.
>>>>> [...]
>>>>>> However the test .php file that works on the hosting company's server 
>>>>>> doesn't do anything on my local server. I try to load the page and get 
>>>>>> nothing - not even an error message.
>>>>> 
>>>>> Hi Gary,
>>>>> 
>>>>> If you expect output of some sort from the script, try putting
>>>>> 
>>>>> ini_set("display_errors",1);
>>>>> ini_set("error_reporting",E_ALL);
>>>>> 
>>>>> at the top of the script in question - this should show any errors on the 
>>>>> page rather than having to look in /var/log/syslog, though that might be 
>>>>> worthwhile too.
>>>>> 
>>>>> Also
>>>>> 
>>>>> $ php -l file.php
>>>>> (Lower case L after dash)
>>>>> 
>>>>> Do you receive any bounce message in (iirc... or something like...)
>>>>> /var/spool/mail/username ?
>>>>> 
>>>>> Not knowing whether you expect output, it could be that the script is 
>>>>> working but the remote server rejects mail from non-routable (ie LAN) IPs 
>>>>> - I don't think a bounce message is necessarily guaranteed though.
>>>>> 
>>>>> Any difference sending with PHPMailer via SMTP ?
>>>>> 
>>>>> Best wishes,
>>>>> Gareth
>>>>> 
>>>> 
>>>> Having said that re bounce messages, I can'tremember if the error report 
>>>> concerned, if any, may actually be found in syslog - it's a while since 
>>>> I've seen one as I gave up testing email from local machines for this 
>>>> reason.
>>>> 
>>>> Possibly getting ahead of myself here, but it might also be worth 
>>>> mentioning greylisting as an issue to be aware of - particularly for email 
>>>> originating from non-routable addresses.
>>>> 
>>>> "Mail from unrecognized servers is typically delayed by about 15 minutes, 
>>>> and could be delayed up to a few days for poorly configured sending 
>>>> systems."
>>>> 
>>>> https://en.m.wikipedia.org/wiki/Greylisting_(email)
>>>> 
>>> 
>>> Also does the (working) server run the same OS as your local machine?
>>> 
>>> You may need to correct the location of sendmail (or whatever) in local 
>>> phpmailer's config
>> 
>> Owner / group / permissions for phpmailer dir + files?  I should have 
>> thought of that one first - it's a common PHP "white screen of death" cause.
>> 
> 
> Thanks Gareth. I didn't notice your answer because it was in a different 
> thread. I've been working directly on the remote host all afternoon until I 
> get the php script doing (mostly) what I want. When I followed your 
> suggestion, it showed errors relating to file permissions on a file that I 
> wanted to write to. I changed them and now its working the same as the remote 
> host.
> 
> However, the writing to the file wasn't part of the script in the morning. It 
> was something I added after I got the script working on the remote host and 
> wanted to add features. The basic script was just a test script with 
> everything hardcoded. The one that is now working is actually driven by an 
> HTML form so just the SMTP login is hardcoded. The writing to a file was a 
> late addition to create a cumulative .csv log of submissions. I just needed 
> to allow the file to be written to to get this later script to work.
> 
> Anyway, it looks like the issue has gone away.
> 
> Thanks!

I use various email clients which all have a mind of their own when it comes to 
threads.

Interesting.  For future ref, it's not unknown for strange PHP errors or 
behaviour (on Apache at least) to be solved by a reboot - may be worth trying 
if all else fails.

Best wishes,
Gareth

Re: How do I install PHPMailer on a Debian/Bullseye Apache2 server

2022-09-07 Thread Gareth Evans


> On 7 Sep 2022, at 22:24, Gareth Evans  wrote:
> 
> 
> 
> 
>>> On 7 Sep 2022, at 22:01, Gareth Evans  wrote:
>>> 
>> 
>> 
>> 
>>>> On 7 Sep 2022, at 21:27, Gareth Evans  wrote:
>>>> 
>>> 
>>> 
>>> 
>>>> On 7 Sep 2022, at 17:55, Gary Dale  wrote:
>>>> I'm using a web hosting company that pretty much limits me to using 
>>>> PHPMailer on their servers for sending complex e-mails (e.g. with 
>>>> attachments). That is working.
>>>> 
>>>> [...]
>>> 
>>>> However when I try it with my local Apache2 server, it doesn't work.
>>> [...]
>>>> However the test .php file that works on the hosting company's server 
>>>> doesn't do anything on my local server. I try to load the page and get 
>>>> nothing - not even an error message.
>>> 
>>> Hi Gary,
>>> 
>>> If you expect output of some sort from the script, try putting
>>> 
>>> ini_set("display_errors",1);
>>> ini_set("error_reporting",E_ALL);
>>> 
>>> at the top of the script in question - this should show any errors on the 
>>> page rather than having to look in /var/log/syslog, though that might be 
>>> worthwhile too.
>>> 
>>> Also
>>> 
>>> $ php -l file.php
>>> (Lower case L after dash)
>>> 
>>> Do you receive any bounce message in (iirc... or something like...)
>>> /var/spool/mail/username ?
>>> 
>>> Not knowing whether you expect output, it could be that the script is 
>>> working but the remote server rejects mail from non-routable (ie LAN) IPs - 
>>> I don't think a bounce message is necessarily guaranteed though.
>>> 
>>> Any difference sending with PHPMailer via SMTP ?
>>> 
>>> Best wishes,
>>> Gareth
>>> 
>> 
>> Having said that re bounce messages, I can'tremember if the error report 
>> concerned, if any, may actually be found in syslog - it's a while since I've 
>> seen one as I gave up testing email from local machines for this reason.
>> 
>> Possibly getting ahead of myself here, but it might also be worth mentioning 
>> greylisting as an issue to be aware of - particularly for email originating 
>> from non-routable addresses.
>> 
>> "Mail from unrecognized servers is typically delayed by about 15 minutes, 
>> and could be delayed up to a few days for poorly configured sending systems."
>> 
>> https://en.m.wikipedia.org/wiki/Greylisting_(email)
>> 
> 
> Also does the (working) server run the same OS as your local machine?
> 
> You may need to correct the location of sendmail (or whatever) in local 
> phpmailer's config

Owner / group / permissions for phpmailer dir + files?  I should have thought 
of that one first - it's a common PHP "white screen of death" cause.




Re: How do I install PHPMailer on a Debian/Bullseye Apache2 server

2022-09-07 Thread Gareth Evans


> On 7 Sep 2022, at 22:01, Gareth Evans  wrote:
> 
> 
> 
> 
>>> On 7 Sep 2022, at 21:27, Gareth Evans  wrote:
>>> 
>> 
>> 
>> 
>>> On 7 Sep 2022, at 17:55, Gary Dale  wrote:
>>> I'm using a web hosting company that pretty much limits me to using 
>>> PHPMailer on their servers for sending complex e-mails (e.g. with 
>>> attachments). That is working.
>>> 
>>> [...]
>> 
>>> However when I try it with my local Apache2 server, it doesn't work.
>> [...]
>>> However the test .php file that works on the hosting company's server 
>>> doesn't do anything on my local server. I try to load the page and get 
>>> nothing - not even an error message.
>> 
>> Hi Gary,
>> 
>> If you expect output of some sort from the script, try putting
>> 
>> ini_set("display_errors",1);
>> ini_set("error_reporting",E_ALL);
>> 
>> at the top of the script in question - this should show any errors on the 
>> page rather than having to look in /var/log/syslog, though that might be 
>> worthwhile too.
>> 
>> Also
>> 
>> $ php -l file.php
>> (Lower case L after dash)
>> 
>> Do you receive any bounce message in (iirc... or something like...)
>> /var/spool/mail/username ?
>> 
>> Not knowing whether you expect output, it could be that the script is 
>> working but the remote server rejects mail from non-routable (ie LAN) IPs - 
>> I don't think a bounce message is necessarily guaranteed though.
>> 
>> Any difference sending with PHPMailer via SMTP ?
>> 
>> Best wishes,
>> Gareth
>> 
> 
> Having said that re bounce messages, I can'tremember if the error report 
> concerned, if any, may actually be found in syslog - it's a while since I've 
> seen one as I gave up testing email from local machines for this reason.
> 
> Possibly getting ahead of myself here, but it might also be worth mentioning 
> greylisting as an issue to be aware of - particularly for email originating 
> from non-routable addresses.
> 
> "Mail from unrecognized servers is typically delayed by about 15 minutes, and 
> could be delayed up to a few days for poorly configured sending systems."
> 
> https://en.m.wikipedia.org/wiki/Greylisting_(email)
> 

Also does the (working) server run the same OS as your local machine?

You may need to correct the location of sendmail (or whatever) in local 
phpmailer's config

Re: How do I install PHPMailer on a Debian/Bullseye Apache2 server

2022-09-07 Thread Gareth Evans


> On 7 Sep 2022, at 21:27, Gareth Evans  wrote:
> 
> 
> 
> 
>> On 7 Sep 2022, at 17:55, Gary Dale  wrote:
>> I'm using a web hosting company that pretty much limits me to using 
>> PHPMailer on their servers for sending complex e-mails (e.g. with 
>> attachments). That is working.
>> 
>> [...]
> 
>> However when I try it with my local Apache2 server, it doesn't work.
> [...]
>> However the test .php file that works on the hosting company's server 
>> doesn't do anything on my local server. I try to load the page and get 
>> nothing - not even an error message.
> 
> Hi Gary,
> 
> If you expect output of some sort from the script, try putting
> 
> ini_set("display_errors",1);
> ini_set("error_reporting",E_ALL);
> 
> at the top of the script in question - this should show any errors on the 
> page rather than having to look in /var/log/syslog, though that might be 
> worthwhile too.
> 
> Also
> 
> $ php -l file.php
> (Lower case L after dash)
> 
> Do you receive any bounce message in (iirc... or something like...)
> /var/spool/mail/username ?
> 
> Not knowing whether you expect output, it could be that the script is working 
> but the remote server rejects mail from non-routable (ie LAN) IPs - I don't 
> think a bounce message is necessarily guaranteed though.
> 
> Any difference sending with PHPMailer via SMTP ?
> 
> Best wishes,
> Gareth
> 

Having said that re bounce messages, I can'tremember if the error report 
concerned, if any, may actually be found in syslog - it's a while since I've 
seen one as I gave up testing email from local machines for this reason.

Possibly getting ahead of myself here, but it might also be worth mentioning 
greylisting as an issue to be aware of - particularly for email originating 
from non-routable addresses.

"Mail from unrecognized servers is typically delayed by about 15 minutes, and 
could be delayed up to a few days for poorly configured sending systems."

https://en.m.wikipedia.org/wiki/Greylisting_(email)



Re: How do I install PHPMailer on a Debian/Bullseye Apache2 server

2022-09-07 Thread Gareth Evans



> On 7 Sep 2022, at 17:55, Gary Dale  wrote:
> I'm using a web hosting company that pretty much limits me to using 
> PHPMailer on their servers for sending complex e-mails (e.g. with 
> attachments). That is working.
> 
> [...]

> However when I try it with my local Apache2 server, it doesn't work.
[...]
> However the test .php file that works on the hosting company's server doesn't 
> do anything on my local server. I try to load the page and get nothing - not 
> even an error message.

Hi Gary,

If you expect output of some sort from the script, try putting

ini_set("display_errors",1);
ini_set("error_reporting",E_ALL);

at the top of the script in question - this should show any errors on the page 
rather than having to look in /var/log/syslog, though that might be worthwhile 
too.

Also

$ php -l file.php
(Lower case L after dash)

Do you receive any bounce message in (iirc... or something like...)
 /var/spool/mail/username ?

Not knowing whether you expect output, it could be that the script is working 
but the remote server rejects mail from non-routable (ie LAN) IPs - I don't 
think a bounce message is necessarily guaranteed though.

Any difference sending with PHPMailer via SMTP ?

Best wishes,
Gareth





Re: Three unsolvable Problems Printer II

2022-07-27 Thread Gareth Evans
On Thu 28 Jul 2022, at 02:56, gene heskett  wrote:
> [...] The driverless stuff DOES NOT work [...]

Hi Gene,

The reports from you, myself and Hans (and the lack of complaints from 
non-fax-printer users) seem to suggest the problem affects only fax-capable 
printers.  This remains to be seen in Sophie's case, but I wait with interest.

The conversation seemed to drift towards a printer problem, but I think there 
are other possibilities, and barring that, I hope and imagine there are 
solutions for Sophie's printer as there have been for ours.

I do wish the upstream bug report would get some response, and that Debian 
would consider a cups update given that there are no such issues in Ubuntu's 
cups 2.4, though there's more to be considered of course.  I think it's a 
serious breakage that got worse in the recent Bullseye update.  If 
auto-detected/created queues used IPP Everywhere (which seems to work 
flawlessly) it wouldn't be such an issue, but it's a showstopper for 
inexperienced users, not to mention some more experienced ones!

Best wishes,
Gareth



Re: Three unsolvable Problems Printer II

2022-07-27 Thread Gareth Evans



> On 28 Jul 2022, at 00:36, Gareth Evans  wrote:
> 
>>> [...] unless the [driverless] queue was added via lpadmin.

Just to correct the point, i keep forgetting, it seems even this fails with the 
latest cups version on Bullseye where fax printers are concerned.


Re: Three unsolvable Problems Printer II

2022-07-27 Thread Gareth Evans



> On 28 Jul 2022, at 00:36, Gareth Evans  wrote:
> 
> [blah blah blah]

I would like Sophie to confirm the exact model so further checksg can be 
suggested if indicated.  There may be a solution of sorts.

Best wishes,
Gareth


Re: Three unsolvable Problems Printer II

2022-07-27 Thread Gareth Evans


> On 27 Jul 2022, at 23:42, Brian  wrote:
> On Wed 27 Jul 2022 at 22:39:56 +0100, Gareth Evans wrote:
> 
>> On Wed 27 Jul 2022, at 22:28, Gareth Evans  wrote:
>>>> On 25 Jul 2022, at 13:03, Schwibinger Michael  wrote:
>>>> 
>>>> Hello
>>>> Ist the best way to repair
>>>> the self check?
>>>> HP 600
>>> Hi Sophie, please would you confirm the exact model - eg Deskjet 600, 
>>> OfficeJet 600, something else?
>>> If you can't tell from looking at the machine, then running the command
>> 
>>> lpinfo -v
>> 
>> ...that perhaps should have been...
>> 
>> sudo lpinfo -v
> 
> lpinfo is not in a user's path. Use /usr/sbin/lpinfo.
> 
> The main point is that self-checking is a printer function, not a
> printing system function. The question does not have an answer within
> Debian.
> 

Hi Brian,

My understanding is that self-check (where available) and test page printing 
are distinct processes, which may have been conflated here to some extent.

I recall having a printer with self check capability where no feedback was 
reported (on windows, ages ago) if there were no problems.

No disagreement re the independence of self checking functionality, but the 
command still has to be properly transmitted to the right endpoint.  My printer 
doesn't have a self check facility so I can't explore if/how that works with a  
fax printer under different setup conditions.

If the printer concerned is an OfficeJet 600, that is fax capable according to 
hp docs

http://h10032.www1.hp.com/ctg/Manual/bpu60078.pdf

in which case, I think it's possible this  may be another case of the 
driverless+fax bug, where all jobs seem to end up in the outgoing fax queue and 
nothing prints, unless the queue was added via lpadmin. This does seem to be 
Bullseye-cups-related.

I don't know yet if this printer supports driverless printing, or if driverless 
printing is in use, but the lack of test page output alone doesn't seem to 
reliably indicate a hardware or external-to-Debian problem.

Just a thought, or three.

Best wishes,
Gareth



Re: Three unsolvable Problems Printer II

2022-07-27 Thread Gareth Evans
On Wed 27 Jul 2022, at 22:28, Gareth Evans  wrote:
>> On 25 Jul 2022, at 13:03, Schwibinger Michael  wrote:
>>  
>> Hello
>> Ist the best way to repair
>> the self check?
>> 
>> HP 600
> 
> Hi Sophie, please would you confirm the exact model - eg Deskjet 600, 
> OfficeJet 600, something else?
> 
> If you can't tell from looking at the machine, then running the command

> lpinfo -v

...that perhaps should have been...

sudo lpinfo -v

If you see an error about not being in the sudo group, then run the command

su -

and enter the root password, then run the command

lpinfo -v

again

Thanks,
Gareth

Re: Three unsolvable Problems Printer II

2022-07-27 Thread Gareth Evans


> On 25 Jul 2022, at 13:03, Schwibinger Michael  wrote:
> 
> 
> Hello
> Ist the best way to repair
> the self check?
> 
> HP 600

Hi Sophie, please would you confirm the exact model - eg Deskjet 600, OfficeJet 
600, something else?

If you can't tell from looking at the machine, then running the command

lpinfo -v

in a terminal should tell you.

Thanks,
Gareth

Re: root crontab @reboot for loop fails

2022-07-16 Thread Gareth Evans



> On 16 Jul 2022, at 14:39, Anssi Saari  wrote:
> 
> Tixy  writes:
> 
>> rc.local is still run on the latest Debian stable. You need to make
>> sure it's a proper executable, i.e. starts with a shebang like
>> '#!/bin/sh' and the file has execute permissions.
> 
> Yes and that's because the systemd package contains the rc-local.service
> which just runs /etc/rc.local. With a ConditionFileIsExecutable too
> which I wasn't aware of before.

Thanks all, that was both helpful and informative
Gareth


Re: root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
On Sat 16 Jul 2022, at 05:30, Gareth Evans  wrote:

> Why isn't root's $PATH available to root crontab? ie. including the 
> link /sbin -> /usr/sbin?

By which I mean: why can't root crontab do everything sudo can do?

Thanks
G



Re: root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
Hi Greg,

On Sat 16 Jul 2022, at 04:07, Greg Wooledge  wrote:

[...]

> "Well, read the email that cron sends you and see what the errors are."

[amongst others]
/bin/sh: 1: zfs: not found

suggests the need for /usr/sbin/zfs

It seems reasonable that /usr/sbin/* should be available to root crontab.  

Why isn't root's $PATH available to root crontab? ie. including the link /sbin 
-> /usr/sbin?

> "All your crontab entries run in parallel. 

OK thanks.  Is this documented?  

$ man crontab

then

/parallel
[ie search for "parallel"]

returns nothing.

> "If you wanted to run a bunch of commands a boot time, without setting
> up systemd units for them, and proper dependencies, why didn't you just
> use /etc/rc.local?"

I was of the impression (which I think it is fair to say has been created) that 
systemd had done away with /etc/rc.local, and crontab @reboot is much simpler 
than systemd units and whatever dependencies there may be.

> Figure out whether your commands are allowed to run in parallel [...]

They are not.

> If they're not, use a *script* [...]

With /usr/bin/zfs, that's working, thank you.

Best wishes,
Gareth



Re: root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
$ sudo crontab -l
[...]
@reboot for f in $(/usr/sbin/zfs list -t snap -o name|grep reboot); do 
/usr/sbin/zfs destroy $f;done
@reboot /usr/sbin/zfs snap -r rpool@reboot


Prepending "/usr/sbin/" to "zfs" doesn't make a difference.

Thanks,
Gareth



root crontab @reboot for loop fails

2022-07-15 Thread Gareth Evans
Hello,

$ sudo crontab -l | grep reboot
[...]
[1] @reboot sleep 10; nmcli c up 
[2] @reboot for f in $(zfs list -t snap -o name|grep reboot); do zfs destroy 
$f;done
[3] @reboot zfs snap -r rpool@reboot

[1] succeeds, but [2,3] do not.

Any ideas why would be gratefully received.

Many thanks,
Gareth



Re: cups broken

2022-07-14 Thread Gareth Evans
On Thu 14 Jul 2022, at 02:08, gene heskett  wrote:

> it printed a test page

Good.  I'm afraid I don't know of a workaround for tray selection.

This site 

https://productz.com/en/brother-mfc-j6920dw/p/LZbAV

suggests the printer concerned is airprint/fax-capable, and given:

> On Wed 13 Jul 2022, at 18:21, gene heskett  wrote:
> 
> using the everywhere default, the printer goes busy for about the time the
> print job should take, 20 minutes or so, never moves any thing looking for
> paper, and at the end of the receiving data time, reverts to its idle screen.

I suspect this is the third case we've seen of what seems to be a 
fax+driverless printing bug in cups.

As well as 

$ lpadmin [...] everywhere

"IPP Eveywhere" printers/queues added via cups web interface (localhost:631) 
also seem to work.

I have reported the problem upstream after help from the Debian printing team, 
but no  response from upstream yet.

Best wishes,
Gareth



Re: avahi-daemon allow/deny interfaces question

2022-07-13 Thread Gareth Evans
On Thu 14 Jul 2022, at 01:03, Ram Ramesh  wrote:
[...]
> I take back some of what I said. It is both - I mean usb 
> autosupend+avahi_daemon. I need to keep the adaptor from autosuspending 
> and tell avahi-daemon not to disable the interface in the OS.
>
> I also found the power/control entry in /sys/bus/usb/ for my usb 
> NIC. It is not in the usual place. lsusb does not list my usb ethernet 
> adapter at all. I had to manually search to find it and set its 
> power/control to "on"
>
> With all this done, so far my net is up and running fine. Will wait a 
> couple days with a couple of reboots to make sure I have captured all 
> fixes in some boot scripts. After that this problem can be thought of as 
> solved.

Hi Ramesh,

There are numerous reports (mostly old, afaics) of the issue you describe, but 
with various suggested reasons.  

I suspect the avahi related part is a consequence rather than a cause - I 
didn't think avahi was capable of disabling interfaces, the message looks like 
it's updating a table/list (etc) and "...no longer relevant..." messages appear 
in my syslog if I deliberately disconnect from wifi.

Please can you provide syslog extracts from just before and during a time when 
this has happened, using:

$ sudo cat /var/log/syslog | grep -i -E "avahi|network"
(must be capital -E and no spaces around the | inside the speech marks)

Is there anything that seems relevant in

$ sudo dmesg -T

?

Out of interest, did you try running for a while with just the power management 
tweak?

Thanks,
Gareth



Re: cups broken

2022-07-13 Thread Gareth Evans
> On 13 Jul 2022, at 22:04, gene heskett  wrote:
> On 7/13/22 15:15, Gareth Evans wrote:
>> [...]
>> Out of interest, which model printer(s) has the issue?
> Brother MFC-J6920DW A huge tabloid capable printer/scanner

>> # lpinfo -v
> first off, none of that stuff is available to the user unless he has hacked 
> his $PATH 

You only have to do this once as root/sudo to set up the queue

QUEUENAME is whatever you want to call the printer queue.

So, eg:

# lpadmin -p J6920 -v  ipp://Brother%20MFC-J6920DW._ipp._tcp.local/  -E -m 
everywhere

Before and after you execute the above, what is output of:

$ driverless

?

Adding an everywhere queue via lpadmin may fix this:

> using the everywhere default, the printer goes
> busy for about the time the print job should take, 20 minutes or so, never 
> moves any
> thing looking for paper, and at the end of the receiving data time, reverts 
> to its idle screen.

but it will be interesting to see about the tray selection issue.

Thanks,
Gareth

 



Re: cups broken

2022-07-13 Thread Gareth Evans
On Wed 13 Jul 2022, at 20:36, Brian  wrote:
> On Wed 13 Jul 2022 at 20:12:28 +0100, Gareth Evans wrote:
[...]
>> 
>> Hi Gene, 
>> 
>> Out of interest, which model printer(s) has the issue?
>> 
>> There are options in
>> 
>> /etc/cups/cupsd.conf
>> 
>> to disable automatic queue creation for autodetected IPP/dns-sd/etc/etc 
>> printers.
>

> No such options exist in cupsd.conf.

Hi Brian,

I meant cups-browsed.conf at least as regards IPP network printer queues, which 
I think might remain helpful despite revision of the problem description.  I 
had momentarily confused DNS-SD as being one of whatever everywhere, driverless 
etc are.

$ cat /etc/cups/cups-browsed.conf

# Set CreateIPPPrinterQueues to "No" to not auto-create print queues
# for IPP network printers.

# CreateIPPPrinterQueues No
# CreateIPPPrinterQueues LocalOnly
# CreateIPPPrinterQueues Everywhere
# CreateIPPPrinterQueues AppleRaster
# CreateIPPPrinterQueues Everywhere AppleRaster
# CreateIPPPrinterQueues Driverless
# CreateIPPPrinterQueues All

Best wishes,
Gareth



Re: cups broken

2022-07-13 Thread Gareth Evans


> On 13 Jul 2022, at 18:21, gene heskett  wrote:
> I give up, the driverless printer cups installs automaticaly cannot be 
> deleted and has
> taken over from the brother drivers that work, preventing me from using the 
> printer at all.
> 
> So how do I disable the driverless junk? Is that a separate package that is 
> removable?
> cups doesn't even offer to disable this non-working garbage.
> Thanks for any good clues.

Hi Gene, 

Out of interest, which model printer(s) has the issue?

There are options in

/etc/cups/cupsd.conf

to disable automatic queue creation for autodetected IPP/dns-sd/etc/etc 
printers.

You may find that

# lpinfo -v

copy the ipp:// url for the printer concerned

Then

# lpadmin -p QUEUENAME -v IPP_URL_HERE -E -m everywhere

produces a functional queue

Thanks
Gareth

> 
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
> - Louis D. Brandeis
> Genes Web page <http://geneslinuxbox.net:6309/>



Re: avahi-daemon allow/deny interfaces question

2022-07-13 Thread Gareth Evans
On Wed 13 Jul 2022, at 01:21, Ram Ramesh  wrote:
> Do you know a simple way to disable autopowerdown of 
> just this usb NIC? May be there is something that I can do with ethtool?

I wonder if powertop may be of use here.  

It has a "tunables" section where (I think) power-saving features can be 
toggled between "good" (on?) or "bad" (off?) by pressing Enter or Space when 
selected, though neither man powertop nor its (github) website 

01.org/powertop

explains the significance  or difference between "good" and "bad", but maybe 
worth trying?

Best wishes,
Gareth



Re: avahi-daemon allow/deny interfaces question

2022-07-12 Thread Gareth Evans



> On 11 Jul 2022, at 17:48, Ram Ramesh  wrote:
[...]
> . However, my new machine has this daemon running which notices that $extif 
> does not have much activity and disables it after some timeout idle time.

>  Today I noticed that my $extif is vanishing and /var/log/daemon.log shows 
> some avahi-daemon messages about that interface being disabled/withdrawn or 
> some such thing.

Hi Ramesh,

Please could you post some example daemon.log entries and any surrounding 
entries that seem related?

Also is there anything in 

/var/log/syslog


that seems to relate?

Perhaps

$ sudo cat /var/log/syslog | grep x

where x = the interface name concerned.

Thanks,
Gareth


Re: nft newbie

2022-07-12 Thread Gareth Evans


> On 12 Jul 2022, at 11:31, mick crane  wrote:
> On 2022-07-12 10:33, Gareth Evans wrote:
>> On Tue 12 Jul 2022, at 10:19, Maximiliano Estudies
> 
>>> In most cases it's a best practice to configure all chains with
>>> _policy drop_ and then add rules for the traffic that you want to
>>> allow
>> All the nftables and PF howtos I have found take this approach.
>> Why is it best practice?  Is there any security advantage over rejection?
> I think it is just that 'reject' tells the remote system there is something 
> listening.
> mick
> 
Oh yes (!), thanks.  A few other points (from a quick web search) here

https://www.coresentinel.com/reject-versus-drop/

including potential for REJECT to facilitate DDoS on asymmetric links - so it 
surprises me again (perhaps this time sensibly?) as the firewalld default.

Incidentally (I mainly have Gene in mind) it might be worth pointing out that 
nftables has individual and mass conversion commands for iptables 
rules/rulesets - perhaps useful if you're in a rush or just to see equivalence

https://wiki.nftables.org/wiki-nftables/index.php/Moving_from_iptables_to_nftables

Best wishes
Gareth

Re: nft newbie

2022-07-12 Thread Gareth Evans
On Tue 12 Jul 2022, at 10:19, Maximiliano Estudies  
wrote:

> drop and reject are not equivalent.

Fair enough

[...]
> In most cases it's a best practice to configure all chains with
> _policy drop_ and then add rules for the traffic that you want to
> allow 

All the nftables and PF howtos I have found take this approach.

Why is it best practice?  Is there any security advantage over rejection?  

Thanks,
Gareth



Re: nft newbie

2022-07-11 Thread Gareth Evans
On Sun 10 Jul 2022, at 06:25, Gareth Evans  wrote:

> Thanks Roger, that also suggests "policy drop" in its nftables examples.

As someone on firewalld-users kindly pointed out, there is

> table inet firewalld {
> chain filter_INPUT {
[...]
> reject with icmpx admin-prohibited   <--- catch-all reject
> }

which seems equivalent to ufw's qualified "policy drop".

Panic over.
G



Re: Debian 11: MTA Exim4 not listening to fetchmail

2022-07-10 Thread Gareth Evans
On Sun 10 Jul 2022, at 18:28, Greg Wooledge  wrote:

> Mine contains these lines:
>
> unicorn:~$ grep ::1 /etc/hosts
> ::1 localhost ip6-localhost ip6-loopback
> ff02::1 ip6-allnodes
>
> They were put there by Debian.  I didn't touch them.

[I got the ::1 and localhost the wrong way around in my earlier reply.]


$ sudo fuser 25/tcp
25/tcp:   3778

$ ps -p 3778 -o comm=
exim4

$ cat /etc/hosts
127.0.0.1   localhost
127.0.0.1   hostname
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

$ telnet localhost 25
Trying ::1...
Connected to localhost.

$ sudo ss -lnt | grep :25
LISTEN 0  20 127.0.0.1:25 0.0.0.0:*  
LISTEN 0  20 [::1]:25[::]:*


$ sudo reboot 
- set boot arg ipv6.disable=1
- NB ipv6 addresses still in /etc/hosts

$ telnet localhost 25
Trying 127.0.0.1...
Trying ::1...
telnet: Unable to connect to remote host: Address family not supported by 
protocol
  

$ sudo ss -lnt | grep :25
$ 


Just out of interest:

Now, comment out ipv6 in /etc/hosts

$ cat /etc/hosts
127.0.0.1   localhost
127.0.0.1   hostname
#::1localhost ip6-localhost ip6-loopback
#ff02::1ip6-allnodes
#ff02::2ip6-allrouters


$ sudo reboot 
- set boot arg ipv6.disable=1

$ telnet localhost 25
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
  ^^ ???
$ sudo nft list ruleset
$

$ ss -lnt | grep :25
$ 

$ ps -aux | grep exim
gives only "grep exim" - exim4 is not running

Does exim4 require ipv6?

I can't find any obvious such config with

sudo grep -Ri ipv6 /etc/exim4
sudo grep -Ri ip6 /etc/exim4
etc. etc.


In Roger's case, telnet seems to be outputting the same error as exim4 is panic 
logging, which occurs when ipv6 is disabled and "::1 ..." exists in /etc/hosts. 
 Coincidence?

"When certain serious errors occur, Exim writes entries to its panic log. If 
the error is sufficiently disastrous, Exim bombs out afterwards"
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-log_files.html

This suggests exim4 may not be listening having written to the panic log even 
if my ipv6 requirement is the result of some oddity.

Again:

On Sun 10 Jul 2022, at 15:38, Roger Price  wrote:
> I removed the ipv6.disable=1 and rebooted, but this made no difference.

IIUC, without a

$ sudo update-grub

before reboot, ipv6 is still disabled, assuming Roger described exactly what he 
did there.

Does this seem a reasonable assessment?

Best wishes,
Gareth



Re: Debian 11: MTA Exim4 not listening to fetchmail

2022-07-10 Thread Gareth Evans
On Sun 10 Jul 2022, at 17:12, Gareth Evans  wrote:

> https://unix.stackexchange.com/questions/407663/ipv6-socket-creation-failed-address-family-not-supported-by-protocol

FWIMBW, this explains how to disable ipv6 for exim4 (albeit on Deb 9) though 
I'm not sure the advice re hosts file is universally applicable.



Re: Debian 11: MTA Exim4 not listening to fetchmail

2022-07-10 Thread Gareth Evans
On Sun 10 Jul 2022, at 15:38, Roger Price  wrote:
[...]
> I removed the ipv6.disable=1 and rebooted, but this made no difference.

I'm not sure if there may be other issues here too, but did you update-grub 
before rebooting?

If not, does /etc/hosts currently contain 

localhost ::1 

?

If so, it seems ipv6 is still disabled while localhost is associated with an 
ipv6 address, which may have some bearing according to these [not entirely 
pertinent] sources:

https://stackoverflow.com/questions/67173756/socket-address-family-not-supported-by-protocol
https://unix.stackexchange.com/questions/407663/ipv6-socket-creation-failed-address-family-not-supported-by-protocol
https://github.com/netdata/netdata/issues/1282

Hope that helps.

Gareth



Re: nft newbie

2022-07-09 Thread Gareth Evans
On Sat  9 Jul 2022, at 10:05, Roger Price  wrote:
> On Sat, 9 Jul 2022, Gareth Evans wrote:
>
>> Also for any good nft/netfilter overview articles etc.
>
> Have you seen "Mastering Linux Security and Hardening", 2nd Edition, Donald 
> A. 
> Tevault, chapter 4.  Suitable for those of us who read this newbie thread.
>
> Roger

Thanks Roger, that also suggests "policy drop" in its nftables examples.

I've just noticed the nftables wiki mentions an nftables users mailing list, 

https://wiki.nftables.org/wiki-nftables/index.php/Main_Page

which might be useful too.

Thanks,
Gareth



Re: nft newbie

2022-07-09 Thread Gareth Evans
On Sat  9 Jul 2022, at 07:17, Gareth Evans  wrote:
[...]
> If there is no drop by default, why add "policy accept" for 
> related/established as it does?  Doesn't this happen anyway?

I suppose this probably modifies behaviour for otherwise closed ports (which 
would make sense for a firewall!) but I can't find much of a high-level 
overview in documentation - man nft, wiki.

I would still be grateful for thoughts from experienced nft users if any issues 
seem to arise from the lack of qualified "policy drop" in input.  Also for any 
good nft/netfilter overview articles etc.

Thanks,
Gareth



Re: nft newbie

2022-07-09 Thread Gareth Evans
Having found ufw suited my needs I have only dabbled with firewalld / 
firewall-config / firewall-applet over the years.

Having noticed the recommendation for firewalld on the debian wiki re nftables 

https://wiki.debian.org/nftables#Use_firewalld

I installed it and had a look at the default ruleset with

$ sudo nft list ruleset

If, as I understand, nftables default policy is accept, 

"NOTE: If no policy is explicitly selected, the default policy accept will be 
used."
https://wiki.nftables.org/wiki-nftables/index.php/Configuring_chains

firewalld doesn't seem to "drop all input unless allowed" by default, as ufw's 
ruleset with only port 22 opened suggests it does.

If there is no drop by default, why add "policy accept" for related/established 
as it does?  Doesn't this happen anyway?

Isn't this less secure, as it seems?

The nftables wiki suggests "policy drop" for input, but the examples are rather 
restrictive.

https://wiki.nftables.org/wiki-nftables/index.php/Simple_ruleset_for_a_workstation

https://wiki.nftables.org/wiki-nftables/index.php/Simple_ruleset_for_a_server

nmap from another machine confirms only port 22 is open via firewalld (which is 
the default) but is default acceptance in other respects a security risk?

I haven't included rulesets but happy to provide if wanted.

Thanks,
Gareth



CUPS bugfix vs upgrade?

2022-06-29 Thread Gareth Evans
After troubleshooting assistance from the Debian Printing team, I was advised 
to report my non-printing driverless printer issue upstream, which I have done.

https://github.com/OpenPrinting/cups-filters/issues/472

Given that driverless printing works in CUPS 2.4 (on Ubuntu 22.04) are they 
likely to fix 2.3.3 in Debian stable, rather than just suggest Debian updates 
cups[-filters/whatever] in stable?

That is, assuming Canonical hasn't just fixed whatever the issue is in Ubuntu.

Does anyone know if cups 2.4 in Debian testing is in a suitable state to 
consider (exceptionally) adding to stable?

Alternatively, is it advisable to downgrade to a known-working version from 
Buster?

Thanks,
Gareth



Re: non installed printer can not be removed

2022-06-24 Thread Gareth Evans
On Thu 16 Jun 2022, at 22:13, Hans  wrote:
> Hi folks,
>
> I am struggeling with a little problem, I can not explain. 
>
> A friend of mine uses a printer (Samsung SL-C480FW), which is connected to 
> the 
> router with wireless. However, although there are no drivers and no ppd-files 
> installed, the printer is seen by cups (and also by system-printer-config) 
> but 
> can not be used (think, because the missing ppd-file).
>
> When this is installed, udev-entries and so on are set, then the printer is 
> seen for example with ipp://192.168.*.*. 
>

> However, printing does not work, although the printer gets data, but then 
> hangs. I believe, this is a driver problem (because this appeared, since my 
> friend got a new router (FritzBox).

I submitted a bug report re my own issue to Debian, and was asked to report 
upstream, which I have now done.  Hans may like to follow this or perhaps add 
details of his experience, which I suspect is a result of the same problem.

https://github.com/OpenPrinting/cups-filters/issues/472

Best wishes
Gareth

>
> I hope, for this I will find a solution, so hints are welcome, buut not the 
> reason for this thread.
>
> Much more I am interested, to know, why I can not delete the printer in CUPS 
> or system-config-printer? Any printer I add, can be deleted, but the last 
> entry can not be deleted. 
>
> What is wrong? Why does the kernel see the correct printer, and where does it 
> get its information? It is not connected at the USB-port, so no information 
> could be taken from this.
>
> Any ideas?
>
> Thanks for any help!
>
> Best regards
>
> Hans



Re: I *think* I found the apache2 docs, but it's in .html andIcannotgetfirefox to access it using "file:"+ /path/to/filedir

2022-06-23 Thread Gareth Evans



> On 23 Jun 2022, at 21:49, gene heskett  wrote:
> 
> On 6/23/22 16:08, Gareth Evans wrote:
>> OK.  That's not something I can help with from scratch, but I will watch 
>> with interest for further discussion.
>> 
>> Best wishes,
>> G
> Well, it working in plain http, so until they get to be a nuisance, I have 
> other irons
> smoking in the fire. Like some fine tuning of the gui fpr one of my cnc'd 
> machines.
> 
> See at the 6040-stf subdir at the link in my sig.
> 
> That machine is about to start making a screw out of hard maple, made to be 
> the
> screw of a combo with a 3d printed nut assembly for a woodworking workbenches
> leg vise. If it works I'll adv in Fine WoodWorking as the only other maker of 
> such
> has quietly vanished about 15 years back up the log.
> 
> He may have missed morning roll call as will I, probably too soon, but I am 
> 87 and
> alone now.
> 
> And I intend to have fun till I miss that famous roll call.  If I can make a 
> few sheckles
> doing it, that's even better. :o)>
> 
> Thank you for the help, Gareth, take care and stay well.

You're welcome, you too.
Gareth

> 
> 
> Cheers, Gene Heskett.
> 
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
> - Louis D. Brandeis
> Genes Web page <http://geneslinuxbox.net:6309/>
> 



Re: I *think* I found the apache2 docs, but it's in .html andIcannotgetfirefox to access it using "file:"+ /path/to/filedir

2022-06-23 Thread Gareth Evans





> On 23 Jun 2022, at 01:46, gene heskett  wrote:
> 
> On 6/22/22 19:39, Gareth Evans wrote:
>>> On Wed 22 Jun 2022, at 22:42, gene heskett  wrote:
>>> On 6/22/22 16:51, Gareth Evans wrote:
>>>> On Wed 22 Jun 2022, at 21:16, gene heskett  wrote:
>>>>> On 6/22/22 10:45, Gareth Evans wrote:
>>>>> [and I sniped a few kilobytes of.]
>>>>> 
>>>>> I think I've got it, but I did find what may be a bug in mod auth_plain.
>>>>> 
>>>>> Its asking for a username and pw, but nothing seems to satisfy it
>>>> I didn't see you had replied before sending my previous message, please 
>>>> ignore.
>>>> 
>>>> Can't find anything about mod_auth_plain but if you mean mod_auth_basic 
>>>> this requires usernames/passwords to be set up, not looking at /etc/passwd
>>>> 
>>>> https://www.howtogeek.com/devops/how-to-setup-basic-http-authentication-on-apache/
>>>> 
>>>> This also has a link to setting up LetsEncrypt.
>>>> 
>>>>> , so
>>>>> I disabled it, no man page hat I can find, and now its showing me
>>>>> the directory I want as the root of this server, with one subdir
>>>>> I can click on, and the first file I put there.
>>>>> 
>>>>> However I need to compose an explanatory README to go with it as
>>>>> I had to invent my own method of installing it on a u-booting rpi.  Its a
>>>>> preempt-rt kernel needed to run the armhf version of linuxcnc from
>>>>> the buildbot. I run the bleeding edge development version on all 4
>>>>> of my machines I've built or rebuilt. I play the part of the caged
>>>>> canary in the coal mine, checking for showstoppers as development
>>>>> is ongoing and has been since the net arrived. Its a NIST project, re-
>>>>> done in gpl and was once on the no export list. See at linuxcnc.org.
>>>>> 
>>>>> So the plain text version is working and you should be able to see it at
>>>>>  (or something like that)
>>>> Yes.
>>> Good, so I'll quit tinkering for today.
>>>>> That file in the armhf subdir is just under 30 megabytes, so if paying
>>>>> for the bandwidth, don't click on it.
>>>>> 
>>>>> Making progress, I think, Thanks Gareth.
>>>>> 
>>>>> However, if there is a way to implement a OTP so I can keep track of the
>>>>> users,
>>>>> I could use some help with that as long as I don't setup a universal pw
>>>>> the bots
>>>>> can use. What I'd like is a true OTP with a 2 week lifetime.  Can that
>>>>> be done?
>>>> I see there are various offerings (web search for "apache otp") but there 
>>>> doesn't seem to be an official offering.
> I haven't done that DDG search, preferring to rely more on the real users 
> experience.
> The idea being that if the bot figures its worth in, and has his master ask 
> for a OTP,
> the 1 or 2 week expiry would eventually run them off. I figure that the 
> botmasters
> patience would be used up and I would get blacklisted, based on TANSTAAFL.
> 
> They aren't using much bandwidth now, and despite the weird port #, several 
> of them
> have already started looking at me.
> 
> I know of two others working on machines to be run by rpi4's, using my kernel 
> cuz
> the foundation would never approve, but all the other machines are being 
> worked on,
> I think I am the only one on the planet actually doing it.  And I did it 
> first with a rpi3b
> but its tongue was dragging on the floor doing it. The rpi4b can run the 
> machine while building
> the next git pull of linuxcnc.  A huge difference in the efficiency between 
> that and a wintel box..
> 
> With linuxcnc not running, or with it running but F2 toggled off. power draw 
> for the pi,
> interfacing and its lcd monitor is about 22 watts. Those machines running on 
> wintel
> boxes are drawing over 200 watts each with the machine powered down.
> 
>> OK, but I mean do the non-robots.txt-compliant bots actually try to submit 
>> passwords? 
> 
> If enough of us do it in self defense, I look for then to grow the code to do 
> it.
> I don't object to them indexing my site, but on a 10 megabit cable connection,
> they use up all my upload bw on a 24/7 basis when they try to mirror it. That 
> in
> my lookup table, is a DDS. So them and the camel that rode in on them can be
> told to go to hell but I won

Re: I *think* I found the apache2 docs, but it's in .html and Icannotgetfirefox to access it using "file:"+ /path/to/filedir

2022-06-22 Thread Gareth Evans
On Wed 22 Jun 2022, at 22:42, gene heskett  wrote:
> On 6/22/22 16:51, Gareth Evans wrote:
>> On Wed 22 Jun 2022, at 21:16, gene heskett  wrote:
>>> On 6/22/22 10:45, Gareth Evans wrote:
>>> [and I sniped a few kilobytes of.]
>>>
>>> I think I've got it, but I did find what may be a bug in mod auth_plain.
>>>
>>> Its asking for a username and pw, but nothing seems to satisfy it
>> I didn't see you had replied before sending my previous message, please 
>> ignore.
>>
>> Can't find anything about mod_auth_plain but if you mean mod_auth_basic this 
>> requires usernames/passwords to be set up, not looking at /etc/passwd
>>
>> https://www.howtogeek.com/devops/how-to-setup-basic-http-authentication-on-apache/
>>
>> This also has a link to setting up LetsEncrypt.
>>
>>> , so
>>> I disabled it, no man page hat I can find, and now its showing me
>>> the directory I want as the root of this server, with one subdir
>>> I can click on, and the first file I put there.
>>>
>>> However I need to compose an explanatory README to go with it as
>>> I had to invent my own method of installing it on a u-booting rpi.  Its a
>>> preempt-rt kernel needed to run the armhf version of linuxcnc from
>>> the buildbot. I run the bleeding edge development version on all 4
>>> of my machines I've built or rebuilt. I play the part of the caged
>>> canary in the coal mine, checking for showstoppers as development
>>> is ongoing and has been since the net arrived. Its a NIST project, re-
>>> done in gpl and was once on the no export list. See at linuxcnc.org.
>>>
>>> So the plain text version is working and you should be able to see it at
>>>  (or something like that)
>> Yes.
> Good, so I'll quit tinkering for today.
>>
>>> That file in the armhf subdir is just under 30 megabytes, so if paying
>>> for the bandwidth, don't click on it.
>>>
>>> Making progress, I think, Thanks Gareth.
>>>
>>> However, if there is a way to implement a OTP so I can keep track of the
>>> users,
>>> I could use some help with that as long as I don't setup a universal pw
>>> the bots
>>> can use. What I'd like is a true OTP with a 2 week lifetime.  Can that
>>> be done?
>> I see there are various offerings (web search for "apache otp") but there 
>> doesn't seem to be an official offering.
>>

>> I would imagine just using a password would keep the bots away.  Are they 
>> that determined?
>
> Some are, bing and mj12 seem to be the untrainable offenders. mj12 moves 
> theirs around
> in their huge address space about weekly so they got the /16 treatment 
> several times.
>
>   bing moves heirs about monthly. By the time those two seacrate drives 
> puked, my iptables
> rules were about 200 lines deep.

OK, but I mean do the non-robots.txt-compliant bots actually try to submit 
passwords?  

I was wondering why you are interested in OTP/scheduled password regeneration 
for this use case, and whether a simple (or not so simple) password may be 
sufficient for bandwidth preservation purposes.

Thanks
G

>
> I think its called netfilter now, so I expect I better find out how to 
> use it.
>
> In the meantime,  a man page for robots.txt would be nice  but I expect
> DDG can find that..
>> Best wishes,
>> Gareth
> Take care and stay well.
>
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
>   soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>   - Louis D. Brandeis



Re: I *think* I found the apache2 docs, but it's in .html and Icannot getfirefox to access it using "file:"+ /path/to/filedir

2022-06-22 Thread Gareth Evans
On Wed 22 Jun 2022, at 21:16, gene heskett  wrote:
> On 6/22/22 10:45, Gareth Evans wrote:
> [and I sniped a few kilobytes of.]
>
> I think I've got it, but I did find what may be a bug in mod auth_plain.
>
> Its asking for a username and pw, but nothing seems to satisfy it

I didn't see you had replied before sending my previous message, please ignore.

Can't find anything about mod_auth_plain but if you mean mod_auth_basic this 
requires usernames/passwords to be set up, not looking at /etc/passwd

https://www.howtogeek.com/devops/how-to-setup-basic-http-authentication-on-apache/

This also has a link to setting up LetsEncrypt.

> , so
> I disabled it, no man page hat I can find, and now its showing me
> the directory I want as the root of this server, with one subdir
> I can click on, and the first file I put there.
>
> However I need to compose an explanatory README to go with it as
> I had to invent my own method of installing it on a u-booting rpi.  Its a
> preempt-rt kernel needed to run the armhf version of linuxcnc from
> the buildbot. I run the bleeding edge development version on all 4
> of my machines I've built or rebuilt. I play the part of the caged
> canary in the coal mine, checking for showstoppers as development
> is ongoing and has been since the net arrived. Its a NIST project, re-
> done in gpl and was once on the no export list. See at linuxcnc.org.
>
> So the plain text version is working and you should be able to see it at
>  (or something like that)

Yes.

>
> That file in the armhf subdir is just under 30 megabytes, so if paying
> for the bandwidth, don't click on it.
>
> Making progress, I think, Thanks Gareth.
>
> However, if there is a way to implement a OTP so I can keep track of the 
> users,
> I could use some help with that as long as I don't setup a universal pw 
> the bots
> can use. What I'd like is a true OTP with a 2 week lifetime.  Can that 
> be done?

I see there are various offerings (web search for "apache otp") but there 
doesn't seem to be an official offering.

I would imagine just using a password would keep the bots away.  Are they that 
determined?

Best wishes,
Gareth

>
> Take care and stay well.
>
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
>   soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>   - Louis D. Brandeis



Re: I *think* I found the apache2 docs, but it's in .html and Icannot getfirefox to access it using "file:"+ /path/to/filedir

2022-06-22 Thread Gareth Evans
On Wed 22 Jun 2022, at 18:22, gene heskett  wrote:
> On 6/22/22 10:45, Gareth Evans wrote:
>>
>>> On 21 Jun 2022, at 22:37, Gareth Evans  wrote:
>>>
>>> 
>>>
>>>> On 21 Jun 2022, at 22:12, Gareth Evans  wrote:
>>>>
>>>> On Tue 21 Jun 2022, at 20:16, gene heskett  wrote:
>>>>>> On 6/21/22 14:09, Gareth Evans wrote:
>>>>>> On Tue 21 Jun 2022, at 18:06, gene heskett  wrote:
>>>>>>> On 6/21/22 12:11, Andrew M.A. Cater wrote:
>>>>>>>>> On Tue, Jun 21, 2022 at 11:55:56AM -0400, gene heskett wrote:
>>>>>>>>>> Greetings all;
>>>>>>>>>>
>>>>>>>>>> So how am I supposed to read these installed docs?
>>>>>>>>>>
>>>>>>>>>> Thanks all.
>>>>>>>>>>
>>>>>>>>>> Cheers, Gene Heskett.
>>>>>>>>>> -- 
>>>>>>>>>> "There are four boxes to be used in defense of liberty:
>>>>>>>>>>   soap, ballot, jury, and ammo. Please use in that order."
>>>>>>>>>> -Ed Howdershelt (Author, 1940)
>>>>>>>>>> If we desire respect for the law, we must first make the law 
>>>>>>>>>> respectable.
>>>>>>>>>>   - Louis D. Brandeis
>>>>>>>>>>
>>>>>>>>>>  From a web browser?
>>>>>>>>> file:///usr/share/doc/apache2-doc
>>>>>>>>>
>>>>>>>>> That's three slashes - file:// - two slashes - and then the 
>>>>>>>>> filesystem path.
>>>>>>>>>
>>>>>>>>> Hope this helps, with every good wish, as ever,
>>>>>>>>>
>>>>>>>>> Andy Cater
>>>>>>>> And that works, the third slash is new to me.
>>>>>>>>
>>>>>>>> So now the only thing I've changed from the default install is in
>>>>>>>> /etc/apache2/envvars
>>>>>>>> for usr and grp to be www-data. But now it won't restart.
>>>>>>>> journalctl -xe reports:
>>>>>>>> Jun 21 12:46:16 coyote apachectl[286443]: AH00526: Syntax error on line
>>>>>>>> 63 of /etc/apache2/conf-enabled/security.conf:
>>>>>>>> Jun 21 12:46:16 coyote apachectl[286443]: Invalid command 'Header', 
>>>>>>>> [...]
>>>>>>> In my (unedited) version of that file:
>>>>>>>
>>>>>>> [...]
>>>>>>> 61 # Requires mod_headers to be enabled.
>>>>>>> 62 #
>>>>>>> 63 #Header set X-Content-Type-Options: "nosniff"
>>>>>>>
>>>>>>> If line 63 is required un-commented, then
>>>>>>>
>>>>>>> $ sudo a2enmod headers
>>>>>>> $ sudo systemctl restart apache2
>>>>>>>
>>>>>>> should do the trick.
>>>>> After I found it with locate/ /usr/sbin is not in su's $PATH
>>>>> That fixed the error, and I uncommented the stanza in apache2.conf
>>>>> that points to the directory I want the server to access, and
>>>>> localhost:port# displays the default startup page ok.
>>>>>
>>>>> dig "my-site-name" returns the proper ipv4 address.
>>>>> I just used the address:6309 and it worked. So I edited the
>>>>> address bar to use the registered name:6309 and hit F5,
>>>>> a couple times, and that works.
>>>> Do you see a page titled "Apache2 Debian Default Page" with the Debian 
>>>> logo?
> yes
>
>>>> If so it's probably configured in
>>>>
>>>> /etc/apache2/sites-available/000-default.conf
>>>>
>>>> or
>>>>
>>>> /etc/apache2/sites-available/default-ssl.conf for https version
> I'd like to get this working if possible.
>>>>
>>>> as Debian uses name-based virtual hosts with a config file structure which 
>>>> does not correspond to the Apache docs afaics, and I can't find any Debian 
>>>> docs on the subject.
>>>>
>>>> https://httpd.apache.org/docs/2.4/configuring.html
>>>> https://

Re: I *think* I found the apache2 docs, but it's in .html and Icannot getfirefox to access it using "file:"+ /path/to/filedir

2022-06-22 Thread Gareth Evans



> On 21 Jun 2022, at 22:37, Gareth Evans  wrote:
> 
> 
> 
>> On 21 Jun 2022, at 22:12, Gareth Evans  wrote:
>> 
>> On Tue 21 Jun 2022, at 20:16, gene heskett  wrote:
>>>> On 6/21/22 14:09, Gareth Evans wrote:
>>>> On Tue 21 Jun 2022, at 18:06, gene heskett  wrote:
>>>>> On 6/21/22 12:11, Andrew M.A. Cater wrote:
>>>>>>> On Tue, Jun 21, 2022 at 11:55:56AM -0400, gene heskett wrote:
>>>>>>>> Greetings all;
>>>>>>>> 
>>>>>>>> So how am I supposed to read these installed docs?
>>>>>>>> 
>>>>>>>> Thanks all.
>>>>>>>> 
>>>>>>>> Cheers, Gene Heskett.
>>>>>>>> -- 
>>>>>>>> "There are four boxes to be used in defense of liberty:
>>>>>>>>  soap, ballot, jury, and ammo. Please use in that order."
>>>>>>>> -Ed Howdershelt (Author, 1940)
>>>>>>>> If we desire respect for the law, we must first make the law 
>>>>>>>> respectable.
>>>>>>>>  - Louis D. Brandeis
>>>>>>>> 
>>>>>>>> From a web browser?
>>>>>>> 
>>>>>>> file:///usr/share/doc/apache2-doc
>>>>>>> 
>>>>>>> That's three slashes - file:// - two slashes - and then the filesystem 
>>>>>>> path.
>>>>>>> 
>>>>>>> Hope this helps, with every good wish, as ever,
>>>>>>> 
>>>>>>> Andy Cater
>>>>>> And that works, the third slash is new to me.
>>>>>> 
>>>>>> So now the only thing I've changed from the default install is in
>>>>>> /etc/apache2/envvars
>>>>>> for usr and grp to be www-data. But now it won't restart.
>>>>>> journalctl -xe reports:
>>>>>> Jun 21 12:46:16 coyote apachectl[286443]: AH00526: Syntax error on line
>>>>>> 63 of /etc/apache2/conf-enabled/security.conf:
>>>>>> Jun 21 12:46:16 coyote apachectl[286443]: Invalid command 'Header', [...]
>>>>> In my (unedited) version of that file:
>>>>> 
>>>>> [...]
>>>>> 61 # Requires mod_headers to be enabled.
>>>>> 62 #
>>>>> 63 #Header set X-Content-Type-Options: "nosniff"
>>>>> 
>>>>> If line 63 is required un-commented, then
>>>>> 
>>>>> $ sudo a2enmod headers
>>>>> $ sudo systemctl restart apache2
>>>>> 
>>>>> should do the trick.
>>> After I found it with locate/ /usr/sbin is not in su's $PATH
>>> That fixed the error, and I uncommented the stanza in apache2.conf
>>> that points to the directory I want the server to access, and
>>> localhost:port# displays the default startup page ok.
>>> 
>>> dig "my-site-name" returns the proper ipv4 address.
>> 
>>> I just used the address:6309 and it worked. So I edited the
>>> address bar to use the registered name:6309 and hit F5,
>>> a couple times, and that works.
>> 
>> Do you see a page titled "Apache2 Debian Default Page" with the Debian logo?
>> 
>> If so it's probably configured in
>> 
>> /etc/apache2/sites-available/000-default.conf
>> 
>> or 
>> 
>> /etc/apache2/sites-available/default-ssl.conf for https version
>> 
>> as Debian uses name-based virtual hosts with a config file structure which 
>> does not correspond to the Apache docs afaics, and I can't find any Debian 
>> docs on the subject.
>> 
>> https://httpd.apache.org/docs/2.4/configuring.html
>> https://httpd.apache.org/docs/2.4/vhosts/
>> 
>> 000-default is already enabled (though the other for https may not be) if 
>> you're seeing the page I referred to above.
>> 
>> $ sudo a2ensite filename (without .conf)
>> 
>> is the command you would use to enable an "available" configuration (which 
>> creates a symlink in ../sites-enabled),
> 
> 
>> but you may find it easier just to edit the existing 000-default.conf file.
> 

> According to comments in my apache2.conf there needs to be a directory stanza 
> there too for each directory not already declared which you want Apache to be 
> able to access contents under.

Re-reading yesterdays emails it seems you have already established 

Re: I *think* I found the apache2 docs, but it's in .html and Icannot getfirefox to access it using "file:"+ /path/to/filedir

2022-06-21 Thread Gareth Evans



> On 21 Jun 2022, at 22:12, Gareth Evans  wrote:
> 
> On Tue 21 Jun 2022, at 20:16, gene heskett  wrote:
>>> On 6/21/22 14:09, Gareth Evans wrote:
>>> On Tue 21 Jun 2022, at 18:06, gene heskett  wrote:
>>>> On 6/21/22 12:11, Andrew M.A. Cater wrote:
>>>>> On Tue, Jun 21, 2022 at 11:55:56AM -0400, gene heskett wrote:
>>>>>> Greetings all;
>>>>>> 
>>>>>> So how am I supposed to read these installed docs?
>>>>>> 
>>>>>> Thanks all.
>>>>>> 
>>>>>> Cheers, Gene Heskett.
>>>>>> -- 
>>>>>> "There are four boxes to be used in defense of liberty:
>>>>>>   soap, ballot, jury, and ammo. Please use in that order."
>>>>>> -Ed Howdershelt (Author, 1940)
>>>>>> If we desire respect for the law, we must first make the law respectable.
>>>>>>   - Louis D. Brandeis
>>>>>> 
>>>>>> From a web browser?
>>>>> 
>>>>> file:///usr/share/doc/apache2-doc
>>>>> 
>>>>> That's three slashes - file:// - two slashes - and then the filesystem 
>>>>> path.
>>>>> 
>>>>> Hope this helps, with every good wish, as ever,
>>>>> 
>>>>> Andy Cater
>>>> And that works, the third slash is new to me.
>>>> 
>>>> So now the only thing I've changed from the default install is in
>>>> /etc/apache2/envvars
>>>> for usr and grp to be www-data. But now it won't restart.
>>>> journalctl -xe reports:
>>>> Jun 21 12:46:16 coyote apachectl[286443]: AH00526: Syntax error on line
>>>> 63 of /etc/apache2/conf-enabled/security.conf:
>>>> Jun 21 12:46:16 coyote apachectl[286443]: Invalid command 'Header', [...]
>>> In my (unedited) version of that file:
>>> 
>>> [...]
>>> 61 # Requires mod_headers to be enabled.
>>> 62 #
>>> 63 #Header set X-Content-Type-Options: "nosniff"
>>> 
>>> If line 63 is required un-commented, then
>>> 
>>> $ sudo a2enmod headers
>>> $ sudo systemctl restart apache2
>>> 
>>> should do the trick.
>> After I found it with locate/ /usr/sbin is not in su's $PATH
>> That fixed the error, and I uncommented the stanza in apache2.conf
>> that points to the directory I want the server to access, and
>> localhost:port# displays the default startup page ok.
>> 
>> dig "my-site-name" returns the proper ipv4 address.
> 
>>  I just used the address:6309 and it worked. So I edited the
>> address bar to use the registered name:6309 and hit F5,
>> a couple times, and that works.
> 
> Do you see a page titled "Apache2 Debian Default Page" with the Debian logo?
> 
> If so it's probably configured in
> 
> /etc/apache2/sites-available/000-default.conf
> 
> or 
> 
> /etc/apache2/sites-available/default-ssl.conf for https version
> 
> as Debian uses name-based virtual hosts with a config file structure which 
> does not correspond to the Apache docs afaics, and I can't find any Debian 
> docs on the subject.
> 
> https://httpd.apache.org/docs/2.4/configuring.html
> https://httpd.apache.org/docs/2.4/vhosts/
> 
> 000-default is already enabled (though the other for https may not be) if 
> you're seeing the page I referred to above.
> 
> $ sudo a2ensite filename (without .conf)
> 
> is the command you would use to enable an "available" configuration (which 
> creates a symlink in ../sites-enabled),


> but you may find it easier just to edit the existing 000-default.conf file.

According to comments in my apache2.conf there needs to be a directory stanza 
there too for each directory not already declared which you want Apache to be 
able to access contents under.

>  You can create another (or iirc just extend it) if you want to add other 
> (domain-)name-based sites in future.
> 
> * in the virtualhost tag as in "*:portNo" means "all domains", so these would 
> need to be specified if >1.
> 
> This tutorial (amongst others I'm sure) explains the Debian approach:
> 
> https://vitux.com/debian-apache/
> 
> You may find that putting a suitable  stanza around your 
> directory stanza in apache2.conf works (eg. copy the relevant parts from 
> 000-default), though I think you would at least need to disable 000-default 
> if you do. For that:
> 
> $ sudo a2dissite 000-default
> 
> I think the most pain-free method is likely to be to edit or

Re: I *think* I found the apache2 docs, but it's in .html and Icannot getfirefox to access it using "file:"+ /path/to/filedir

2022-06-21 Thread Gareth Evans
On Tue 21 Jun 2022, at 20:16, gene heskett  wrote:
> On 6/21/22 14:09, Gareth Evans wrote:
>> On Tue 21 Jun 2022, at 18:06, gene heskett  wrote:
>>> On 6/21/22 12:11, Andrew M.A. Cater wrote:
>>>> On Tue, Jun 21, 2022 at 11:55:56AM -0400, gene heskett wrote:
>>>>> Greetings all;
>>>>>
>>>>> So how am I supposed to read these installed docs?
>>>>>
>>>>> Thanks all.
>>>>>
>>>>> Cheers, Gene Heskett.
>>>>> -- 
>>>>> "There are four boxes to be used in defense of liberty:
>>>>>soap, ballot, jury, and ammo. Please use in that order."
>>>>> -Ed Howdershelt (Author, 1940)
>>>>> If we desire respect for the law, we must first make the law respectable.
>>>>>- Louis D. Brandeis
>>>>>
>>>> >From a web browser?
>>>>
>>>> file:///usr/share/doc/apache2-doc
>>>>
>>>> That's three slashes - file:// - two slashes - and then the filesystem 
>>>> path.
>>>>
>>>> Hope this helps, with every good wish, as ever,
>>>>
>>>> Andy Cater
>>> And that works, the third slash is new to me.
>>>
>>> So now the only thing I've changed from the default install is in
>>> /etc/apache2/envvars
>>> for usr and grp to be www-data. But now it won't restart.
>>> journalctl -xe reports:
>>> Jun 21 12:46:16 coyote apachectl[286443]: AH00526: Syntax error on line
>>> 63 of /etc/apache2/conf-enabled/security.conf:
>>> Jun 21 12:46:16 coyote apachectl[286443]: Invalid command 'Header', [...]
>> In my (unedited) version of that file:
>>
>> [...]
>> 61 # Requires mod_headers to be enabled.
>> 62 #
>> 63 #Header set X-Content-Type-Options: "nosniff"
>>
>> If line 63 is required un-commented, then
>>
>> $ sudo a2enmod headers
>> $ sudo systemctl restart apache2
>>
>> should do the trick.
> After I found it with locate/ /usr/sbin is not in su's $PATH
> That fixed the error, and I uncommented the stanza in apache2.conf
> that points to the directory I want the server to access, and
> localhost:port# displays the default startup page ok.
>
> dig "my-site-name" returns the proper ipv4 address.

>   I just used the address:6309 and it worked. So I edited the
> address bar to use the registered name:6309 and hit F5,
> a couple times, and that works.

Do you see a page titled "Apache2 Debian Default Page" with the Debian logo?

If so it's probably configured in

/etc/apache2/sites-available/000-default.conf

or 

/etc/apache2/sites-available/default-ssl.conf for https version

as Debian uses name-based virtual hosts with a config file structure which does 
not correspond to the Apache docs afaics, and I can't find any Debian docs on 
the subject.

https://httpd.apache.org/docs/2.4/configuring.html
https://httpd.apache.org/docs/2.4/vhosts/

000-default is already enabled (though the other for https may not be) if 
you're seeing the page I referred to above.

$ sudo a2ensite filename (without .conf)

is the command you would use to enable an "available" configuration (which 
creates a symlink in ../sites-enabled), but you may find it easier just to edit 
the existing 000-default.conf file.  You can create another (or iirc just 
extend it) if you want to add other (domain-)name-based sites in future.

* in the virtualhost tag as in "*:portNo" means "all domains", so these would 
need to be specified if >1.

This tutorial (amongst others I'm sure) explains the Debian approach:

https://vitux.com/debian-apache/

You may find that putting a suitable  stanza around your directory 
stanza in apache2.conf works (eg. copy the relevant parts from 000-default), 
though I think you would at least need to disable 000-default if you do. For 
that:

$ sudo a2dissite 000-default

I think the most pain-free method is likely to be to edit or add to the files 
in 
/etc/apache2/sites-available/

Hope that helps.
Gareth


>
> So now I need a  stanza in apache2.conf that works.
> This one doesn't:
> 
>      Options Indexes FollowSymLinks
>      AllowOverride None
>      Require all granted
> 
>
> Do I need to comment out the default page to expose mine?
> I have constructed that path, made a subdir for buster armhf
> stuff in it and placed an preempt-rt kernel file in it. 
> The intent
> is to let anybody download it. If the bots insist on wasting my
> upload bw, I may OTP passwd protect the subdirs, but that's a
> future option & howto question.
>
> Making progress, I think, Thanks Gareth.
>
> Take care & stay well.
>
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
>   soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>   - Louis D. Brandeis



Re: I *think* I found the apache2 docs, but it's in .html and Icannot get firefox to access it using "file:"+ /path/to/filedir

2022-06-21 Thread Gareth Evans
On Tue 21 Jun 2022, at 18:06, gene heskett  wrote:
> On 6/21/22 12:11, Andrew M.A. Cater wrote:
>> On Tue, Jun 21, 2022 at 11:55:56AM -0400, gene heskett wrote:
>>> Greetings all;
>>>
>>> So how am I supposed to read these installed docs?
>>>
>>> Thanks all.
>>>
>>> Cheers, Gene Heskett.
>>> -- 
>>> "There are four boxes to be used in defense of liberty:
>>>   soap, ballot, jury, and ammo. Please use in that order."
>>> -Ed Howdershelt (Author, 1940)
>>> If we desire respect for the law, we must first make the law respectable.
>>>   - Louis D. Brandeis
>>>
>> >From a web browser?
>>
>> file:///usr/share/doc/apache2-doc
>>
>> That's three slashes - file:// - two slashes - and then the filesystem path.
>>
>> Hope this helps, with every good wish, as ever,
>>
>> Andy Cater
> And that works, the third slash is new to me.
>

> So now the only thing I've changed from the default install is in 
> /etc/apache2/envvars
> for usr and grp to be www-data. But now it won't restart.
> journalctl -xe reports:
> Jun 21 12:46:16 coyote apachectl[286443]: AH00526: Syntax error on line 
> 63 of /etc/apache2/conf-enabled/security.conf:
> Jun 21 12:46:16 coyote apachectl[286443]: Invalid command 'Header', [...]

In my (unedited) version of that file:

[...]
61 # Requires mod_headers to be enabled.
62 #
63 #Header set X-Content-Type-Options: "nosniff"

If line 63 is required un-commented, then

$ sudo a2enmod headers
$ sudo systemctl restart apache2

should do the trick.

$ sudo apache2ctl -M

should then inlclude

"headers_module (shared)" 

which

https://httpd.apache.org/docs/current/mod/mod_headers.html

confirms is the identifier for mod_headers.

$ sudo a2dismod headers
$ sudo systemctl restart apache2
to disable, should that be desired.

Hope that helps.
Gareth



> perhaps misspelled or defined by a module not included in the server 
> configuration
> Jun 21 12:46:16 coyote apachectl[286440]: Action 'start' failed.
>
> It appears apache2 probably has it own mechanism for moving/linking stuff
> from mods-available to mods-enabled but makes no reference to the name 
> of that
> utility that I have found. Does it have a name? Or do I cobble up a 
> symlink in mc?
>
> Thanks Andy.
>> .
>
>
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
>   soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>   - Louis D. Brandeis



Re: CUPS and available-printers-list management (was Re: non installed printer can not be removed)

2022-06-20 Thread Gareth Evans
On Mon 20 Jun 2022, at 23:50, Gareth Evans  wrote:
> On Mon 20 Jun 2022, at 23:31, Gareth Evans  wrote:
>> On Mon 20 Jun 2022, at 17:34, The Wanderer  wrote:
>>> On 2022-06-20 at 12:01, Brian wrote:
>>>
>>>> On Mon 20 Jun 2022 at 09:28:30 -0400, The Wanderer wrote:
>>>> 
>>>>> On 2022-06-20 at 08:59, Brian wrote:
>>>
>>>>>> The ability to print to an IPP printer involves discovering its
>>>>>> URI. CUPS gets the URI via avahi-daemon whether it is an
>>>>>> on-demand or manual queue.
>>>>> 
>>>>> But that discovery doesn't have to be done by CUPS; once the URI is
>>>>> known, it should be possible for CUPS to simply accept the URI and
>>>>> work with it from then on, without discovery entering into the
>>>>> picture.
>>>> 
>>>> "...once the URIis known"? What mechaism does that? Incidentally, a
>>>> URI is required to query a printer for its attributes.
>>>
>>> Any of a number of mechanisms.
>>>
>>> CUPS could run discovery once, then either A: present the discovered URI
>>> with a prompt for whether to add it to its local list of known printers
>>> or B: add it to that list automatically, and then in either case not run
>>> discovery again until something asks it to.
>>>
>>> The user could run discovery manually (e.g. from the command line), then
>>> enter the discovered URI into CUPS.
>>>
>>> The user could look at another computer where the URI is already present
>>> in CUPS, and copy that across to the computer at hand.
>>>
>>> I could probably come up with more options if I thought about it for
>>> long enough.
>>>
>>>>>> Setting up a  manual queue for a moden printer is still available
>>>>>> but is unnecessary. 'lpstat -e' showves every printer on a subnet
>>>>>> and they should (barring bugs) appear in an application's print
>>>>>> dialog without any intervention.
>>>>> 
>>>>> The thing is, though, sometimes this is *undesirable*.
>>>> 
>>>> It is possible that upstream CUPS would agree. The intention is to
>>>> do something about it eventually.
>>>
>>> Depending on what the "something" is, that could be a very positive
>>> development!
>>>
>>>>> Going back to my workplace as an example, we have one subnet per
>>>>> building per floor, and one printer per classroom; we want the
>>>>> computers in each room to be able to see and print to the printer
>>>>> from that classroom, *only*. Having the ones from the other
>>>>> classrooms show up in the applications' print dialog would be a
>>>>> problem.
>>>> 
>>>> DNS-SD doesn't traverse subnets.
>>>
>>> Yes, but we don't have one subnet per classroom, we have one subnet per
>>> floor, with multiple classrooms per floor.
>>>
>>>>>> You can control whether Avahi browses for printers or not but
>>>>>> cannt make it selective in its browsing. DNS-SD is an
>>>>>> all-or-nothing public service discovery protocol. Perhaps think
>>>>>> of the display screens at airports.
>>>>> 
>>>>> That's just about discovery, though. I'm talking about what's done
>>>>> with the discovered information.
>>>>> 
>>>>> It sounds to me as if it's being said that CUPS takes the
>>>>> discovered information and automatically puts every discovered
>>>>> printer into the list of printers that will be made available in
>>>>> the print dialog (or equivalent).
>>>>> 
>>>>> That should not be the only option. It should also be possible to
>>>>> run discovery, manually select zero or more printers from the set
>>>>> discovered, and add *just those printers* to the list of those
>>>>> that will be shown in the print dialog
>>>>> 
>>>>> (It should also be possible to add printers to that list manually,
>>>>> without running discovery, if you know the necessary information.)
>>>> 
>>>> That's certainly possible at present.
>>>
>>> I figured, and seemed to recall, but did not want to assume.
>>>
>>>>> The result would be being able to be sure that the list of printers
>>>>> available i

Re: CUPS and available-printers-list management (was Re: non installed printer can not be removed)

2022-06-20 Thread Gareth Evans
On Mon 20 Jun 2022, at 23:31, Gareth Evans  wrote:
> On Mon 20 Jun 2022, at 17:34, The Wanderer  wrote:
>> On 2022-06-20 at 12:01, Brian wrote:
>>
>>> On Mon 20 Jun 2022 at 09:28:30 -0400, The Wanderer wrote:
>>> 
>>>> On 2022-06-20 at 08:59, Brian wrote:
>>
>>>>> The ability to print to an IPP printer involves discovering its
>>>>> URI. CUPS gets the URI via avahi-daemon whether it is an
>>>>> on-demand or manual queue.
>>>> 
>>>> But that discovery doesn't have to be done by CUPS; once the URI is
>>>> known, it should be possible for CUPS to simply accept the URI and
>>>> work with it from then on, without discovery entering into the
>>>> picture.
>>> 
>>> "...once the URIis known"? What mechaism does that? Incidentally, a
>>> URI is required to query a printer for its attributes.
>>
>> Any of a number of mechanisms.
>>
>> CUPS could run discovery once, then either A: present the discovered URI
>> with a prompt for whether to add it to its local list of known printers
>> or B: add it to that list automatically, and then in either case not run
>> discovery again until something asks it to.
>>
>> The user could run discovery manually (e.g. from the command line), then
>> enter the discovered URI into CUPS.
>>
>> The user could look at another computer where the URI is already present
>> in CUPS, and copy that across to the computer at hand.
>>
>> I could probably come up with more options if I thought about it for
>> long enough.
>>
>>>>> Setting up a  manual queue for a moden printer is still available
>>>>> but is unnecessary. 'lpstat -e' showves every printer on a subnet
>>>>> and they should (barring bugs) appear in an application's print
>>>>> dialog without any intervention.
>>>> 
>>>> The thing is, though, sometimes this is *undesirable*.
>>> 
>>> It is possible that upstream CUPS would agree. The intention is to
>>> do something about it eventually.
>>
>> Depending on what the "something" is, that could be a very positive
>> development!
>>
>>>> Going back to my workplace as an example, we have one subnet per
>>>> building per floor, and one printer per classroom; we want the
>>>> computers in each room to be able to see and print to the printer
>>>> from that classroom, *only*. Having the ones from the other
>>>> classrooms show up in the applications' print dialog would be a
>>>> problem.
>>> 
>>> DNS-SD doesn't traverse subnets.
>>
>> Yes, but we don't have one subnet per classroom, we have one subnet per
>> floor, with multiple classrooms per floor.
>>
>>>>> You can control whether Avahi browses for printers or not but
>>>>> cannt make it selective in its browsing. DNS-SD is an
>>>>> all-or-nothing public service discovery protocol. Perhaps think
>>>>> of the display screens at airports.
>>>> 
>>>> That's just about discovery, though. I'm talking about what's done
>>>> with the discovered information.
>>>> 
>>>> It sounds to me as if it's being said that CUPS takes the
>>>> discovered information and automatically puts every discovered
>>>> printer into the list of printers that will be made available in
>>>> the print dialog (or equivalent).
>>>> 
>>>> That should not be the only option. It should also be possible to
>>>> run discovery, manually select zero or more printers from the set
>>>> discovered, and add *just those printers* to the list of those
>>>> that will be shown in the print dialog
>>>> 
>>>> (It should also be possible to add printers to that list manually,
>>>> without running discovery, if you know the necessary information.)
>>> 
>>> That's certainly possible at present.
>>
>> I figured, and seemed to recall, but did not want to assume.
>>
>>>> The result would be being able to be sure that the list of printers
>>>> available in the print dialog will only change if someone manually
>>>> modifies it, rather than changing automatically if the set of
>>>> printers discoverable on the network changes.
>>> 
>>> Other would see the automatic change as a definite plus.
>>
>> And in some cases so would I! But not in others. And my interpretation
>> of Gene's original co

Re: CUPS and available-printers-list management (was Re: non installed printer can not be removed)

2022-06-20 Thread Gareth Evans
 be involved? Unless you're using an
>>> external print server to get the printer list from (in which case
>>> things become in some ways simpler and in other ways considerably
>>> more complicated), the list of printers that applications should
>>> see is local, and should be able to be maintained locally without
>>> bringing external things such as LDAP into the picture.
>> 
>> My understanding of LDAP is very limited. All I know is that CUPS
>> will eshew simple filtering. It has been tried, and didn't work.
>
> I don't even know why filtering would be involved. You're not starting
> with a longer list and filtering it to show only a subset; you're
> starting with an empty list, populating it (either manually, or
> automatically but only on demand) from a longer one, storing the
> resulting list, and later showing it on demand.
>
> Or, at least, that's the way it *should* work.
>
> If there's a reason why filtering needs to be involved, given that "two
> separate lists" model, I'd be interested in seeing that reason
> clarified.
>
> (I can see why it would be useful in a model which says that the list
> which is available to applications is always updated automatically from
> the list generated by discovery; in that context you'd need some way to
> tell the system which things from the discovered list should be included
> or excluded from the made-available list. But since that shouldn't be
> the only behavior, filtering shouldn't be the starting point for
> thinking about this.)
>
> -- 
>The Wanderer
>
> The reasonable man adapts himself to the world; the unreasonable one
> persists in trying to adapt the world to himself. Therefore all
> progress depends on the unreasonable man. -- George Bernard Shaw
>
>
> Attachments:
> * signature.asc

My understanding is that /queues/ appear in application dialogs and seem to be 
what is at issue.

I can't test this as my combination of cups + printer isn't working as 
expected, but from /etc/cups/cups-browsed.conf:

"# Set CreateIPPPrinterQueues to "No" to not auto-create print queues
# for IPP network printers.

[...]

# cups-browsed by default creates local print queues for each shared
# CUPS print queue which it discovers on remote machines in the local
# network(s). Set CreateRemoteCUPSPrinterQueues to "No" if you do not
# want cups-browsed to do this. For example you can set cups-browsed
# to only create queues for IPP network printers setting
# CreateIPPPrinterQueues not to "No" and CreateRemoteCUPSPrinterQueues
# to "No"."

If cups or avahi still provide a list of /printers/ when setting up /queues/ 
manually, doesn't this provide a mechanism to achieve "list-on-demand" with 
queues otherwise hidden to applications and system-config-printer?

Best wishes,
Gareth



Re: non installed printer can not be removed

2022-06-19 Thread Gareth Evans
On Sun 19 Jun 2022, at 23:01, The Wanderer  wrote:
> On 2022-06-19 at 15:47, Brian wrote:
>
>> On Sun 19 Jun 2022 at 14:54:58 -0400, The Wanderer wrote:
>> 
>>> On 2022-06-19 at 14:50, Brian wrote:
>
>>>> What does being "precious" involve?
>>> 
>>> I'm less certain about this, but my guess is that it means that
>>> CUPS insists on having these detected printers listed as available,
>>> rather than permitting them to be deleted from the list of
>>> available printers and having them remain that way.
>> 
>> You (or the OP) would have to say what is meant by "delete". CUPS
>> essentially *discover* printers. It is why it exists. Is that not
>> wanted?
>
> I understand the reason for CUPS' existence to be, not *discovering
> printers*, but *facilitating the ability to print*. That could involve
> discovering printers and presenting them as available, or it could
> involve only presenting as available a list of printers that have been
> entered into CUPS or otherwise set up in CUPS by some more manual means.
> (Among perhaps other possibilities.)
>
> Certainly at my workplace I understand that our Macs use CUPS for
> (network) printing, but at least at one point in our history (within the
> past decade), we had to go in and define each printer by IP address in
> CUPS on each Mac (or on the central machine which would be replicated to
> the others).
>

> I can certainly see it as being reasonable to want to be able to have
> CUPS perform printer discovery *on request*, and manually choose which
> of the discovered printers to add to the list of ones that will be
> remembered and shown as available when printing, but not have CUPS run
> discovery *automatically* and *automatically* add every discovered
> printer to that list. (I don't know with any confidence whether CUPS
> does the latter; I don't run it in enough environments with enough
> different available printers to have been able to make an assessment.
> However, I do have the impression that it may.)

I think /etc/apt/cups-browsed.conf provides flexibility here - notes explain 
the options but not what the defaults are. Having purged and reinstalled in my 
case, all lines in this file are comments.

man cups-browsed isn't helpful in that respect either.

Gareth

>
> -- 
>The Wanderer
>
> The reasonable man adapts himself to the world; the unreasonable one
> persists in trying to adapt the world to himself. Therefore all
> progress depends on the unreasonable man. -- George Bernard Shaw
>
>
> Attachments:
> * signature.asc



Re: non installed printer can not be removed

2022-06-19 Thread Gareth Evans



> On 19 Jun 2022, at 13:56, gene heskett  wrote:
> 
> On 6/18/22 05:54, Hans wrote:
>> Hi Brian,
>> 
>>> You were expected to execute 'lpinfo -v' and give us the output. We
>>> also expect the result of 'driverless'.
>> this is difficult, as the computer is 600km away from me and I have no access
>> to it at the moment.>
>> 
>>> Put the URI in double quotes.
>> I will try it, next time, I get access to the computer.
>> 
>>> It is not a rights problem. No user needs to be in group lp. It is a
>>> security risk. Take them out of it.
>> Ok, I will do it.
>> 
>>>> Any other ideas?
>>> The present ideas are good enough :).
>> Yeah, thanks a lot, and I will try it again. Meanwhile I sent another mail,
>> but I suppose, it does also not much help.
>> 
>> Anyway, I will do as you advised next time I get access to the computer.
>> 
>> Best regards and a happy weekend!
>> 
>> Hans
> Looks like I should have replied to you Hans, see my reply to Gareth..
> 
> Cheers, Gene Heskett.
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
> - Louis D. Brandeis
> 

Hi Gene,

I had (and still have) a feeling that Hans and I might have at least partly the 
same CUPS-related (or possibly router-related) problem with our printers, both 
of which are fax- and scan-capable MFDs, though his is a Samsung.

I used the Brother drivers with occasional hiccups on Ubuntu until 2019.  I 
then switched to Buster and (having been oblivious to it on Ubuntu, if it 
existed there then) found driverless printing suited my needs, though the 
Brother drivers do offer more options.

I can print to driverless queues created with lpadmin, though why not to 
driverless queues created by other means or autodetected is mystifying.

Many thanks anyway for your suggestion.

Best wishes,
Gareth





Re: debian-user message size limit

2022-06-17 Thread Gareth Evans



> On 17 Jun 2022, at 23:25, Bijan Soleymani  wrote:
> 
> On 2022-06-17 18:20, Bijan Soleymani wrote:
>>> On 2022-06-17 11:24, Gareth Evans wrote:
>>> Is there a limit for message size on debian-user?
>> I checked the data. I have been subscribed since 2003, though I
>> haven't been active for a lot of that period.
> 
> Actually I didn't store the emails from some point in 2004 through part of 
> 2008.
> 
> So I can't say when the limit was lowered but at least from 2009 until now 
> there hasn't been anything over 101KB (103,424 bytes).
> 
> Bijan
> 

Thanks for taking the time and effort to do that and letting us know.
G


Re: debian-user message size limit

2022-06-17 Thread Gareth Evans
On Fri 17 Jun 2022, at 20:00, Brian  wrote:
> On Fri 17 Jun 2022 at 16:24:54 +0100, Gareth Evans wrote:
>
>> Is there a limit for message size on debian-user?
>> 
>> I can't find any such info on
>> 
>> https://lists.debian.org/
>> 
>> https://www.debian.org/MailingLists/
>> 
>> https://lists.debian.org/debian-user/
>> 
>> but a couple of recent large-ish messages (one ~270K with two
>> screenshots, one 70K with log output) have neither got through nor
>> bounced back.
>> 
>> It would be helpful to know what it is if there is one.
>
> Don't expect Listmaster to rush here and tell us :),
>
> According to mutt, one of the mails you sent earlier today is 70K
> in size:
>
>   https://lists.debian.org/debian-user/2022/06/msg00586.html
>
> Do you hear anyone complaining? You did not. The bandwidth usage is
> low and time to download it is minuscule. The wheels are greased in
> -user.
>
> However, you cheated and put a log file inline. Naughty :). Good
> sense reigns in -user, however, so no one begrudges it.
>

> You know that attachments of ~270K and 70K do not get through. 

For the record, I had thought the log excerpts in the 70K email were likely to 
be just about acceptable inline - there was no attempt to send a ~70K 
attachment.  Perhaps there should (or shouldn't) have been.  I would find it 
difficult to consider 70K "large".  With no guidance on the issues in eg 
monthly FAQ, this creates ambiguity and uncertainty.

There was quite a delay in both the 70K email and the message size limit 
question getting back to me, such that I thought both may have been dropped or 
held - first the former, hence the latter, and then still an unusually long 
wait.  But such is email sometimes.

The lack of dropped/held feedback [1] (if messages even are held) along with 
ambiguity around message/attachment sizes, makes it difficult to judge what to 
do and when, if anything.

Best wishes,
Gareth

[1] "Another known limitation in our mailing list software is that most 
rejected e-mails get silently dropped, so the user has no real indication on 
what went wrong."
https://www.debian.org/MailingLists/


> Try
> ~50K next time and be aware that compression with gzip or xz is a
> option. Text files compress well.
>
> If 50K is rejected, no harm is done. Try again to find the upper
> limit.
>
> Attacments to a mailing list like -user are an efficient us of its
> services. Ephemeral info on other sites isn't of any value to users
> in the future.
>
> -- 
> Brian.



Re: debian-user message size limit

2022-06-17 Thread Gareth Evans



> On 17 Jun 2022, at 17:51, Nicolas George  wrote:
> 
> Gareth Evans (12022-06-17):
>> but a couple of recent large-ish messages (one ~270K with two
>> screenshots, one 70K with log output) have neither got through nor
>> bounced back.
> 
> “Avoid sending large attachments.”
> 
> https://www.debian.org/MailingLists/
> 
> This is not specific to Debian, most Libre Software mailing-list I know
> have a similar policy. It is inefficient and annoying for recipients.
> Put your screenshots on some transient hosting site.
> 
> Regards,
> 
> -- 
>  Nicolas George
> 

Thank you both - I'll try that next time.
Gareth


debian-user message size limit

2022-06-17 Thread Gareth Evans
Is there a limit for message size on debian-user?

I can't find any such info on

https://lists.debian.org/

https://www.debian.org/MailingLists/

https://lists.debian.org/debian-user/

but a couple of recent large-ish messages (one ~270K with two screenshots, one 
70K with log output) have neither got through nor bounced back.

It would be helpful to know what it is if there is one.

Thanks,
Gareth



Re: Printing problem (was snapshot.debian.org)

2022-06-17 Thread Gareth Evans
On Mon  6 Jun 2022, at 20:03, Gareth Evans  wrote:
> On Mon  6 Jun 2022, at 17:45, Gareth Evans  wrote:
>> Recent message with screenshots didn't get through (at least yet) - 
>> text below, plus another observation.
>>
>> On Mon  6 Jun 2022, at 16:53, Gareth Evans  wrote:
>>> On Mon  6 Jun 2022, at 16:23, Eduardo M KALINOWSKI 
>>>  wrote:
>>>> On 06/06/2022 10:48, Gareth Evans wrote:
>>>>> Not sure what's happened though as it worked perfectly with both 
>>>>> auto-detected and manually-added printer profiles from Bullseye until a 
>>>>> week or two ago.  My logs suggest no update to system-config-printer.  I 
>>>>> did change the printer's hostname (on printer console) but both the 
>>>>> printer and laptop have been restarted several times since then, printers 
>>>>> re-added and re-auto-detected etc.
>>>>
>>>> In my case it never worked any other way. But I never dug very deep to 
>>>> try to find out why.
>>>>
>>>>> Why should adding via the command line work, but not via 
>>>>> system-config-printer or localhost:631?
>>>>
>>>> I guess adding it in CUPS web interface (localhost:631) should work, if 
>>>> the exact same parameters are selected: the ipp:// url and the "CUPS PPD 
>>>> generator" (selected by "-m everywhere" option) as opposed to 
>>>> "cups-filters PPD generator".
>>>>
>>>> That might be the explanation (at least for my case). From what I 
>>>> understand from https://wiki.debian.org/CUPSDriverlessPrinting , there 
>>>> are those two options, and "The cups-filters PPD generator is used by 
>>>> default with cups-browsed". In theory either should work, but there's 
>>>> probably some quirk in the printer and some small difference between the 
>>>> two methods.
>>>>
>>>> -- 
>>>> Tchurin-tchurin-tchun-clain!
>>>>
>>>> -- Chapolim
>>>>
>>>> Eduardo M KALINOWSKI
>>>> edua...@kalinowski.com.br
>>>
>>> When adding a printer with system-config-printer, it is detected and 
>>> listed under "Network Printer" in the list (when expanded) (twice).  I 
>>> currently see what's in the screenshots attached, but sometimes the 
>>> "IPP network printer via DNS-SD" connection option changes to something 
>>> involving AppSocket/... at the beginning.  
>>>
>>> There seem to be different connections available at different times.
>>>
>>> Any ideas why that should be?
>>>
>>> It seems to me that something has changed.  Given the problem was the 
>>> same with an identical printer on a different network, I guess it's 
>>> something to do with CUPS (or its config) rather than the printer 
>>> itself misbehaving.  I had factory-reset it a couple of days ago.
>>>
>>> Thanks,
>>> Gareth
>>>
>>>
>>> Attachments:
>>> * Screenshot at 2022-06-06 16-39-52.png
>>> * Screenshot at 2022-06-06 16-40-03.png
>>
>> $ driverless list
>> DEBUG: Started ippfind (PID 95003)
>> "driverless:ipp://Brother%20MFC-L2740DW%20series._ipp._tcp.local/" en 
>> "Brother" "Brother MFC-L2740DW series, driverless, cups-filters 1.28.7" 
>> "MFG:Brother;MDL:MFC-L2740DW series;CMD:PWGRaster,AppleRaster,URF,PWG;"
>> "driverless-fax:ipp://Brother%20MFC-L2740DW%20series._ipp._tcp.local/" 
>> en "Brother" "Brother MFC-L2740DW series, Fax, driverless, cups-filters 
>> 1.28.7" "MFG:Brother;MDL:MFC-L2740DW 
>> series;CMD:PWGRaster,AppleRaster,URF,PWG;"
>> DEBUG: ippfind (PID 95003) exited with no errors.
>>
>> The error log except attached earlier includes:
>>
>> [line no] log text
>> [30] D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-is-accepting-jobs 
>> boolean true
>> D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-state enum idle
>> D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-state-reasons keyword 
>> none
>> D [06/Jun/2022:13:32:04 +0100] [Job 6]  end-of-attributes-tag 
>> D [06/Jun/2022:13:32:04 +0100] [Job 6] IPP/2.0 Get-Job-Attributes #22
>> D [06/Jun/2022:13:32:04 +0100] [Job 6]  operation-attributes-tag 
>> 
>> D [06/Jun/2022:13:32:04 +0100] [Job 6] attributes-charset charset utf-8
>> D [06/Jun/2022:13:32:04 +0100] [Job 6] attributes-natural-language 
>> naturalLangua

Re: non installed printer can not be removed

2022-06-16 Thread Gareth Evans


Re: non installed printer can not be removed

2022-06-16 Thread Gareth Evans



> On 17 Jun 2022, at 01:56, Gareth Evans  wrote:
> On Thu 16 Jun 2022, at 22:13, Hans  wrote:
>> Hi folks,
>> 
>> I am struggeling with a little problem, I can not explain. 
>> 
>> A friend of mine uses a printer (Samsung SL-C480FW), which is connected to 
>> the 
>> router with wireless. However, although there are no drivers and no 
>> ppd-files 
>> installed, the printer is seen by cups (and also by system-printer-config) 
>> but 
>> can not be used (think, because the missing ppd-file).
>> 
>> When this is installed, udev-entries and so on are set, then the printer is 
>> seen for example with ipp://192.168.*.*. 
>> 
>> However, printing does not work, although the printer gets data, but then 
>> hangs. I believe, this is a driver problem (because this appeared, since my 
>> friend got a new router (FritzBox).
>> 
>> I hope, for this I will find a solution, so hints are welcome, buut not the 
>> reason for this thread.
>> 
>> Much more I am interested, to know, why I can not delete the printer in CUPS 
>> or system-config-printer? Any printer I add, can be deleted, but the last 
>> entry can not be deleted. 
>> 
>> What is wrong? Why does the kernel see the correct printer, and where does 
>> it 
>> get its information? It is not connected at the USB-port, so no information 
>> could be taken from this.
>> 
>> Any ideas?
>> 
>> Thanks for any help!
>> 
>> Best regards
>> 
>> Hans
> 
> Various sources (but not HP documentation afaics) suggest this printer is 
> airprint-compatible.
> 
> https://www.amazon.co.uk/Samsung-C480FW-Colour-Multifunction-Printer/dp/B010NE2HKI
> 
> https://productz.com/en/samsung-xpress-sl-c480fw/p/wxnG7
> 
> If so, I would suggest "cannot delete" = continuous autodetection.
> 
> What is the output of
> 
> $ driverless
> 
> As for not actually being able to print, I have a problem like that too which 
> has only recently emerged with an airprint printer which worked until 
> recently.
> 
> You might find you can print (as I do) if you add a queue via lpadmin.  
> 
> As helped me recently:
> 
> "# lpinfo -v
> 
> to get a list of URLs (the one starting with ipp:// is the one 
> necessary), and then something like
> 
> # lpadmin -p Brother2740 -v IPP_URL_FROM_ABOVE -E -m everywhere"
> 
> https://lists.debian.org/debian-user/2022/06/msg00212.html
> 

Can anyone with a fax-capable MFP confirm that driverless autodetected printing 
works with CUPS on Debian 11 with the latest stable CUPS version?

My debug-enabled cups error log includes the following, which makes me wonder 
if it's being identified correctly:

Does this suggest it's being detected as (only) a fax?  (Though this relates to 
a queue manually added with system-config-printer as nothing is autodetected)

D [17/Jun/2022:00:47:45 +0100] [Job 36] Resolving \"Brother MFC-L2740DW 
series\", regtype=\"_ipp._tcp\", domain=\"local.\"...
D [17/Jun/2022:00:47:45 +0100] [Notifier] state=3
D [17/Jun/2022:00:47:45 +0100] [Notifier] PrinterStateChanged
D [17/Jun/2022:00:47:45 +0100] [Job 36] Color Manager: Calibration Mode/Off
D [17/Jun/2022:00:47:45 +0100] [Job 36] PID 2953512 
(/usr/lib/cups/filter/bannertopdf) exited with no errors.
D [17/Jun/2022:00:47:45 +0100] [Job 36] Calling 
FindDeviceById(cups-MFC-L2740DW_DLIPP)
D [17/Jun/2022:00:47:45 +0100] [Job 36] Found device 
/org/freedesktop/ColorManager/devices/cups_MFC_L2740DW_DLIPP
D [17/Jun/2022:00:47:45 +0100] [Job 36] Calling 
org.freedesktop.ColorManager.Device.Get(ProfilingInhibitors)
D [17/Jun/2022:00:47:45 +0100] [Job 36] Calling 
FindDeviceById(cups-MFC-L2740DW_DLIPP)
D [17/Jun/2022:00:47:45 +0100] [Job 36] Found device 
/org/freedesktop/ColorManager/devices/cups_MFC_L2740DW_DLIPP
D [17/Jun/2022:00:47:45 +0100] [Job 36] Calling 
GetProfileForQualifiers(Gray.Stationery.600dpi...)
D [17/Jun/2022:00:47:45 +0100] [Job 36] Found profile 
/org/freedesktop/ColorManager/profiles/MFC_L2740DW_DLIPP_Gray__
D [17/Jun/2022:00:47:45 +0100] [Job 36] Calling 
org.freedesktop.ColorManager.Profile.Get(Filename)
D [17/Jun/2022:00:47:45 +0100] [Job 36] Resolved as 
\"ipp://mfcl2740dw.local:631/ipp/faxout\"...

system-config-printer refuses to persist changes to the driver for autodetected 
queues with previous cups versions which do autodetect it, hanging on to the 
version including "...fax, driverless...".

Thanks,
Gareth





Re: non installed printer can not be removed

2022-06-16 Thread Gareth Evans
On Thu 16 Jun 2022, at 22:13, Hans  wrote:
> Hi folks,
>
> I am struggeling with a little problem, I can not explain. 
>
> A friend of mine uses a printer (Samsung SL-C480FW), which is connected to 
> the 
> router with wireless. However, although there are no drivers and no ppd-files 
> installed, the printer is seen by cups (and also by system-printer-config) 
> but 
> can not be used (think, because the missing ppd-file).
>
> When this is installed, udev-entries and so on are set, then the printer is 
> seen for example with ipp://192.168.*.*. 
>
> However, printing does not work, although the printer gets data, but then 
> hangs. I believe, this is a driver problem (because this appeared, since my 
> friend got a new router (FritzBox).
>
> I hope, for this I will find a solution, so hints are welcome, buut not the 
> reason for this thread.
>
> Much more I am interested, to know, why I can not delete the printer in CUPS 
> or system-config-printer? Any printer I add, can be deleted, but the last 
> entry can not be deleted. 
>
> What is wrong? Why does the kernel see the correct printer, and where does it 
> get its information? It is not connected at the USB-port, so no information 
> could be taken from this.
>
> Any ideas?
>
> Thanks for any help!
>
> Best regards
>
> Hans

Various sources (but not HP documentation afaics) suggest this printer is 
airprint-compatible.

https://www.amazon.co.uk/Samsung-C480FW-Colour-Multifunction-Printer/dp/B010NE2HKI

https://productz.com/en/samsung-xpress-sl-c480fw/p/wxnG7

If so, I would suggest "cannot delete" = continuous autodetection.

What is the output of

$ driverless

As for not actually being able to print, I have a problem like that too which 
has only recently emerged with an airprint printer which worked until recently.

You might find you can print (as I do) if you add a queue via lpadmin.  

As helped me recently:

"# lpinfo -v

to get a list of URLs (the one starting with ipp:// is the one 
necessary), and then something like

# lpadmin -p Brother2740 -v IPP_URL_FROM_ABOVE -E -m everywhere"

https://lists.debian.org/debian-user/2022/06/msg00212.html



Re: Printing problem (was snapshot.debian.org)

2022-06-06 Thread Gareth Evans
On Mon  6 Jun 2022, at 17:45, Gareth Evans  wrote:
> Recent message with screenshots didn't get through (at least yet) - 
> text below, plus another observation.
>
> On Mon  6 Jun 2022, at 16:53, Gareth Evans  wrote:
>> On Mon  6 Jun 2022, at 16:23, Eduardo M KALINOWSKI 
>>  wrote:
>>> On 06/06/2022 10:48, Gareth Evans wrote:
>>>> Not sure what's happened though as it worked perfectly with both 
>>>> auto-detected and manually-added printer profiles from Bullseye until a 
>>>> week or two ago.  My logs suggest no update to system-config-printer.  I 
>>>> did change the printer's hostname (on printer console) but both the 
>>>> printer and laptop have been restarted several times since then, printers 
>>>> re-added and re-auto-detected etc.
>>>
>>> In my case it never worked any other way. But I never dug very deep to 
>>> try to find out why.
>>>
>>>> Why should adding via the command line work, but not via 
>>>> system-config-printer or localhost:631?
>>>
>>> I guess adding it in CUPS web interface (localhost:631) should work, if 
>>> the exact same parameters are selected: the ipp:// url and the "CUPS PPD 
>>> generator" (selected by "-m everywhere" option) as opposed to 
>>> "cups-filters PPD generator".
>>>
>>> That might be the explanation (at least for my case). From what I 
>>> understand from https://wiki.debian.org/CUPSDriverlessPrinting , there 
>>> are those two options, and "The cups-filters PPD generator is used by 
>>> default with cups-browsed". In theory either should work, but there's 
>>> probably some quirk in the printer and some small difference between the 
>>> two methods.
>>>
>>> -- 
>>> Tchurin-tchurin-tchun-clain!
>>>
>>> -- Chapolim
>>>
>>> Eduardo M KALINOWSKI
>>> edua...@kalinowski.com.br
>>
>> When adding a printer with system-config-printer, it is detected and 
>> listed under "Network Printer" in the list (when expanded) (twice).  I 
>> currently see what's in the screenshots attached, but sometimes the 
>> "IPP network printer via DNS-SD" connection option changes to something 
>> involving AppSocket/... at the beginning.  
>>
>> There seem to be different connections available at different times.
>>
>> Any ideas why that should be?
>>
>> It seems to me that something has changed.  Given the problem was the 
>> same with an identical printer on a different network, I guess it's 
>> something to do with CUPS (or its config) rather than the printer 
>> itself misbehaving.  I had factory-reset it a couple of days ago.
>>
>> Thanks,
>> Gareth
>>
>>
>> Attachments:
>> * Screenshot at 2022-06-06 16-39-52.png
>> * Screenshot at 2022-06-06 16-40-03.png
>
> $ driverless list
> DEBUG: Started ippfind (PID 95003)
> "driverless:ipp://Brother%20MFC-L2740DW%20series._ipp._tcp.local/" en 
> "Brother" "Brother MFC-L2740DW series, driverless, cups-filters 1.28.7" 
> "MFG:Brother;MDL:MFC-L2740DW series;CMD:PWGRaster,AppleRaster,URF,PWG;"
> "driverless-fax:ipp://Brother%20MFC-L2740DW%20series._ipp._tcp.local/" 
> en "Brother" "Brother MFC-L2740DW series, Fax, driverless, cups-filters 
> 1.28.7" "MFG:Brother;MDL:MFC-L2740DW 
> series;CMD:PWGRaster,AppleRaster,URF,PWG;"
> DEBUG: ippfind (PID 95003) exited with no errors.
>
> The error log except attached earlier includes:
>
> [line no] log text
> [30] D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-is-accepting-jobs 
> boolean true
> D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-state enum idle
> D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-state-reasons keyword 
> none
> D [06/Jun/2022:13:32:04 +0100] [Job 6]  end-of-attributes-tag 
> D [06/Jun/2022:13:32:04 +0100] [Job 6] IPP/2.0 Get-Job-Attributes #22
> D [06/Jun/2022:13:32:04 +0100] [Job 6]  operation-attributes-tag 
> 
> D [06/Jun/2022:13:32:04 +0100] [Job 6] attributes-charset charset utf-8
> D [06/Jun/2022:13:32:04 +0100] [Job 6] attributes-natural-language 
> naturalLanguage en-gb
> D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-uri uri 
> ipp://mfcl2740dw.local:631/ipp/faxout
> 
>   ^^
> 
>Fax
>
> D [06/Jun/2022:13:32:04 +0100] [Job 6] job-id integer 82

Re: Printing problem (was snapshot.debian.org)

2022-06-06 Thread Gareth Evans
Recent message with screenshots didn't get through (at least yet) - text below, 
plus another observation.

On Mon  6 Jun 2022, at 16:53, Gareth Evans  wrote:
> On Mon  6 Jun 2022, at 16:23, Eduardo M KALINOWSKI 
>  wrote:
>> On 06/06/2022 10:48, Gareth Evans wrote:
>>> Not sure what's happened though as it worked perfectly with both 
>>> auto-detected and manually-added printer profiles from Bullseye until a 
>>> week or two ago.  My logs suggest no update to system-config-printer.  I 
>>> did change the printer's hostname (on printer console) but both the printer 
>>> and laptop have been restarted several times since then, printers re-added 
>>> and re-auto-detected etc.
>>
>> In my case it never worked any other way. But I never dug very deep to 
>> try to find out why.
>>
>>> Why should adding via the command line work, but not via 
>>> system-config-printer or localhost:631?
>>
>> I guess adding it in CUPS web interface (localhost:631) should work, if 
>> the exact same parameters are selected: the ipp:// url and the "CUPS PPD 
>> generator" (selected by "-m everywhere" option) as opposed to 
>> "cups-filters PPD generator".
>>
>> That might be the explanation (at least for my case). From what I 
>> understand from https://wiki.debian.org/CUPSDriverlessPrinting , there 
>> are those two options, and "The cups-filters PPD generator is used by 
>> default with cups-browsed". In theory either should work, but there's 
>> probably some quirk in the printer and some small difference between the 
>> two methods.
>>
>> -- 
>> Tchurin-tchurin-tchun-clain!
>>
>> -- Chapolim
>>
>> Eduardo M KALINOWSKI
>> edua...@kalinowski.com.br
>
> When adding a printer with system-config-printer, it is detected and 
> listed under "Network Printer" in the list (when expanded) (twice).  I 
> currently see what's in the screenshots attached, but sometimes the 
> "IPP network printer via DNS-SD" connection option changes to something 
> involving AppSocket/... at the beginning.  
>
> There seem to be different connections available at different times.
>
> Any ideas why that should be?
>
> It seems to me that something has changed.  Given the problem was the 
> same with an identical printer on a different network, I guess it's 
> something to do with CUPS (or its config) rather than the printer 
> itself misbehaving.  I had factory-reset it a couple of days ago.
>
> Thanks,
> Gareth
>
>
> Attachments:
> * Screenshot at 2022-06-06 16-39-52.png
> * Screenshot at 2022-06-06 16-40-03.png

$ driverless list
DEBUG: Started ippfind (PID 95003)
"driverless:ipp://Brother%20MFC-L2740DW%20series._ipp._tcp.local/" en "Brother" 
"Brother MFC-L2740DW series, driverless, cups-filters 1.28.7" 
"MFG:Brother;MDL:MFC-L2740DW series;CMD:PWGRaster,AppleRaster,URF,PWG;"
"driverless-fax:ipp://Brother%20MFC-L2740DW%20series._ipp._tcp.local/" en 
"Brother" "Brother MFC-L2740DW series, Fax, driverless, cups-filters 1.28.7" 
"MFG:Brother;MDL:MFC-L2740DW series;CMD:PWGRaster,AppleRaster,URF,PWG;"
DEBUG: ippfind (PID 95003) exited with no errors.

The error log except attached earlier includes:

[line no] log text
[30] D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-is-accepting-jobs boolean 
true
D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-state enum idle
D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-state-reasons keyword none
D [06/Jun/2022:13:32:04 +0100] [Job 6]  end-of-attributes-tag 
D [06/Jun/2022:13:32:04 +0100] [Job 6] IPP/2.0 Get-Job-Attributes #22
D [06/Jun/2022:13:32:04 +0100] [Job 6]  operation-attributes-tag 
D [06/Jun/2022:13:32:04 +0100] [Job 6] attributes-charset charset utf-8
D [06/Jun/2022:13:32:04 +0100] [Job 6] attributes-natural-language 
naturalLanguage en-gb
D [06/Jun/2022:13:32:04 +0100] [Job 6] printer-uri uri 
ipp://mfcl2740dw.local:631/ipp/faxout

  ^^

   Fax

D [06/Jun/2022:13:32:04 +0100] [Job 6] job-id integer 82

D [06/Jun/2022:13:32:04 +0100] [Job 6]  unsupported-attributes-tag 
D [06/Jun/2022:13:32:04 +0100] [Job 6] requested-attributes keyword 
job-media-sheets-completed
D [06/Jun/2022:13:32:04 +0100] [Job 6]  job-attributes-tag 
D [06/Jun/2022:13:32:04 +0100] [Job 6] job-id integer 82
D [06/Jun/2022:13:32:04 +0100] [Job 6] job-impressions-completed integer 0
D [06/Jun/2022:13:32:04 +0100] [Job 6] job-name nameWithoutLanguage Test Page
D [06/Jun/2022:13:32:04 +0100] [Job 6] job-origin

Re: Printing problem (was snapshot.debian.org)

2022-06-06 Thread Gareth Evans
On Mon  6 Jun 2022, at 14:14, Eduardo M KALINOWSKI  
wrote:
> On 06/06/2022 08:19, Gareth Evans wrote:
>> Hello,
>> 
>> I have a strange printing problem which can be replicated on two identical 
>> printers on two different networks, when printing to wireless driverless IPP 
>> with Brother MFC-L2740DW printers from Bullseye, whether the printer is 
>> auto-detected or manually added via ocalhost:631 or system-config-printer.
>
> I have this exact printer. Driverless printing works, but not with the 
> automatically generated entry included by cups-browsed (or some other 
> package), i have to manually add a printer queue using
>
> # lpinfo -v
>
> to get a list of URLs (the one starting with ipp:// is the one 
> necessary), and then something like
>
> # lpadmin -p Brother2740 -v IPP_URL_FROM_ABOVE -E -m everywhere
>
>

That worked, and it's now printing normally after reboot via the added profile, 
thank you Eduardo.  

Not sure what's happened though as it worked perfectly with both auto-detected 
and manually-added printer profiles from Bullseye until a week or two ago.  My 
logs suggest no update to system-config-printer.  I did change the printer's 
hostname (on printer console) but both the printer and laptop have been 
restarted several times since then, printers re-added and re-auto-detected etc.

HTTP_STATE_WAITING Closing for error 32 (Broken pipe)

- appears in the error log for jobs it is now actually printing, so that seems 
to be unrelated.

I don't like it when things stop working without explanation.  

Why should adding via the command line work, but not via system-config-printer 
or localhost:631?

Any further debugging tips would be appreciated.

Thanks,
Gareth



> -- 
> BOFH excuse #201:
>
> RPC_PMAP_FAILURE
>
> Eduardo M KALINOWSKI
> edua...@kalinowski.com.br



Re: Printing problem (was snapshot.debian.org)

2022-06-06 Thread Gareth Evans
CUPS error log excerpt attached.
G


On Mon  6 Jun 2022, at 14:02, Gareth Evans  wrote:
> On Mon  6 Jun 2022, at 13:05, rhkra...@gmail.com wrote:
>> On Monday, June 06, 2022 07:34:07 AM Gareth Evans wrote:
>>> On Mon  6 Jun 2022, at 12:19, Gareth Evans  wrote:
>>> > I have a strange printing problem which can be replicated on two
>>> > identical printers on two different networks, when printing to wireless
>>> > driverless IPP with Brother MFC-L2740DW printers from Bullseye, whether
>>> > the printer is auto-detected or manually added via ocalhost:631 or
>>> > system-config-printer.
>>
>> Is there a facility to run a test print directly from the printer?  If so, 
>> does that work?
>
> Hello,
>
> Yes, the printer prints test pages and reports from its own console, 
> and documents via wifi from my iphone, but not from Debian.  Even 11.0 
> with non-updated cups.  Same issue with an identical printer on another 
> network - that does print from Buster.  I half suspected a router 
> problem, but same issues when Bullseye laptop and my printer are linked 
> via iphone wifi hotspot.  Same issue when my Bullseye laptop is linked 
> via EE mobile broadband router (locally) to an identical printer (in 
> another place, 10 miles away, so can't check for differences regularly).
>
> After using system-config-printer to print a test page on an 
> auto-detected driverless IPP profile, connected via 2.5GHz wifi to a 
> router, to which the Bullseye laptop is connected via 5GHz wifi, I get 
> no output, and:
>
> $ lpstat -t
> scheduler is running
> no system default destination
> device for Brother_MFC_L2740DW_series: 
> implicitclass://Brother_MFC_L2740DW_series/
> Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 
> 13:12:54 BST
> printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 
> 2022 13:12:54 BST
>   No suitable destination host found by cups-browsed.
> Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 
> 13:12:48 BST
>
> After changing laptop to 2.5GHz wifi...
>
> $ lpstat -t
> scheduler is running
> no system default destination
> device for Brother_MFC_L2740DW_series: 
> implicitclass://Brother_MFC_L2740DW_series/
> Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 
> 13:14:40 BST
> printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 
> 2022 13:14:40 BST
>   Printer disappeared or cups-browsed shutdown
> Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 
> 13:12:48 BST
>
> $ sudo systemctl status cups-browsed
> [sudo] password for user: 
> ● cups-browsed.service - Make remote CUPS printers available locally
>  Loaded: loaded (/lib/systemd/system/cups-browsed.service; enabled; 
> vendor >
>  Active: active (running) since Mon 2022-06-06 13:04:25 BST; 11min ago
>Main PID: 1666 (cups-browsed)
>   Tasks: 3 (limit: 14146)
>  Memory: 3.8M
> CPU: 209ms
>  CGroup: /system.slice/cups-browsed.service
>  └─1666 /usr/sbin/cups-browsed
>
> Jun 06 13:04:25 qwerty systemd[1]: Started Make remote CUPS printers 
> available >
>
> *I deleted 5GHz wifi profile from Network Manager Edit Connections*
> $ sudo reboot
>
> $ sudo systemctl status cups-browsed
> [sudo] password for user: 
> ● cups-browsed.service - Make remote CUPS printers available locally
>  Loaded: loaded (/lib/systemd/system/cups-browsed.service; enabled; 
> vendor >
>  Active: active (running) since Mon 2022-06-06 13:27:27 BST; 3min 13s ago
>Main PID: 2059 (cups-browsed)
>   Tasks: 3 (limit: 14146)
>  Memory: 2.9M
> CPU: 100ms
>  CGroup: /system.slice/cups-browsed.service
>  └─2059 /usr/sbin/cups-browsed
>
> Jun 06 13:27:27 qwerty systemd[1]: Started Make remote CUPS printers 
> available >
> lines 1-11/11 (END)
>
>
> $ lpstat -t
> scheduler is running
> no system default destination
> device for Brother_MFC_L2740DW_series: 
> implicitclass://Brother_MFC_L2740DW_series/
> Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 
> 13:27:46 BST
> printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 
> 2022 13:27:46 BST
>   Printer disappeared or cups-browsed shutdown
> Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 
> 13:12:48 BST
>
> *Turned printer off and on again*
>
> $ lpstat -t
> scheduler is running
> no system default destination
> device for Brother_MFC_L2740DW_series: 
> implicitclass://Brother_MFC_L2740DW_series/
> Brother_MFC_L2740DW_series accepting requests since 

Re: Printing problem (was snapshot.debian.org)

2022-06-06 Thread Gareth Evans
On Mon  6 Jun 2022, at 13:05, rhkra...@gmail.com wrote:
> On Monday, June 06, 2022 07:34:07 AM Gareth Evans wrote:
>> On Mon  6 Jun 2022, at 12:19, Gareth Evans  wrote:
>> > I have a strange printing problem which can be replicated on two
>> > identical printers on two different networks, when printing to wireless
>> > driverless IPP with Brother MFC-L2740DW printers from Bullseye, whether
>> > the printer is auto-detected or manually added via ocalhost:631 or
>> > system-config-printer.
>
> Is there a facility to run a test print directly from the printer?  If so, 
> does that work?

Hello,

Yes, the printer prints test pages and reports from its own console, and 
documents via wifi from my iphone, but not from Debian.  Even 11.0 with 
non-updated cups.  Same issue with an identical printer on another network - 
that does print from Buster.  I half suspected a router problem, but same 
issues when Bullseye laptop and my printer are linked via iphone wifi hotspot.  
Same issue when my Bullseye laptop is linked via EE mobile broadband router 
(locally) to an identical printer (in another place, 10 miles away, so can't 
check for differences regularly).

After using system-config-printer to print a test page on an auto-detected 
driverless IPP profile, connected via 2.5GHz wifi to a router, to which the 
Bullseye laptop is connected via 5GHz wifi, I get no output, and:

$ lpstat -t
scheduler is running
no system default destination
device for Brother_MFC_L2740DW_series: 
implicitclass://Brother_MFC_L2740DW_series/
Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 13:12:54 BST
printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 2022 
13:12:54 BST
No suitable destination host found by cups-browsed.
Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 13:12:48 
BST

After changing laptop to 2.5GHz wifi...

$ lpstat -t
scheduler is running
no system default destination
device for Brother_MFC_L2740DW_series: 
implicitclass://Brother_MFC_L2740DW_series/
Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 13:14:40 BST
printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 2022 
13:14:40 BST
Printer disappeared or cups-browsed shutdown
Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 13:12:48 
BST

$ sudo systemctl status cups-browsed
[sudo] password for user: 
● cups-browsed.service - Make remote CUPS printers available locally
 Loaded: loaded (/lib/systemd/system/cups-browsed.service; enabled; vendor >
 Active: active (running) since Mon 2022-06-06 13:04:25 BST; 11min ago
   Main PID: 1666 (cups-browsed)
  Tasks: 3 (limit: 14146)
 Memory: 3.8M
CPU: 209ms
 CGroup: /system.slice/cups-browsed.service
 └─1666 /usr/sbin/cups-browsed

Jun 06 13:04:25 qwerty systemd[1]: Started Make remote CUPS printers available >

*I deleted 5GHz wifi profile from Network Manager Edit Connections*
$ sudo reboot

$ sudo systemctl status cups-browsed
[sudo] password for user: 
● cups-browsed.service - Make remote CUPS printers available locally
 Loaded: loaded (/lib/systemd/system/cups-browsed.service; enabled; vendor >
 Active: active (running) since Mon 2022-06-06 13:27:27 BST; 3min 13s ago
   Main PID: 2059 (cups-browsed)
  Tasks: 3 (limit: 14146)
 Memory: 2.9M
CPU: 100ms
 CGroup: /system.slice/cups-browsed.service
 └─2059 /usr/sbin/cups-browsed

Jun 06 13:27:27 qwerty systemd[1]: Started Make remote CUPS printers available >
lines 1-11/11 (END)


$ lpstat -t
scheduler is running
no system default destination
device for Brother_MFC_L2740DW_series: 
implicitclass://Brother_MFC_L2740DW_series/
Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 13:27:46 BST
printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 2022 
13:27:46 BST
Printer disappeared or cups-browsed shutdown
Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 13:12:48 
BST

*Turned printer off and on again*

$ lpstat -t
scheduler is running
no system default destination
device for Brother_MFC_L2740DW_series: 
implicitclass://Brother_MFC_L2740DW_series/
Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 13:31:39 BST
printer Brother_MFC_L2740DW_series now printing Brother_MFC_L2740DW_series-6.  
enabled since Mon 06 Jun 2022 13:31:39 BST
Waiting for job to complete.
Brother_MFC_L2740DW_series-6 user  1024   Mon 06 Jun 2022 13:12:48 
BST


$ lpstat -t
scheduler is running
no system default destination
device for Brother_MFC_L2740DW_series: 
implicitclass://Brother_MFC_L2740DW_series/
Brother_MFC_L2740DW_series accepting requests since Mon 06 Jun 2022 13:32:06 BST
printer Brother_MFC_L2740DW_series is idle.  enabled since Mon 06 Jun 2022 
13:32:06 BST

But nothing printed.

/var/log/cups/error_log

Re: snapshot.debian.org

2022-06-06 Thread Gareth Evans
On Mon  6 Jun 2022, at 12:19, Gareth Evans  wrote:
> Hello,
>
> I have a strange printing problem which can be replicated on two 
> identical printers on two different networks, when printing to wireless 
> driverless IPP with Brother MFC-L2740DW printers from Bullseye, whether 
> the printer is auto-detected or manually added via ocalhost:631 or 
> system-config-printer.  
>
> The printers light up and look like business, print queue monitors 
> report jobs completed, but nothing actually prints.
>
> There are some errors in /var/log/cups/error_log but I won't go into 
> that at the moment because I'm trying to downgrade cups and this is 
> another problem.
>
> I think this problem has occurred since a cups update on 2022-05-27, so 
> having purged it completely and removed /etc/cups and reinstalled it 
> (along with much else due to dependency issues of libcups2) I am now 
> trying to downgrade cups to see if that makes a difference.
>
> I have followed the instructions at:
>
> https://vincent.bernat.ch/en/blog/2020-downgrade-debian
>
> $ sudo cat /etc/apt/sources*d/snapshot.list
> deb [check-valid-until=no] 
> https://snapshot.debian.org/archive/debian/202220526T155509Z/ bullseye 
> main contrib non-free
> $
>
> $  sudo cat /etc/apt/pref*d/snapshot.pref
> Package: *cups*
> Pin: origin snapshot.debian.org
> Pin-Priority: 1001
> $
>
> but...
>
> $ sudo apt update
> 
> Err:7 https://snapshot.debian.org/archive/debian/202220526T155509Z 
> bullseye Release
>   404  Not Found [IP: 185.17.185.185 443]
> 

Sorry, please ignore - 404 because too many 2s in 20222.
Working now.
G

>
> AFAICS from examples/instructions at snapshot.debian.org my 
> snapshot.list file is correct - it looks to me like something has 
> moved/is offline at the server end.  Pinging snapshot.debian.org 
> doesn't seem to be helpful as the IP which is not found changes 
> depending on the archive requested - but snapshot.debian.org itself 
> replies to pings.
>
> Is anyone involved with snapshot.debian.org?  ...or aware of issues at 
> the moment?
>
> Thanks,
> Gareth



snapshot.debian.org

2022-06-06 Thread Gareth Evans
Hello,

I have a strange printing problem which can be replicated on two identical 
printers on two different networks, when printing to wireless driverless IPP 
with Brother MFC-L2740DW printers from Bullseye, whether the printer is 
auto-detected or manually added via ocalhost:631 or system-config-printer.  

The printers light up and look like business, print queue monitors report jobs 
completed, but nothing actually prints.

There are some errors in /var/log/cups/error_log but I won't go into that at 
the moment because I'm trying to downgrade cups and this is another problem.

I think this problem has occurred since a cups update on 2022-05-27, so having 
purged it completely and removed /etc/cups and reinstalled it (along with much 
else due to dependency issues of libcups2) I am now trying to downgrade cups to 
see if that makes a difference.

I have followed the instructions at:

https://vincent.bernat.ch/en/blog/2020-downgrade-debian

$ sudo cat /etc/apt/sources*d/snapshot.list
deb [check-valid-until=no] 
https://snapshot.debian.org/archive/debian/202220526T155509Z/ bullseye main 
contrib non-free
$

$  sudo cat /etc/apt/pref*d/snapshot.pref
Package: *cups*
Pin: origin snapshot.debian.org
Pin-Priority: 1001
$

but...

$ sudo apt update

Err:7 https://snapshot.debian.org/archive/debian/202220526T155509Z bullseye 
Release
  404  Not Found [IP: 185.17.185.185 443]


AFAICS from examples/instructions at snapshot.debian.org my snapshot.list file 
is correct - it looks to me like something has moved/is offline at the server 
end.  Pinging snapshot.debian.org doesn't seem to be helpful as the IP which is 
not found changes depending on the archive requested - but snapshot.debian.org 
itself replies to pings.

Is anyone involved with snapshot.debian.org?  ...or aware of issues at the 
moment?

Thanks,
Gareth



Re: CUPS - how to match autodetected printers to physical ones

2022-04-11 Thread Gareth Evans
On Mon 11 Apr 2022, at 19:23, Brian  wrote:
> On Mon 11 Apr 2022 at 13:55:03 -0400, Greg Wooledge wrote:
>
>> On Mon, Apr 11, 2022 at 06:47:59PM +0100, Brian wrote:
>> > BTW. I am interested in how using /usr/lib/cups/backend/snmp went.
>> > Its drawback is that not all printers provide an snmp service.
>> 
>> wooledg:~$ /usr/lib/cups/backend/snmp
>> network socket://10.76.172.120 "HP LaserJet 4250" "hp LaserJet 4250" 
>> "MFG:Hewlett-Packard;CMD:PJL,MLC,PCLXL,PCL,PJL,POSTSCRIPT;1284.4DL:4d,4e,1;MDL:hp
>>  LaserJet 4250;CLS:PRINTER;DES:Hewlett-Packard LaserJet 4250;" "W01-0224"
>> network socket://10.76.172.88 "HP LaserJet 4100 Series" "HP LaserJet 4100 
>> Series" "MFG:Hewlett-Packard;CMD:PJL,MLC,PCL,POSTSCRIPT,PCLXL,PJL;MDL:HP 
>> LaserJet 4100 Series ;CLS:PRINTER;DES:Hewlett-Packard LaserJet 4100 Series;" 
>> ""
>> network socket://10.76.173.60:9100 "HP LaserJet P3010 Series" "HP LaserJet 
>> P3010 Series" 
>> "MFG:Hewlett-Packard;CMD:PJL,BIDI-ECP,PJL,POSTSCRIPT,PDF,PCLXL,PCL;MDL:HP 
>> LaserJet P3010 Series;CLS:PRINTER;DES:Hewlett-Packard LaserJet P3010 
>> Series;" ""
>> 
>> Looks like that doesn't contain anything for the Canon printers.
>
> Although used by other vendors, a socket://... URI is really an HP
> thing, used by JetDirect appliances, so not surprising. Anyway, this
> very useful info of yours would prompt me to discard advising the use
> of snmp to match IP address with printer model. We are back to
> avahi-browse.
>
> I appreciate you print to that printer infrequently but would suggest a
> manually set up queue may suit you.
>
> Execute
>
>   driverless
>
> to get its URI. (I am sure you can sort out which one it is).
>
> Then
>
>   lpadmin -p SENSIBLE_PRINTER_NAME -L MYOFFICE -v URI -E -m everywhere
>
> -- 
> Brian.


I've been searching for documentation on CUPS "implicitclass" but can't find 
much.

I did find this:

'CUPS can automatically merge multiple identical network printers into 
"implicit classes". This allows clients to send jobs to the implicit class and 
have them print on the first available printer or server.' [though the doc 
predates CUPS driverless printing by some margin]
https://www.cups.org/test/testfile.pdf (p4)

The above is similar (though possibly quite different) to
https://opensource.apple.com/source/cups/cups-87/doc/sam.shtml#PRINTER_CLASSES
(2nd para under 'The Basics')

Assuming implicitclass is the mechanism of first resort in auto-detection (my 
own setup suggests so), does anyone know if this means that, with multiple 
devices of the same type, there's no guarantee from which device printing from 
the same queue will emerge, or are implicit classes resulting from 
auto-detection implemented as implicit classes of one?

Thanks,
Gareth



Re: Libreoffice: printing "dirties" the file being printed

2022-04-07 Thread Gareth Evans
On Thu  7 Apr 2022, at 09:58, Jonathan Dowland  wrote:
> On Sat, Apr 02, 2022 at 07:08:11PM +0100, Brad Rogers wrote:
>>Tools menu/Options - General; 'Printing sets "document modified" status'
>

> Does anyone have any insight into why this is an option? More
> specifically, what reason would anyone want to have their document
> marked as modified because they printed it?

I wondered about that too and looked into it.  I now can't find the references 
I found, either in my browser history or by re-searching, but iirc, 
Apple[-related] and LibreOffice forum posts suggested it's to do with:

LO:  MS Word does it, so LO does it / because fields in the document may be 
automatically updated prior to printing

Apple: Pages documents include a "last printed" property which gets updated 
when the doc is printed - which suggests there's no option in that case.

Not sure of the accuracy of either report...

Best wishes,
Gareth

>
> -- 
> Please do not CC me for listmail.
>
> Jonathan Dowland
> ✎  j...@debian.org
>  https://jmtd.net



Re: QEMU/KVM doesn't open new window - Access only via vnc viewer

2022-03-31 Thread Gareth Evans

> On 31 Mar 2022, at 09:44, Dieter Rohlfing  wrote:
> 
> Hi,
> 
> I'm just about to install Debian11/Bullseye on a host. There are several
> VMs running under QEMU/KVM to set up.
> 
> With Debian9/Stretch I created a new VM via command line:
> 
> /usr/bin/kvm -drive
> file=/qemu/win-70/win-70.jessie.raw,if=virtio,media=disk,cache=none,format=raw
> -name Win-70 -vga std -m 3072 -enable-kvm -rtc base=localtime -boot order=c
> 
> As a result QEMU/KVM opened a new window with the output of the VM.
> 
> With Debian11/Bullseye QEMU/KVM doesn't open a new window, but a message
> appears, telling me to access the output via a vnc viewer. With the vnc
> viewer I can see this output: the VM started correctly.
> 
> How can I get back the output of the VM in a window (like in Debian9)?
> 
> My researches in the internet delivered no results. I always found
> statements like "open a window with the option '-vga std'". Is this no
> more valid for Debian11?
> 
> Dieter
> 

A different invocation method, but does this help, or give a clue to something 
equivalent?

https://lists.debian.org/debian-user/2021/09/msg00691.html

Re: Resize2fs Questions

2022-01-31 Thread Gareth Evans

> On 31 Jan 2022, at 23:36, Andy Smith  wrote:
> Hello,
> 
> On Mon, Jan 31, 2022 at 05:57:45PM +, Gareth Evans wrote:
>>> On 31 Jan 2022, at 17:37, Andy Smith  wrote:
>> Hi Andy, I appreciate the data doesn't go anywhere, but...
>> 
>>>> then I delete P2 and then add a
>>>> new partition which defaults to 2.
>> 
>> doesn't that at least result in the appearance of deletion (an empty 
>> partition) if done after the resizing?
> 
> A partition table is just basically a list of start and end
> positions of partitions.
> 
> When you "delete a partition" all you've done is removed the entry
> in the table, but the data that belongs to the partition you just
> deleted is still on the disk in the place where it always was.
> 
> If you then put back a partition the same as it was before (or
> bigger), it will then show up as a valid partition again.
> 
> In the case of a grow, you then tell your FS or whatever to use the
> empty space that's now at the end.
> 
> In the case of a shrink, you already told your FS (or whatever) to
> create a gap between the end of the FS and the end of the partition,
> so after deleting that partition you can add a "new" partition that
> has an end position that matches the end of the shrunken FS.
> 
> If this does not make it clear that "deleting a partition" in fdisk
> or parted or whatever is a perfectly normal thing to do that doesn't
> in itself trash your data, I don't know how better to explain it and
> you will have to elaborate as to where the confusion lies. I don't
> know what "the appearance of deletion" means to you in this context
> or why you think it harms any data that is on a disk.

Hi Andy,

I'm afraid I replied before I'd thought through what I had in mind, which was, 
wrongly, that deleting a partition unlinks the files it contains.

"Appearance of deletion" was a poor choice of words.  I meant that unlinked 
files could be recovered (if not first overwritten), although deletion is 
indeed the appropriate term.

Thinking of testdisk/photorec reminded me that I was thinking (and writing) 
wrongly in the first place.

Thanks anyway for your explanation.

Gareth
 
> 
> Cheers,
> Andy
> 
> -- 
> https://bitfolk.com/ -- No-nonsense VPS hosting
> 



Re: Resize2fs Questions

2022-01-31 Thread Gareth Evans



> On 31 Jan 2022, at 18:03, Gareth Evans  wrote:
> 
> 
> 
>> On 31 Jan 2022, at 17:58, Gareth Evans  wrote:
>> 
>> 
>> 
>>>> On 31 Jan 2022, at 17:37, Andy Smith  wrote:
>>> 
>>> Hello,
>>> 
>>> On Mon, Jan 31, 2022 at 05:27:56PM +, Gareth Evans wrote:
>>>>>>> On 31 Jan 2022, at 14:41, Martin McCormick  
>>>>>>> wrote:
>>>>>> 
>>>>>> #I should be telling resize2fs to squeeze everything in to a 7GB
>>>>>> #partition.
>>>>>> sudo resize2fs /dev/loop0p2 +7G
>>>>>> [...]
>>>>>> then I delete P2 and then add a
>>>>>> new partition which defaults to 2.
>>>> 
>>>> This seems to replace the partition containing the filesystem you've just 
>>>> resized with an empty one - doesn't it?
>>> 
>>> When you change a partition table it doesn't do anything to the
>>> data on the disk, only the partition table. Every partition resizing
>>> operation that only has to move the end position essentially does it
>>> this way.
>>> 
>>> (If you have to move the start then the data has to be moved first)
>>> 
>>> If you were using parted then you might type:
>>> 
>>> resizepart 2 7g
>>> 
>>> which looks less scary, but does exactly the same thing.
>>> 
>>> Cheers,
>>> Andy
>>> 
>>> -- 
>>> https://bitfolk.com/ -- No-nonsense VPS hosting
>>> 
>> 
>> Hi Andy, I appreciate the data doesn't go anywhere, but...
>> 
>>>> then I delete P2 and then add a
>>>> new partition which defaults to 2.
>> 
>> doesn't that at least result in the appearance of deletion (an empty 
>> partition) if done after the resizing?
> 
> Do you mean creating a new partition 'around' the data makes it accessible 
> again?  That would make sense re eg what testdisk seems to do...

Sorry - wasn't thinking!


Re: Resize2fs Questions

2022-01-31 Thread Gareth Evans



> On 31 Jan 2022, at 17:58, Gareth Evans  wrote:
> 
> 
> 
>> On 31 Jan 2022, at 17:37, Andy Smith  wrote:
>> 
>> Hello,
>> 
>> On Mon, Jan 31, 2022 at 05:27:56PM +, Gareth Evans wrote:
>>>>>> On 31 Jan 2022, at 14:41, Martin McCormick  
>>>>>> wrote:
>>>>> 
>>>>> #I should be telling resize2fs to squeeze everything in to a 7GB
>>>>> #partition.
>>>>> sudo resize2fs /dev/loop0p2 +7G
>>>>> [...]
>>>>> then I delete P2 and then add a
>>>>> new partition which defaults to 2.
>>> 
>>> This seems to replace the partition containing the filesystem you've just 
>>> resized with an empty one - doesn't it?
>> 
>> When you change a partition table it doesn't do anything to the
>> data on the disk, only the partition table. Every partition resizing
>> operation that only has to move the end position essentially does it
>> this way.
>> 
>> (If you have to move the start then the data has to be moved first)
>> 
>> If you were using parted then you might type:
>> 
>> resizepart 2 7g
>> 
>> which looks less scary, but does exactly the same thing.
>> 
>> Cheers,
>> Andy
>> 
>> -- 
>> https://bitfolk.com/ -- No-nonsense VPS hosting
>> 
> 
> Hi Andy, I appreciate the data doesn't go anywhere, but...
> 
>>> then I delete P2 and then add a
>>> new partition which defaults to 2.
> 
> doesn't that at least result in the appearance of deletion (an empty 
> partition) if done after the resizing?

Do you mean creating a new partition 'around' the data makes it accessible 
again?  That would make sense re eg what testdisk seems to do...


Re: Resize2fs Questions

2022-01-31 Thread Gareth Evans



> On 31 Jan 2022, at 17:37, Andy Smith  wrote:
> 
> Hello,
> 
> On Mon, Jan 31, 2022 at 05:27:56PM +, Gareth Evans wrote:
>>>> On 31 Jan 2022, at 14:41, Martin McCormick  wrote:
>>> 
>>> #I should be telling resize2fs to squeeze everything in to a 7GB
>>> #partition.
>>>  sudo resize2fs /dev/loop0p2 +7G
>>> [...]
>>> then I delete P2 and then add a
>>> new partition which defaults to 2.
>> 
>> This seems to replace the partition containing the filesystem you've just 
>> resized with an empty one - doesn't it?
> 
> When you change a partition table it doesn't do anything to the
> data on the disk, only the partition table. Every partition resizing
> operation that only has to move the end position essentially does it
> this way.
> 
> (If you have to move the start then the data has to be moved first)
> 
> If you were using parted then you might type:
> 
> resizepart 2 7g
> 
> which looks less scary, but does exactly the same thing.
> 
> Cheers,
> Andy
> 
> -- 
> https://bitfolk.com/ -- No-nonsense VPS hosting
> 

Hi Andy, I appreciate the data doesn't go anywhere, but...

>> then I delete P2 and then add a
>> new partition which defaults to 2.

doesn't that at least result in the appearance of deletion (an empty partition) 
if done after the resizing?


Re: Resize2fs Questions

2022-01-31 Thread Gareth Evans



> On 31 Jan 2022, at 14:41, Martin McCormick  wrote:
> 
> #I should be telling resize2fs to squeeze everything in to a 7GB
> #partition.
>   sudo resize2fs /dev/loop0p2 +7G
> [...]
> then I delete P2 and then add a
> new partition which defaults to 2.

This seems to replace the partition containing the filesystem you've just 
resized with an empty one - doesn't it?





Re: SD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-29 Thread Gareth Evans



> On 28 Jan 2022, at 20:40, David Wright  wrote:
> 
> On Fri 28 Jan 2022 at 18:22:37 (+), Gareth Evans wrote:
>>> On 28 Jan 2022, at 18:16, Gareth Evans  wrote:
>>>>> On 28 Jan 2022, at 16:52, David Wright  wrote:
>>>>> On Fri 28 Jan 2022 at 07:30:25 (-0600), Martin McCormick wrote:
>>>>> David Wright  writes:
>>>>>> I've not heard of that problem. You were prevented from zeroing the
>>>>>> entire device, which would have wiped the partition table anyway.
>>>>>> 
>>>>>> What I would want to check is that the OS isn't doing something
>>>>>> stupid, like trying to automount it, failing, and consequently
>>>>>> setting the device readonly. By OS, I really mean DEs, or
>>>>>> automounters in general.
>>>>>> 
>>>>>> You could also try zeroing it in another machine, ± any adapters
>>>>>> required. (Bear in mind that adapters do have readonly sliders.)
>>>>> 
>>>>>  I suspect this is the crux of the problem.  the adapter I
>>>>> connected is a card reader.  You put the SSD in a little plastic
>>>>> jacket that holds the SSD in such a way that the card reader can
>>>>> access the edge connector but the holder jacket has no electronics.
>>>>> There is a small notch in the plastic of the jacket on the left
>>>>> edge and the right front corner of the plastic carrier has a
>>>>> diagonal cut to prevent someone from putting it in upsidedown.
>>>> 
>>>> Yes, most connectors are keyed in some way, though some are quite
>>>> fragile, like the plastic post in PS/2 keyboards and mice.
>>>> 
>>>>>  Since I posted, there is good news but I still wonder if
>>>>> I am not going bonkers because after unplugging the Sony card reader
>>>>> and plugging it back in, I now am getting device /dev/sdg instead
>>>>> of /dev/sdh.  I was also able to do the following:
>>>>> 
>>>>>  #sudo fdisk /dev/sdg
>>>>> 
>>>>> which gave me the fdisk utility as before so I did what crazy
>>>>> people do which is to do the same thing as before, hoping for
>>>>> different results.
>>>> 
>>>> That's why people are encourages to use [PART]UUIDs and [PART]LABELs
>>>> instead of dynamically chosen kernel names.
>>>> 
>>>> Pulling the card could reset a gate, or it could clean the contacts.
>>>> Who knows. I would tend to mark down the card as suspect, and not
>>>> use it in mission-critical ways.
>>>> 
>>>>>  By Joe, I got them.
>>>>> 
>>>>> I typed d to delete a partition and it put partition 2 up as the
>>>>> default candidate as before so I selected it and then typed d
>>>>> again which told me that only partition 1 was left so it was
>>>>> deleted.
>>>>> 
>>>>>  I had gotten this far before so wasn't too excited but type
>>>>> w and this time got the message stating that the partition table
>>>>> had been rewritten and fdisk then exited.
>>>>> 
>>>>>  Now, doing sudo fdisk -l /dev/sdg yields
>>>>> 
>>>>> 1wb5agz martin tmp $ sudo fdisk -l /dev/sdg
>>>>> Disk /dev/sdg: 28.8 GiB, 30908350464 bytes, 60367872 sectors
>>>>> Disk model: USB   HS-SD Card
>>>>> Units: sectors of 1 * 512 = 512 bytes
>>>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>>>> Disklabel type: dos
>>>>> Disk identifier: 0x680226ff
>>>>> 
>>>>>  The partitions are gone.  My latest screwball theory is
>>>>> that the Sony card reader went in to some sort of protective mode
>>>>> after the dd operation overwrote the device.  My unplugging the
>>>>> reader and plugging it back in reran the driver which reset the
>>>>> protective mode back to normal which may be why it all worked
>>>>> right this time.
>>>> 
>>>> Who knows.
>>>> 
>>>>>  One last question:  Since the image will still be too
>>>>> large as it is, can tunefs be run on it or a copy of it to shrink
>>>>> about 4 gb of user space?  The good system I copied the image
>>>>> from only had about 12%  o

Re: SD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-28 Thread Gareth Evans



> On 28 Jan 2022, at 18:16, Gareth Evans  wrote:
> 
> 
> 
>>> On 28 Jan 2022, at 16:52, David Wright  wrote:
>>> 
>>> On Fri 28 Jan 2022 at 07:30:25 (-0600), Martin McCormick wrote:
>>> David Wright  writes:
>>>> I've not heard of that problem. You were prevented from zeroing the
>>>> entire device, which would have wiped the partition table anyway.
>>>> 
>>>> What I would want to check is that the OS isn't doing something
>>>> stupid, like trying to automount it, failing, and consequently
>>>> setting the device readonly. By OS, I really mean DEs, or
>>>> automounters in general.
>>>> 
>>>> You could also try zeroing it in another machine, ± any adapters
>>>> required. (Bear in mind that adapters do have readonly sliders.)
>>> 
>>>   I suspect this is the crux of the problem.  the adapter I
>>> connected is a card reader.  You put the SSD in a little plastic
>>> jacket that holds the SSD in such a way that the card reader can
>>> access the edge connector but the holder jacket has no electronics.
>>> There is a small notch in the plastic of the jacket on the left
>>> edge and the right front corner of the plastic carrier has a
>>> diagonal cut to prevent someone from putting it in upsidedown.
>> 
>> Yes, most connectors are keyed in some way, though some are quite
>> fragile, like the plastic post in PS/2 keyboards and mice.
>> 
>>>   Since I posted, there is good news but I still wonder if
>>> I am not going bonkers because after unplugging the Sony card reader
>>> and plugging it back in, I now am getting device /dev/sdg instead
>>> of /dev/sdh.  I was also able to do the following:
>>> 
>>>   #sudo fdisk /dev/sdg
>>> 
>>> which gave me the fdisk utility as before so I did what crazy
>>> people do which is to do the same thing as before, hoping for
>>> different results.
>> 
>> That's why people are encourages to use [PART]UUIDs and [PART]LABELs
>> instead of dynamically chosen kernel names.
>> 
>> Pulling the card could reset a gate, or it could clean the contacts.
>> Who knows. I would tend to mark down the card as suspect, and not
>> use it in mission-critical ways.
>> 
>>>   By Joe, I got them.
>>> 
>>> I typed d to delete a partition and it put partition 2 up as the
>>> default candidate as before so I selected it and then typed d
>>> again which told me that only partition 1 was left so it was
>>> deleted.
>>> 
>>>   I had gotten this far before so wasn't too excited but type
>>> w and this time got the message stating that the partition table
>>> had been rewritten and fdisk then exited.
>>> 
>>>   Now, doing sudo fdisk -l /dev/sdg yields
>>> 
>>> 1wb5agz martin tmp $ sudo fdisk -l /dev/sdg
>>> Disk /dev/sdg: 28.8 GiB, 30908350464 bytes, 60367872 sectors
>>> Disk model: USB   HS-SD Card
>>> Units: sectors of 1 * 512 = 512 bytes
>>> Sector size (logical/physical): 512 bytes / 512 bytes
>>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Disklabel type: dos
>>> Disk identifier: 0x680226ff
>>> 
>>>   The partitions are gone.  My latest screwball theory is
>>> that the Sony card reader went in to some sort of protective mode
>>> after the dd operation overwrote the device.  My unplugging the
>>> reader and plugging it back in reran the driver which reset the
>>> protective mode back to normal which may be why it all worked
>>> right this time.
>> 
>> Who knows.
>> 
>>>   One last question:  Since the image will still be too
>>> large as it is, can tunefs be run on it or a copy of it to shrink
>>> about 4 gb of user space?  The good system I copied the image
>>> from only had about 12%  of the partition used so I should be
>>> able to transplant it to the smaller disk if tunefs can do that
>>> and still leave a bootable device.
>> 
>> I don't know what this image contains, but I'm guessing it's the
>> rootfs for the Pi. My question then is how full was it. I assume
>> that you don't run it to 100% usage, and even then, there are
>> files you can do without, like rotated logfiles, caches etc.
>> 
>> Two different methods:
>> 
>> One course of action would be to copy the old to the new card, just
>> as you have done, with dd running out of space. That deals with
>> three things: the MBR, the partition t

Re: SD Memory Card (was The Raspberry Pi that Took a Day Off.)

2022-01-28 Thread Gareth Evans



> On 28 Jan 2022, at 16:52, David Wright  wrote:
> 
> On Fri 28 Jan 2022 at 07:30:25 (-0600), Martin McCormick wrote:
>> David Wright  writes:
>>> I've not heard of that problem. You were prevented from zeroing the
>>> entire device, which would have wiped the partition table anyway.
>>> 
>>> What I would want to check is that the OS isn't doing something
>>> stupid, like trying to automount it, failing, and consequently
>>> setting the device readonly. By OS, I really mean DEs, or
>>> automounters in general.
>>> 
>>> You could also try zeroing it in another machine, ± any adapters
>>> required. (Bear in mind that adapters do have readonly sliders.)
>> 
>>I suspect this is the crux of the problem.  the adapter I
>> connected is a card reader.  You put the SSD in a little plastic
>> jacket that holds the SSD in such a way that the card reader can
>> access the edge connector but the holder jacket has no electronics.
>> There is a small notch in the plastic of the jacket on the left
>> edge and the right front corner of the plastic carrier has a
>> diagonal cut to prevent someone from putting it in upsidedown.
> 
> Yes, most connectors are keyed in some way, though some are quite
> fragile, like the plastic post in PS/2 keyboards and mice.
> 
>>Since I posted, there is good news but I still wonder if
>> I am not going bonkers because after unplugging the Sony card reader
>> and plugging it back in, I now am getting device /dev/sdg instead
>> of /dev/sdh.  I was also able to do the following:
>> 
>>#sudo fdisk /dev/sdg
>> 
>> which gave me the fdisk utility as before so I did what crazy
>> people do which is to do the same thing as before, hoping for
>> different results.
> 
> That's why people are encourages to use [PART]UUIDs and [PART]LABELs
> instead of dynamically chosen kernel names.
> 
> Pulling the card could reset a gate, or it could clean the contacts.
> Who knows. I would tend to mark down the card as suspect, and not
> use it in mission-critical ways.
> 
>>By Joe, I got them.
>> 
>> I typed d to delete a partition and it put partition 2 up as the
>> default candidate as before so I selected it and then typed d
>> again which told me that only partition 1 was left so it was
>> deleted.
>> 
>>I had gotten this far before so wasn't too excited but type
>> w and this time got the message stating that the partition table
>> had been rewritten and fdisk then exited.
>> 
>>Now, doing sudo fdisk -l /dev/sdg yields
>> 
>> 1wb5agz martin tmp $ sudo fdisk -l /dev/sdg
>> Disk /dev/sdg: 28.8 GiB, 30908350464 bytes, 60367872 sectors
>> Disk model: USB   HS-SD Card
>> Units: sectors of 1 * 512 = 512 bytes
>> Sector size (logical/physical): 512 bytes / 512 bytes
>> I/O size (minimum/optimal): 512 bytes / 512 bytes
>> Disklabel type: dos
>> Disk identifier: 0x680226ff
>> 
>>The partitions are gone.  My latest screwball theory is
>> that the Sony card reader went in to some sort of protective mode
>> after the dd operation overwrote the device.  My unplugging the
>> reader and plugging it back in reran the driver which reset the
>> protective mode back to normal which may be why it all worked
>> right this time.
> 
> Who knows.
> 
>>One last question:  Since the image will still be too
>> large as it is, can tunefs be run on it or a copy of it to shrink
>> about 4 gb of user space?  The good system I copied the image
>> from only had about 12%  of the partition used so I should be
>> able to transplant it to the smaller disk if tunefs can do that
>> and still leave a bootable device.
> 
> I don't know what this image contains, but I'm guessing it's the
> rootfs for the Pi. My question then is how full was it. I assume
> that you don't run it to 100% usage, and even then, there are
> files you can do without, like rotated logfiles, caches etc.
> 
> Two different methods:
> 
> One course of action would be to copy the old to the new card, just
> as you have done, with dd running out of space. That deals with
> three things: the MBR, the partition table, and the first partition
> (whatever that it).
> 
> Next, I would fdisk it, delete partition 2 and recreate it so that
> its size matches the partition table entry. Recreate a filesystem
> with mkfs.
> 
> Next, I copy the entire contents of the second partition from the
> old card to the new, using   copy -a   or   rsync …   or whatever
> you're comfortable with. This assumes, I think, that you don't
> have weird things like sparse files and so on.
> 
> If you run out of space, then you may need to prune your target
> to make sure the essential files (like /etc, /usr) are copied,
> and be more selective with other trees, like parts of /var, /home.
> 

> A second course of action would be to copy the entire card to
> file on a disk, loop mount it, and reduce the contents of the
> second partition so that you know there'll be room for it on the
> new card. Then dd from the image ...

I've been anticipating this stage and looking for 

Re: The Raspberry Pi that Took a Day Off.

2022-01-26 Thread Gareth Evans



> On 25 Jan 2022, at 14:17, Martin McCormick  wrote:
> 
> This Pi is running Debian Stretch.  I believe that's what version
> 9 is called.  I have it capturing audio from a radio receiver and
> it's been doing that for several years now and it was doing that
> yesterday morning.  Later in the day, I downloaded more audio
> and, after a long pause, I got the message from ssh that the
> Raspberry Pi wasn't there any longer so I retrieved the Pi from
> the room where it was and brought it to my Debian desktop system
> to work on it.
> 
>I could login to the Pi which seemed to be up and running
> but the short story is that it couldn't talk to any address but
> our router.I couldn't even ping it's interface from the Pi,
> itself.
> 
>If I was on the Raspberry Pi's console, everything looked
> normal as long as one wasn't using the TCP/IP interface.  You
> could even do a ip addr or an ipconfig -a command and it would
> show that it had gotten the correct address from our dhcp server
> which is in the router.  It would successfully ping the router
> but no other addresses, not even the address it uses on our
> network.
> 
>I finally quit messing with it and went to bed but fired
> it up again today, January 25 and low and behold, it just came
> right up and is now back doing what it has been doing.
> 
>Is it possible that it got a corrupted lease for dhcp
> from the router?  Dhcp leases on our Netgear router are issued
> for not quite 24 hours so it may have gotten a bad lease, kept
> renewing it for the time it was powered up and then it got a new
> version of that lease today and all is well.
> 
>It's the same IP address because I have put it in the
> router as a static IP address.
> 
>The other thing that is weird is that the Raspberry Pi in
> question has both a wired Ethernet and a WiFi interface and both
> were misbehaving identically.
> 
>Normally, the wired port is not used and the dhcp lease
> renewal process happens over WiFi.
> 
>The results of ip addr always showed a correct subnet
> mask and the only rules in iptables are the 2 default rules.  In
> other words, all looked normal except that it didn't work.
> 
>While I had it on the work bench, so to speak, I ran fsck
> -fy on the SSD card since it has been a couple of years since I
> last did that and there was not a single squawk about anything.
> 
>Thanks for any ideas about how things got wrong and then
> magically fixed themselves.
> 
>When I turned it off last night, I gave it the halt -p
> command.  The power supply has no switch so I unplugged it from
> power so it started fresh about 8 hours later.
> 
> Martin WB5AGZ
> 

Hi Martin,

Are your router logs accessible?

Is there anything of potential relevance in those or the pi logs around the 
time it stopped/restarted 'connecting' (or even in the interim)?

Perhaps

cat /var/log/syslog{.n} | grep -i dhcp

might be a start, where {.n} indicates an optional eg. .1, .2 etc if syslog 
itself no longer contains logs from the relevant time.

The router may have a web interface that includes a section for errors if you 
can't get into it with ssh.  Not sure how helpful that might be even if one 
exists, but  maybe worth a look.

Gareth


Re: Bullseye - who and users return nothing

2022-01-25 Thread Gareth Evans
On Tue 25 Jan 2022, at 13:11, Greg Wooledge  wrote:
> On Tue, Jan 25, 2022 at 01:06:42PM +0000, Gareth Evans wrote:
>> Just realised I gave contradicting info earlier - I said both that I 
>> upgraded from Buster (which is literally true) and that
>> 
>> "But for root on ZFS per 
>> 
>> https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html
>>  (adjusted for Bullseye)  <<<<<<
>> 
>> ..."
>> 
>> which isn't, because Bullseye arrived via dist-upgrade, rather than a fresh 
>> installation.
>> 
>> My mistake may have prompted Andrei's suggestion which I then explained away 
>> partly in relation to having upgraded - sorry.
>
> I don't know anything about ZFS.  That said, it's *conceivable* that
> your / ownership has been broken this entire time, and you never noticed
> until now.  Either because you never ran "who", or because 

> systemd in
> buster didn't check the parent directory ownerships, but the one in
> bullseye does.

That's interesting.

FWIW, trying to get a timeframe...

My email re bullseye upgrade hiccups back in August

https://lists.debian.org/debian-user/2021/08/msg00979.html

indicates that I upgraded to Bullseye on 17th Aug 2021.  There were at most a 
few days of experimenting with restoring Buster snapshots and re-upgrading, but 
that was certainly done with by October, when QEMU logs show VM usage.   

I've never had to 

modprobe tun 

to start a VM before today, and Bash history shows who usage on 22/12/21.  
Given this info and that the / ownership fix fixed both problems, I think that 
suggests a recent(ish) event as the cause.

>
> Food for thought.
>
> (It's not clear to me how setting up ZFS on / would involve your
> unprivileged username, though.  Sounds more like a "boot from rescue
> media and do everything in a root shell" sort of job.  

It is, but...

"5. Create a user account:

username=YOUR_USERNAME
zfs create rpool/home/$username
adduser $username
cp -a /etc/skel/. /home/$username
chown -R $username:$username /home/$username
..."

https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html

:)


> So I'm more
> inclined to think the damage was done by some sort of backup/recovery
> gone wrong, as previously speculated.)



Re: Bullseye - who and users return nothing

2022-01-25 Thread Gareth Evans
On Tue 25 Jan 2022, at 01:31, Gareth Evans  wrote:
> On Mon 24 Jan 2022, at 12:45, Greg Wooledge  wrote:
>> On Mon, Jan 24, 2022 at 09:51:05AM +0000, Gareth Evans wrote:
>>> I've just noticed that: 
>>> 
>>> $ who
>>> 
>>> and
>>> 
>>> $ users
>>> 
>>> both return nothing, with or without sudo.
>>
>>> Can anyone replicate this or suggest what may have happened?  I'm fairly 
>>> sure I've used who since upgrading from Buster.
>>
>> Definitely can't replicate.  "who" gives me 28 lines of output for all
>> of my terminals.
>>
>> As far as suggesting a cause -- we'd need more info.  
>
>> Which init system
>> are you using?  
>
> systemd.  But for root on ZFS per 
>
> https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html
>  
> (adjusted for Bullseye) 
>
> it's standard Debian-mate amd64
>
>> How are you logging in?  
>
> Logging into Mate with lightdm
>
>> Are you using any terminal
>> emulators, and if so, which one(s)?
>
> mate-terminal
>
>>
>> Is the /var file system full?  (Or any mount underneath /var if you have
>> such.)
>
> $ sudo zfs list
> NAMEUSED  AVAIL REFER  MOUNTPOINT
> bpool   172M   660M   96K  /boot
> bpool/BOOT  170M   660M   96K  none
> bpool/BOOT/debian   170M   660M  170M  /boot
> rpool  67.6G  45.7G  192K  /
> rpool/ROOT 11.2G  45.7G  192K  none
> rpool/ROOT/debian  11.2G  45.7G 11.2G  /
> rpool/data  200K  45.7G  200K  /data
> rpool/home 15.0G  45.7G 9.27G  /home
> rpool/large3.06G  45.7G 3.06G  /large
> rpool/backup1  4.94G  45.7G 1.03G  /backup1
> rpool/backup2  15.7G  45.7G 3.94G  /backup2
> rpool/swap 8.50G  54.2G  108K  -
> rpool/var  9.06G  45.7G  412K  /var
> rpool/var/cache 192M  45.7G  192M  /var/cache
> rpool/var/lib  6.29G  45.7G  720K  /var/lib
> rpool/var/lib/docker   19.0M  45.7G 19.0M  /var/lib/docker
> rpool/var/lib/libvirt  5.94G  45.7G 5.94G  /var/lib/libvirt
> rpool/var/lib/mysql 335M  45.7G  246M  /var/lib/mysql
> rpool/var/log   363M  45.7G  363M  /var/log
> rpool/var/spool 103M  45.7G  103M  /var/spool
> rpool/var/tmp   250M  45.7G  250M  /var/tmp
> rpool/var/www  1.89G  45.7G 1.40G  /var/www
>
>
>> Have you done anything unique or unusual to your system that would cause
>> it not to log sessions in /var/run/utmp?
>
> Not afaik
>
>>
>>> $ sudo strace who
>>> 
>>> access("/var/run/utmpx", F_OK)  = -1 ENOENT (No such file or 
>>> directory)
>>> openat(AT_FDCWD, "/var/run/utmp", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such 
>>> file or directory)
>>> access("/var/run/utmpx", F_OK)  = -1 ENOENT (No such file or 
>>> directory)
>>> openat(AT_FDCWD, "/var/run/utmp", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such 
>>> file or directory)
>>> close(1)= 0
>>> close(2)= 0
>>> exit_group(0)   = ?
>>> +++ exited with 0 +++
>>
>> Your /var/run/utmp file is missing.  That's definitely going to cause
>> a problem here.
>>
>> Here's what mine looks like:
>>
>> unicorn:~$ df /var/run
>> Filesystem 1K-blocks  Used Available Use% Mounted on
>> tmpfs1215580  1456   1214124   1% /run
>> unicorn:~$ ls -ld /var/run
>> lrwxrwxrwx 1 root root 4 Jan 11  2018 /var/run -> /run/
>> unicorn:~$ ls -l /var/run/utmp
>> -rw-rw-r-- 1 root utmp 12288 Jan 20 15:08 /var/run/utmp
>>
>> I don't know what happened to yours, but since /run is an in-memory
>> file system, all of the stuff inside it (including the utmp file) has
>> to be created at boot time, or at login time at the very latest.
>>
>
>> You could try creating the file with the correct user/group/perms and
>> see if that helps, but that probably won't survive the next reboot.
>
> /var/run$ sudo touch utmp
> /var/run$ sudo chown root:utmp utmp
> /var/run$ sudo chmod 664 utmp
> /var/run$ ls -l utmp
> -rw-rw-r-- 1 root utmp 0 Jan 25 00:08 utmp
> /var/run$ who
> /var/run$
> [logout, login]
> /var/run$ ls -l /var/run/utmp
> -rw-rw-r-- 1 root utmp 384 Jan 25 00:17 /var/run/utmp
> $ who
> user t

Re: Bullseye - who and users return nothing

2022-01-25 Thread Gareth Evans
On Tue 25 Jan 2022, at 10:47, Andrei POPESCU  wrote:
> On Ma, 25 ian 22, 04:03:17, Gareth Evans wrote:
>> 
>> Googling "Detected unsafe path transition during canonicalization" led me to 
>> 
>> https://bbs.archlinux.org/viewtopic.php?id=260924
>> 
>> where a user sees this error because / is owned by the user rather than root.
>> 
>> Lo and behold
>> 
>> $ stat /
>> 
>> shows this is what has somehow happened.
>> 
>> $ sudo chown root:root /
>> 
>> solves the disappearing /var/run/utmp problem (and fixes who/users) 
>> 
>> There is nothing in bash history to suggest I did this - can/should it 
>> happen any other way?
>

> Occam's Razor would suggest this was done when setting up your / on ZFS.

Hi Andrei,

chown root:root / 

fixed both this issue and my need (today, as discussed in my other email) to 

modprobe tun

to be able to run VMs with virt-manager.

That was a new problem I only noticed today when setting up a VM to find/grep 
relevant strings/filenames that would exist in a new installation.  I use VMs 
more often than who/users but have certainly done both without issue since 
setting up / on ZFS.

But worth bearing in mind :)

Thanks
Gareth


>
>
> Kind regards,
> Andrei
> -- 
> http://wiki.debian.org/FAQsFromDebianUser
>
> Attachments:
> * signature.asc



Re: Bullseye - who and users return nothing

2022-01-24 Thread Gareth Evans
On Tue 25 Jan 2022, at 04:50, David Wright  wrote:
> On Tue 25 Jan 2022 at 04:22:39 (+), Gareth Evans wrote:
>> On Tue 25 Jan 2022, at 04:10, Polyna-Maude Racicot-Summerside 
>>  wrote:
>> > On 2022-01-24 23:03, Gareth Evans wrote:
>> >> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> >> transition / → /var during canonicalization of 
>> >> /var/log/journal/7f684579096949909ba2bfac31e8423e/sy>
>> >> Jan 25 01:46:52 qwerty systemd[1]: Finished Create Volatile Files and 
>> >> Directories.
>> >> 
>> >> Googling "Detected unsafe path transition during canonicalization" led me 
>> >> to 
>> >> 
>> >> https://bbs.archlinux.org/viewtopic.php?id=260924
>> >> 
>> >> where a user sees this error because / is owned by the user rather than 
>> >> root.
>> >> 
>> >> Lo and behold
>> >> 
>> >> $ stat /
>> >> 
>> >> shows this is what has somehow happened.
>> >> 
>> >> $ sudo chown root:root /
>> >> 
>> >> solves the disappearing /var/run/utmp problem (and fixes who/users) 
>> >> 
>> >> There is nothing in bash history to suggest I did this - can/should it 
>> >> happen any other way?
>> 
>> > No one other than you know the whole story behind what happened with
>> > your computer.
>> >
>> > Is it a new clean install
>> > How did you partition the hard drive
>> > etc..
>> 
>> The last clean installation was of Buster and it's since been upgraded to 
>> Bullseye.
>> 
>> An unfinished and accidentally-executed 
>> 
>> sudo chown /[some/file] 
>> 
>> doesn't seem impossible, but the lack of any such thing in bash history 
>> seems curious.  Perhaps a leading space crept in too, which would exclude 
>> the command from the history.
>> 
>> I was just wondering about other ways that could happen, if any.
>
> A frequent way, sometimes narrated in Operator Horror Stories from
> years ago, was untarring an archive. Gnu tar does its best to protect
> you, but can be overridden.
>

> But my Q1 is always "What were the ownerships and permissions before
> you reverted them?" That's often the best clue. 

As of now:

$ ls -ld /
drwxr-xr-x 23 root root 33 Jan 21 14:48 /

The only difference was my username in the owner position.

There is nothing in my [timestamped] bash history at 14:48 on 21 Jan.  Just 
before that time I had used engrampa from the command line. Use of other 
scripts around the time suggests the archive concerned may have been a file in 
/var/www/html - I do sometimes have to change permissions and ownership there, 
so perhaps (cough mumble mumble).

Thanks all.
G






> Eg, from just yesterday:
> https://lists.debian.org/debian-user/2022/01/msg00874.html
> caused by restoring backups from amanda.
>
> Cheers,
> David.



Re: modprobe tun required after reboot for virt-manager

2022-01-24 Thread Gareth Evans
On Tue 25 Jan 2022, at 02:11, Gareth Evans  wrote:
> Further to my disappearing /var/run/utmp query, I also newly can't 
> start VMs with virt-manager without first doing
>
> $ sudo modprobe tun
>
> This has also changed recently, apparently without intervention on my part.
>
> Presumably it has stopped being autoloaded somewhere.
>
> Should tun be in 
>
> /etc/modules-load.d/modules.conf
>
> or is there an on-demand approach which seems to have been corrupted?
>
> Thanks,
> Gareth

Fixed.

https://lists.debian.org/debian-user/2022/01/msg01003.html



Re: Bullseye - who and users return nothing

2022-01-24 Thread Gareth Evans
On Tue 25 Jan 2022, at 04:10, Polyna-Maude Racicot-Summerside 
 wrote:
> On 2022-01-24 23:03, Gareth Evans wrote:
>> On Tue 25 Jan 2022, at 03:28, Greg Wooledge  wrote:
>>> On Tue, Jan 25, 2022 at 03:06:00AM +, Gareth Evans wrote:
>>>> On Tue 25 Jan 2022, at 03:02, Gareth Evans  wrote:
>>>>> On Tue 25 Jan 2022, at 02:54, Greg Wooledge  wrote:
>>>>>> A google search led me to <https://bugs.archlinux.org/task/47749>
>>>>>> which says that the /run/utmp file is supposed to be created by
>>>>>> "tmpfiles", specifically by the instructions in the configuration
>>>>>> file /usr/lib/tmpfiles.d/systemd.conf .
>>>>>>
>>>>>
>>>>>> On my system, /usr/lib/tmpfiles.d/systemd.conf contains this line:
>>>>>>
>>>>>> F! /run/utmp 0664 root utmp -
>>>>>>
>>>>
>>>>>> Does your system have this file, and if so, does it contain that line?
>>>>>
>>>>> Thanks, yes:
>>>>>
>>>>> $ sudo cat /usr/lib/tmpfiles.d/systemd.conf | grep utmp
>>>>> F! /run/utmp 0664 root utmp -
>>>>
>>>> And fwiw (from a comment in the link you provided)
>>>>
>>>> $ sudo journalctl -b _COMM=systemd-tmpfiles
>>>> -- Journal begins at Sat 2021-08-21 14:27:06 BST, ends at Tue 2022-01-25 
>>>> 03:04:>
>>>> -- No entries --
>>>
>>> Next thing to check seems to be:
>>>
>>> systemctl status systemd-tmpfiles-setup.service
>> 
>> Aha...
>> 
>> systemd-tmpfiles-setup.service - Create Volatile Files and Directories
>>  Loaded: loaded (/lib/systemd/system/systemd-tmpfiles-setup.service; 
>> static)
>>  Active: active (exited) since Tue 2022-01-25 01:46:52 GMT; 1h 53min ago
>>Docs: man:tmpfiles.d(5)
>>  man:systemd-tmpfiles(8)
>> Process: 1340 ExecStart=systemd-tmpfiles --create --remove --boot 
>> --exclude-prefix=/dev (code=exited, status=73)
>>Main PID: 1340 (code=exited, status=73)
>> CPU: 20ms
>> 
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of /var/log/journal.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of /var/log/journal.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of 
>> /var/log/journal/7f684579096949909ba2bfac31e8423e.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of 
>> /var/log/journal/7f684579096949909ba2bfac31e8423e.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of 
>> /var/log/journal/7f684579096949909ba2bfac31e8423e.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /run during canonicalization of /run/log/journal.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /run during canonicalization of /run/log/journal.
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of 
>> /var/log/journal/7f684579096949909ba2bfac31e8423e/sy>
>> Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path 
>> transition / → /var during canonicalization of 
>> /var/log/journal/7f684579096949909ba2bfac31e8423e/sy>
>> Jan 25 01:46:52 qwerty systemd[1]: Finished Create Volatile Files and 
>> Directories.
>> 
>> Googling "Detected unsafe path transition during canonicalization" led me to 
>> 
>> https://bbs.archlinux.org/viewtopic.php?id=260924
>> 
>> where a user sees this error because / is owned by the user rather than root.
>> 
>> Lo and behold
>> 
>> $ stat /
>> 
>> shows this is what has somehow happened.
>> 
>> $ sudo chown root:root /
>> 
>> solves the disappearing /var/run/utmp problem (and fixes who/users) 
>> 
>> There is nothing in bash history to suggest I did this - can/should it 
>> happen any other way?

> No one other than you know the whole story behind what happened with
> your computer.
>
> Is it a new clean install
> How did you partition the hard drive
> etc..

Hi,

The last clean installation was of Buster and it's since been upgraded to 
Bullseye.

Re: Bullseye - who and users return nothing

2022-01-24 Thread Gareth Evans
On Tue 25 Jan 2022, at 03:28, Greg Wooledge  wrote:
> On Tue, Jan 25, 2022 at 03:06:00AM +0000, Gareth Evans wrote:
>> On Tue 25 Jan 2022, at 03:02, Gareth Evans  wrote:
>> > On Tue 25 Jan 2022, at 02:54, Greg Wooledge  wrote:
>> >> A google search led me to <https://bugs.archlinux.org/task/47749>
>> >> which says that the /run/utmp file is supposed to be created by
>> >> "tmpfiles", specifically by the instructions in the configuration
>> >> file /usr/lib/tmpfiles.d/systemd.conf .
>> >>
>> >
>> >> On my system, /usr/lib/tmpfiles.d/systemd.conf contains this line:
>> >>
>> >> F! /run/utmp 0664 root utmp -
>> >>
>> 
>> >> Does your system have this file, and if so, does it contain that line?
>> >
>> > Thanks, yes:
>> >
>> > $ sudo cat /usr/lib/tmpfiles.d/systemd.conf | grep utmp
>> > F! /run/utmp 0664 root utmp -
>> 
>> And fwiw (from a comment in the link you provided)
>> 
>> $ sudo journalctl -b _COMM=systemd-tmpfiles
>> -- Journal begins at Sat 2021-08-21 14:27:06 BST, ends at Tue 2022-01-25 
>> 03:04:>
>> -- No entries --
>
> Next thing to check seems to be:
>
> systemctl status systemd-tmpfiles-setup.service

Aha...

systemd-tmpfiles-setup.service - Create Volatile Files and Directories
 Loaded: loaded (/lib/systemd/system/systemd-tmpfiles-setup.service; static)
 Active: active (exited) since Tue 2022-01-25 01:46:52 GMT; 1h 53min ago
   Docs: man:tmpfiles.d(5)
 man:systemd-tmpfiles(8)
Process: 1340 ExecStart=systemd-tmpfiles --create --remove --boot 
--exclude-prefix=/dev (code=exited, status=73)
   Main PID: 1340 (code=exited, status=73)
CPU: 20ms

Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of /var/log/journal.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of /var/log/journal.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of 
/var/log/journal/7f684579096949909ba2bfac31e8423e.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of 
/var/log/journal/7f684579096949909ba2bfac31e8423e.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of 
/var/log/journal/7f684579096949909ba2bfac31e8423e.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /run during canonicalization of /run/log/journal.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /run during canonicalization of /run/log/journal.
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of 
/var/log/journal/7f684579096949909ba2bfac31e8423e/sy>
Jan 25 01:46:52 qwerty systemd-tmpfiles[1340]: Detected unsafe path transition 
/ → /var during canonicalization of 
/var/log/journal/7f684579096949909ba2bfac31e8423e/sy>
Jan 25 01:46:52 qwerty systemd[1]: Finished Create Volatile Files and 
Directories.

Googling "Detected unsafe path transition during canonicalization" led me to 

https://bbs.archlinux.org/viewtopic.php?id=260924

where a user sees this error because / is owned by the user rather than root.

Lo and behold

$ stat /

shows this is what has somehow happened.

$ sudo chown root:root /

solves the disappearing /var/run/utmp problem (and fixes who/users) 

There is nothing in bash history to suggest I did this - can/should it happen 
any other way?

Thanks very much for your help Greg.

Gareth


>
> Make sure it hasn't been disabled or masked, I suppose.  The unit file
> contains this command:
>
> ExecStart=systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev
>
> So, I guess make sure yours has that too.  But hopefully you'll discover
> that it's been disabled or something silly like that, and then you can
> just enable it.



Re: Bullseye - who and users return nothing

2022-01-24 Thread Gareth Evans
On Tue 25 Jan 2022, at 03:02, Gareth Evans  wrote:
> On Tue 25 Jan 2022, at 02:54, Greg Wooledge  wrote:
>> On Tue, Jan 25, 2022 at 01:31:35AM +0000, Gareth Evans wrote:
>>> /var/run$ sudo touch utmp
>>> /var/run$ sudo chown root:utmp utmp
>>> /var/run$ sudo chmod 664 utmp
>>> /var/run$ ls -l utmp
>>> -rw-rw-r-- 1 root utmp 0 Jan 25 00:08 utmp
>>> /var/run$ who
>>> /var/run$
>>> [logout, login]
>>> /var/run$ ls -l /var/run/utmp
>>> -rw-rw-r-- 1 root utmp 384 Jan 25 00:17 /var/run/utmp
>>> $ who
>>> user tty7 2022-01-25 00:17 (:0)
>>> $ sudo reboot
>>> ...
>>> $ ls -l /var/run/utmp
>>> ls: cannot access '/var/run/utmp': No such file or directory
>>
>> A google search led me to <https://bugs.archlinux.org/task/47749>
>> which says that the /run/utmp file is supposed to be created by
>> "tmpfiles", specifically by the instructions in the configuration
>> file /usr/lib/tmpfiles.d/systemd.conf .
>>
>
>> On my system, /usr/lib/tmpfiles.d/systemd.conf contains this line:
>>
>> F! /run/utmp 0664 root utmp -
>>

>> Does your system have this file, and if so, does it contain that line?
>
> Thanks, yes:
>
> $ sudo cat /usr/lib/tmpfiles.d/systemd.conf | grep utmp
> F! /run/utmp 0664 root utmp -

And fwiw (from a comment in the link you provided)

$ sudo journalctl -b _COMM=systemd-tmpfiles
-- Journal begins at Sat 2021-08-21 14:27:06 BST, ends at Tue 2022-01-25 03:04:>
-- No entries --



<    1   2   3   4   >