Re: Help with msmtp-mta

2021-04-05 Thread Fabrice Bauzac-Stehly
geoad...@sapo.pt writes:

> This worked: from https://moritzvd.com/email-with-smtp-debian-ubuntu/:
>
> In order to be able to use the mail command we need to install mailx:
>
> sudo apt-get install bsd-mailx
>
> Set mail transport agent to use msmtp
>
> sudo nano /etc/mail.rc
>
> append the following:
>
> set mta=/usr/bin/msmtp

Good for you if it works!

I have the feeling that unfortunately the root cause of the initial
problem (it works with bsd-mailx but still fails with mailutils,
correct?) remains a mystery though.

  Maybe you would like to help investigating the issue, in which case we
  could discover and fix a bug, so that the issue doesn't hit anybody else
  in the future, which is good for the community.  If you would like to do
  that, there are things we can do to investigate, such as enabling msmtp
  logging with:

logfile -

  Which would allow to see the actual error message.  See
  https://marlam.de/msmtp/msmtp.html#Logging

But don't feel obliged to do that.  It's OK.  I have updated the wiki
page with your inputs anyway.

Thanks!

-- 
Fabrice Bauzac-Stehly
PGP 01EEACF8244E9C14B551C5256ADA5F189BD322B6
old PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Effacer plusieurs millions de fichiers d'un répertoire !

2021-04-04 Thread Fabrice Bauzac-Stehly
Jean-Damien Durand  writes:

> find /tmp -cmin +30 -type f -exec rm -f {} \;

Utilise -delete pour que ca aille plus vite:

  find /tmp -cmin +30 -type f -delete

-- 
Fabrice Bauzac-Stehly
PGP 01EEACF8244E9C14B551C5256ADA5F189BD322B6
old PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Help with msmtp-mta

2021-04-03 Thread Fabrice Bauzac-Stehly
geoad...@sapo.pt writes:

> I was going throught msmtp docs at the debian wiki,but I'm still
> having trouble setting msmtp-mta.

I guess you're talking about this wiki page:
https://wiki.debian.org/msmtp

I've just reviewed it and updated it with a few improvements.

> [...] what would be the best channel to request support on this?

I don't know why you think I could particularly help you on msmtp, I
don't use it (I use mpop though).

I *think* you can discuss your issue on debian-user@lists.debian.org (I
have added it in Cc), to which I suggest you subscribe.  Another
possibility, if you are quite sure that there is an software issue
behind this, is to file a new bugreport (with e.g. the "reportbug" tool)
targetting the software you think is the culprit.

> The msmtp is working fine following the instruction on the wiki and
> elsewhere (this email is sent using msmtp), however web apps (in my
> case GNU Social), and anything else calling the mail command return
> errors:

> eg
>
> mail -s teste another@external.email < /dev/null
>
> returns:
>
> mail: Null message body; hope that's ok
> mail: cannot send message: Process exited with a non-zero status
>
> and:
> $ echo $?
> 36

These error messages are insufficient to understand what's wrong.  Is it
all?

I suspect the process which "mail" talks about is in fact
/usr/bin/sendmail, which resolves as one of the msmtp programs; you can
check that by following the /usr/bin/sendmail symlink, and by using
strace to see which child process of "mail" is the cause of this error
message:

  strace -e trace=process -o /tmp/strace.log mail -s ...

If I understood correctly, there is a msmtp daemon running somewhere.
Have you looked at its logs?

> I tried uninstalling mailutils and msmtp-mta, then trying reinstalling
> the msmtp-mta only but then the mail command is not found.

I think uninstalling mailutils is a bad idea here.

> Also started msmtpd daemin manually, but doesn't seem to make a
> difference.
>
> I understood msmtp + msmtp-mta would suffice, but it appears not?
>
> I've tried several support channels, but few people seem to know
> enough to help.
>
> Could you help on this?
>
> Thanks!
>
> josely

-- 
Fabrice Bauzac-Stehly
PGP 01EEACF8244E9C14B551C5256ADA5F189BD322B6
old PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: HS: petite question bash et variable en argument d'une commande

2021-03-22 Thread Fabrice Bauzac-Stehly
Attention aux quotes:

#!/bin/bash
day_date="--date=1 day ago"
date "${day_date}" "+%A %d %B"

-- 
Fabrice Bauzac-Stehly
PGP 01EEACF8244E9C14B551C5256ADA5F189BD322B6
old PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Cron Jobs and Time Zones Has Anything Changed?

2020-12-03 Thread Fabrice BAUZAC-STEHLY
Martin McCormick writes:

>   I record a news broadcast from one of the BBC services
> every week day at 17:45 British time.  When Europe and North
> America stop or start shifting daylight in Autumn or Spring,
> there's a really good chance of missing some of the broadcasts if
> one doesn't think about it since these shifts don't all happen on
> the same time.

Maybe you could create ~/.config/cron/bcast.vixie:

45 17 * * mon-fri echo hello or whatever command you want

And install mcron, then run:

TZ=Europe/London mcron --daemon

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Conseils pour le développement sur Debian d'applications natives Windows/Linux

2020-11-19 Thread Fabrice BAUZAC-STEHLY
Olivier writes:

> Je serai très curieux de recueillir ici des retours d'expérience sur le
> développement sous Debian (Buster) d'applications natives Windows/Linux.
>
> 1. Par application native, j'entends une application graphique avec
> quelques champs de saisie et quelques boutons.
> L'homogénéité du style de l'application avec les autres n'a pas
> d'importance pour mon cas.
> Le fait de coder avec des technos Web (HTML, JS, CSS) ou classiques n'est
> pas important non plus.

Je pense que tu peux le faire sans trop de problemes avec Java, en
utilisant la GUI Swing (ou JavaFX), et Maven.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Réduire la verbosité de cron

2020-11-19 Thread Fabrice BAUZAC-STEHLY
steve writes:

> Le 18-11-2020, à 22:13:35 +0100, Fabrice BAUZAC-STEHLY a écrit :
>>steve writes:

>>> Cron remplit les logs d'information que je considère comme inutile.
>>> Nov 18 18:05:01 box CRON[18456]: pam_unix(cron:session): session opened for 
>>> user _tuptime by (uid=0)
>>> Nov 18 18:05:01 box CRON[18456]: pam_unix(cron:session): session closed for 
>>> user _tuptime

>>Ce sont des logs generes par le composant "session" de pam_unix(8).

>>Si tu n'en veux pas, je pense qu'il faut que tu modifies la
>>configuration PAM de cron.

>>Chez moi, j'ai
>>  /etc/pam.d/cron
>>qui inclut:
>>  @include common-session-noninteractive
>>et /etc/pam.d/common-session-noninteractive contient:
>>  session required pam_unix.so

>>Je ne connais pas bien PAM mais je pense qu'il faut modifier
>>/etc/pam.d/cron:

>>- Remplacer le "@include common-session-noninteractive" par le contenu
>>du fichier

> Qu'est-ce que ça apporterait ?

Le but est de ne modifier que la configuration PAM de cron, pas de
modifier d'autres choses comme sudo ou systemd-user.  Si tu supprimes la
ligne "session required pam_unix.so" du fichier
common-session-noninteractive, tu vas impacter tous les programmes qui
l'incluent.  Remplacer le @include par le contenu du fichier te permet
de supprimer la ligne juste pour cron.

>>- puis supprimer la ligne "session required pam_unix.so"

> C'est pas un truc à se faire locked out ?

A partir du moment ou tu ne modifies que ce qui est specifique a cron,
tu ne peux avoir d'impact que sur cron.

N'hesite pas a te documenter sur PAM.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: How to write in Chinese

2020-11-19 Thread Fabrice BAUZAC-STEHLY
Markos writes:

> I am studying Chinese and I need to install fonts to type ideograms in
> Debian 9.
>
> I use Brazilian Portuguese, but I don't want to reconfigure my
> computer to type only in Chinese.
>
> Using LibreOffice or with a specific program to generate the ideograms
> only when needed.
>
> Any tip?

FYI, GNU Emacs comes with lots of support for Asiatic languages with a
rich set of input methods, and seems used quite a lot by Asiatic people.
Maybe you'd like to have a look into it?

See e.g.:
- https://www.emacswiki.org/emacs/WritingChinese
- http://ergoemacs.org/emacs/emacs_chinese_input.html
- https://www.emacswiki.org/emacs/WritingChineseWithWuBi
- https://emacs-china.org/

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Réduire la verbosité de cron

2020-11-18 Thread Fabrice BAUZAC-STEHLY
steve writes:

> Cron remplit les logs d'information que je considère comme inutile.
>
> Nov 18 18:05:01 box CRON[18456]: pam_unix(cron:session): session opened for 
> user _tuptime by (uid=0)
> Nov 18 18:05:01 box CRON[18456]: pam_unix(cron:session): session closed for 
> user _tuptime

Ce sont des logs generes par le composant "session" de pam_unix(8).
Si tu n'en veux pas, je pense qu'il faut que tu modifies la
configuration PAM de cron.

Chez moi, j'ai
  /etc/pam.d/cron
qui inclut:
  @include common-session-noninteractive
et /etc/pam.d/common-session-noninteractive contient:
  session required pam_unix.so

Je ne connais pas bien PAM mais je pense qu'il faut modifier
/etc/pam.d/cron:
- Remplacer le "@include common-session-noninteractive" par le contenu
du fichier
- puis supprimer la ligne "session required pam_unix.so"

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: passer en ip fixe

2020-10-18 Thread Fabrice BAUZAC-STEHLY
benoit szczygiel writes:

> Je veux passer une machine sous buster en IP fixe, et elle me fait des
> misères. Ci joint mon /etc/network/interfaces.

Il me semble qu'il y a deux "D" a address.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: "ps -o %mem" and free memory in Linux

2020-10-02 Thread Fabrice BAUZAC-STEHLY


Victor Sudakov writes:

> I summed up with awk the values of %mem, which are supposed to be "ratio
> of the process's resident set size  to the physical memory", correct?
>
> In my understanding, the value of %mem should indicate how much physical
> memory is spent on the "individual" part of the process, otherwise the
> parameter is either useless or misdocumented.

No, in resident memory you can find memory private to a process as well
as memory shared between processes.

And in memory private to a process, you can find resident memory and
non-resident memory.

According to Linux's Documentation/filesystems/proc.txt, we can find
this information in /proc/PID/status:

  VmData   size of private data segments
e.g.  VmData:  123004 kB

This looks like the amount of private memory, but I'm not sure.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: crc not installed but rsync using it? ...

2020-10-01 Thread Fabrice BAUZAC-STEHLY


David Wright writes:

> On Tue 29 Sep 2020 at 15:50:35 (+0200), Albretch Mueller wrote:
>>  But how could you have some assurance that that data relates to what
>> their users thought of to be?
>
> You can't. That's not what CRCs are for. They're not cryptographic,
> so they are useless for any type of assurance that the data is intact.

More precisely, hashes that are not cryptographic-grade are useless for
assurance that the data has not been modified by a third-party.  They
can still be useful for assurance that data has not been altered by wire
issues and other physical (non-human) issues.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: LEAN Debian install: Exploring task selection menu

2020-09-18 Thread Fabrice BAUZAC-STEHLY
rhkra...@gmail.com writes:

> On Friday, September 18, 2020 09:21:21 AM Brian wrote:
>> On Fri 18 Sep 2020 at 07:32:46 -0400, Greg Wooledge wrote:
>> > Right now, if you un-check GNOME, but leave "Debian desktop" checked,
>> > you get a mystery desktop, which usually but not always turns out to
>> > be GNOME, which is the thing that you just un-checked.
>
>> The default desktop is determined by the Recommends: of task-desktop.
>> The DEs are installed based on the Depends: of the various packages.
>> Is there a better way of doing it?
>>
>> > How you don't find that confusing is a mystery to me.
>
>> Regarding new users: they are just as likely to be mystified by "lxde"
>> and "lxqt" as by "Debian desktop environment".
>
> I don't know for sure, but one suggestion I'd make is to move that first 
> option
> (whatever it said, something like Default debian desktop) to be the last
> option and change the wording, something like: "[for advanced users:] [can be
> used to] install X only (with no desktop)" (I guess if you want X only you
> have select that in the other place you mentioned.)

And in that case, if users insist on this possibility, it would be much
more useful to have this entry *always* install X only even without the
"no recommends" option.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: LEAN Debian install: Exploring task selection menu

2020-09-18 Thread Fabrice BAUZAC-STEHLY
Marco Möller writes:

> On 17.09.20 20:58, Brian wrote:
>> On Thu 17 Sep 2020 at 09:29:35 +0200, Marco Möller wrote:
>>
>>> On 16.09.20 10:54, Richard Owlett wrote:
>>>> On 09/15/2020 06:50 PM, David Wright wrote:
>>>> Agreed. Where the menu says "Debian desktop environment" I would:
>>>>  1. remove the check-box.
>>>>  2. rephrase it as "Chose a Debian desktop environment".
>>>>  3. add a default check by GNOME.
>>>>
>>>
>>> YES, Exactly this!
>>
>> That's it? You and Richard Owlett would jettison the ability of a user
>> to install task-desktop? All in the cause of some ill defined objective
>> that both of you are incapable of explaining and defending even after
>> the situation has been explained to you?
>>
>
> The situation needs to be explained to new Debian users during the
> installation process, so that they can expect correctly what would
> happen by their selection in this menu. But the need for further
> explanation could fully be avoided by simply changing the menu to what
> is nicely suggested above, because the above suggested menu would
> prevent misunderstandings.
> The elsewhere already mentioned idea, to even add an option for
> letting a user select if a minimum version of the selected graphical
> desktop environment(s) should be installed, or if a more complete
> version including additionally recommended packages is preferred,
> would be perfect.
>
> I assume that we can all agree, that the experienced users will be
> able to deal with any version of that menu, especially as they would
> also know how to install their system using apt manually on the
> console and therefore might anyway not select anything in this
> menu. Consequently, this menu is more targeted to Debian beginners,
> and Debian beginners should be welcomed with unequivocal options to
> select from.
>
> Best regards, Marco!

+1

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: LEAN Debian install: Exploring task selection menu

2020-09-15 Thread Fabrice BAUZAC-STEHLY
Brian writes:

> On Mon 14 Sep 2020 at 08:12:50 -0400, Greg Wooledge wrote:
>
> The Debian desktop environment installs task-desktop. This package
> recommends desktop task packages. task-gnome-desktop is the first one
> listed, so it will be the one installed. In that sense, the installer
> does know what the default is.
>
> Suppose a user installs with base-installer/install-recommends set to
> false. With the Debian desktop environment being the only option ticked,
> a user would not install task-gnome-desktop but would get xorg and
> enough software to use X. The suggested scheme would not cater for this.

When during a Debian install a random user gets in front of the tasksel
dialog, they probably don't know about this complex behaviour.  I think
we should make this dialog less ambiguous to let users know what boxes
to check according to what they want.

Do you think the behaviour "without Recommends" should be an option
presented to the user?

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Securing local host of reverse SSH tunnel?

2020-09-15 Thread Fabrice BAUZAC-STEHLY
Nate Bargmann writes:

> I am going to be deploying a Debian system at a location where I am
> unsure if I can make any inbound connection into that system.  I am
> going to set up an SSH tunnel from that system to a host in my LAN.
> What I am concerned about is the remote possibility of theft and
> therefore exposing my LAN to an inbound connection where a shell prompt
> can be obtained.  I will be setting up a private/public key pair.  My
> plan is to SSH into the internal host and then initiate an SSH
> connection to the defined port and ultimately log into the remote
> system.
>
> The site is physically secure, but ...  While I understand that at the
> remote end I can instruct the SSH client not to request a pseudo tty, if
> a thief has the private key, all he needs to do is initiate a connection
> and get a shell prompt on my internal host (due to being run from a
> startup script, the private key cannot be password protected, or can
> it?).
>
> What I would like to do is in some way configure the ssh daemon on my
> internal host to not allow any access other than allocating the port for
> the reverse connection.  Ideally, this restriction should be based on
> the public key of the pair but I've not seen in sshd_config(5) a way for
> the Match directive to use the public key as its trigger.

To restrict what an SSH account can do, you can use the command="..."
setting in the autorized_keys file.  It is documented in sshd(8).  I use
it specifically to restrain the possible actions that can be done with
that private key.  As the command, you can use any program or script
that can check the arguments and perform the requested action, without
allowing any unforeseen action.

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: LEAN Debian install: Exploring task selection menu

2020-09-11 Thread Fabrice BAUZAC-STEHLY
Marco Möller writes:

> On 10.09.20 18:43, David Wright wrote:

>> So what would your version of an installer do when presented with:
>>
>>│  [*] Debian desktop environment │
>>│  [ ] ... GNOME  │
>>│  [ ] ... Xfce   │
>>│  [ ] ... KDE│
>>│  [ ] ... Cinnamon   │
>>│  [ ] ... MATE   │
>>│  [ ] ... LXDE   │

> I agree with Richard's criticism and would suggest to not present that
> first line "Debian desktop environment" at all, because it is
> redundant with the second line "... GNOME". If someone deselects the
> second line because no wanting GNOME, but does not image what the
> first line might contain, then he will be surprised that GNOME became
> anyway fully installed after the first line was still selected, a
> behaviour which makes no sense after the second line was explicitly
> not selected. It is especially annoying if you did this selection
> "mistake" on slow or expensive bandwidth. When I first time did this
> mistake, I thought, hey, maybe for a desktop they will install already
> something like network manager and other network managing tools or a
> tiny collection of enhanced editors like vim instead of vi only, maybe
> some other cute utilities. But I ended up with looong time downloading
> and installing a full blown GNOME which I actually wanted to avoid and
> therefore did unselect the second line initially.
> Best regards, Marco.

I've also been bitten by this.  I think it is a UI issue, the options
are ambiguous.  Would it be possible to simply change the dialog box as
follows?  --

  Debian desktop environments:
  [ ] ... GNOME (default)
  [ ] ... Xfce
  [ ] ... KDE
  [ ] ... Cinnamon
  [ ] ... MATE
  [ ] ... LXDE

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: équivalant de history -c en ZSH ?

2020-09-11 Thread Fabrice BAUZAC-STEHLY
benoit writes:

> Quant à  history -p pour zsh il arrête d'écrire après, mais ce n'est pas « 
> rétroactif ».

Pour arreter le logging, que ce soit avec bash ou zsh, on peut aussi
faire:

  unset HISTFILE

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D



Re: Erreur d'extraction de tarball

2020-09-07 Thread Fabrice BAUZAC-STEHLY
Bonsoir,

Olivier Humbert writes:

> J'ai parfois un soucis d'extraction de paquet tar.xz.
>
> Pour reproduire :
> 1. dans le répertoire ~/Bureau/, j'effectue la commande suivante : git
> clone --recursive https://github.com/linuxmao-org/fogpad-port.git
> 2. ensuite, je clic-droit sur le dossier fogpad-port/ ->
> Compresser... -> fogpad-port.tar.xz
> 3. ensuite, je supprime le dossier fogpad-port/
> 4. maintenant, si j'essaie d'extraire le tarball ainsi compressé avec
> un clic-droit sur le fichier fogpad-port.tar.xz -> extraire ici,
> j'obtiens alors une fenêtre (voir
> https://pix.toile-libre.org/upload/original/1599437136.png ) qui
> apparaît et dont le message complet est :
> tar: fogpad-port/plugins/Fogpad/sources : open impossible: Le
> fichier existe
> tar: Arrêt avec code d'échec à cause des erreurs précédentes
> L'extraction s'arrête alors, et aucun fichier n'est extrait.
>
> Ça fait plusieurs fois que ceci m'arrive, et je ne parviens pas à
> résoudre le problème.
>
> Notes :
> - ceci se produit avec les extensions tar.bz2, tar.gz, tar.xz
> - ceci ne se produit pas avec les extensions a, ear, jar, tar,
> tar.lzma, tar.7z, war
> - plantage (sans raison donnée) avec les extensions 7z, cbz, exe, zip

Je ne reproduis pas l'erreur avec le gestionnaire de fichiers standard
de GNOME.

Essaie de verifier l'archive en ligne de commande:

tar -tf ~/Bureau/fogpad-port.tar.xz

La commande indique-t-elle une erreur?

Peux-tu m'envoyer (a mon adresse seulement, pour eviter de spammer la
mailing-list) le fichier afin que je regarde de mon cote?

--
Fabrice BAUZAC-STEHLY
PGP 015AE9B25DCB0511D200A75DE5674DEA514C891D