Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #245732 > unrolled thread

What should I put inside the file called wlan0?

Started byStella Ashburne <rewefie@gmx.com>
First post2022-02-28 19:50 +0100
Last post2022-03-01 10:50 +0100
Articles 20 on this page of 56 — 13 participants

Back to article view | Back to linux.debian.user


Contents

  What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-02-28 19:50 +0100
    Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-02-28 20:20 +0100
      Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-02-28 21:00 +0100
        Re: What should I put inside the file called wlan0? tomas@tuxteam.de - 2022-02-28 21:30 +0100
          Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-02-28 22:50 +0100
        Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-02-28 21:30 +0100
          Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-02-28 22:50 +0100
            Re: What should I put inside the file called wlan0? tomas@tuxteam.de - 2022-03-01 07:40 +0100
              Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-01 13:20 +0100
                Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-01 15:30 +0100
                  Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-01 16:00 +0100
              Re: What should I put inside the file called wlan0? Stefan Monnier <monnier@iro.umontreal.ca> - 2022-03-01 15:20 +0100
                Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-03-01 15:50 +0100
        Re: What should I put inside the file called wlan0? Tim Woodall <debianuser@woodall.me.uk> - 2022-03-01 13:20 +0100
          Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-03-01 13:30 +0100
            Re: What should I put inside the file called wlan0? David Wright <deblis@lionunicorn.co.uk> - 2022-03-01 15:40 +0100
              Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-03-01 15:50 +0100
          Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-01 15:40 +0100
            Re: What should I put inside the file called wlan0? Tim Woodall <debianuser@woodall.me.uk> - 2022-03-01 15:50 +0100
              Re: What should I put inside the file called wlan0? Greg Wooledge <greg@wooledge.org> - 2022-03-01 16:00 +0100
                Re: What should I put inside the file called wlan0? Tim Woodall <debianuser@woodall.me.uk> - 2022-03-01 16:40 +0100
                  wikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?) rhkramer@gmail.com - 2022-03-03 14:50 +0100
                    Re: wikis: moin-moin : plain text (was: Re: What should I put inside  the file called wlan0?) Greg Wooledge <greg@wooledge.org> - 2022-03-03 15:00 +0100
                    Re: wikis: moin-moin : plain text (was: Re: What should I put inside  the file called wlan0?) Tim Woodall <debianuser@woodall.me.uk> - 2022-03-03 15:50 +0100
        Re: What should I put inside the file called wlan0? David Wright <deblis@lionunicorn.co.uk> - 2022-03-01 17:30 +0100
          Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-02 09:10 +0100
            Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-02 19:00 +0100
              Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-03 09:00 +0100
                Re: What should I put inside the file called wlan0? Tim Woodall <debianuser@woodall.me.uk> - 2022-03-03 12:30 +0100
                  Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-03 19:30 +0100
                    Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-03 19:50 +0100
                      Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-03 20:00 +0100
              Re: What should I put inside the file called wlan0? David Wright <deblis@lionunicorn.co.uk> - 2022-03-03 17:00 +0100
                Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-03 19:50 +0100
                  Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-03-03 21:00 +0100
                  Re: What should I put inside the file called wlan0? David Wright <deblis@lionunicorn.co.uk> - 2022-03-08 16:20 +0100
              Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-03 19:40 +0100
                Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-03 19:50 +0100
                  Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-03 20:00 +0100
                  Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-03 20:00 +0100
            Re: What should I put inside the file called wlan0? David Wright <deblis@lionunicorn.co.uk> - 2022-03-08 16:20 +0100
    Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-02-28 21:10 +0100
      Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-02-28 21:20 +0100
        Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-01 00:20 +0100
          Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-01 06:10 +0100
            Re: What should I put inside the file called wlan0? Markus Schönhaber <debian-user@list-post.mks-mail.de> - 2022-03-01 09:00 +0100
              Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-01 12:10 +0100
          Re: What should I put inside the file called wlan0? <tomas@tuxteam.de> - 2022-03-01 07:50 +0100
    Re: What should I put inside the file called wlan0? Nicolas George <george@nsup.org> - 2022-02-28 22:20 +0100
      Re: What should I put inside the file called wlan0? Ash Joubert <ash@transient.nz> - 2022-02-28 23:50 +0100
        Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-01 00:50 +0100
          Re: What should I put inside the file called wlan0? Curt <curty@free.fr> - 2022-03-01 10:30 +0100
          Re: What should I put inside the file called wlan0? Ash Joubert <ash@transient.nz> - 2022-03-01 22:20 +0100
        Re: What should I put inside the file called wlan0? Stella Ashburne <rewefie@gmx.com> - 2022-03-01 06:10 +0100
      Re: What should I put inside the file called wlan0? Brian <ad44@cityscape.co.uk> - 2022-03-01 00:50 +0100
        Re: What should I put inside the file called wlan0? Nicolas George <george@nsup.org> - 2022-03-01 10:50 +0100

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#245792

FromTim Woodall <debianuser@woodall.me.uk>
Date2022-03-01 16:40 +0100
Message-ID<DWcLv-5aiZ-5@gated-at.bofh.it>
In reply to#245791
On Tue, 1 Mar 2022, Greg Wooledge wrote:

> On Tue, Mar 01, 2022 at 02:42:29PM +0000, Tim Woodall wrote:
>> My /etc/network/interfaces has:
>> # interfaces(5) file used by ifup(8) and ifdown(8)
>> # Include files from /etc/network/interfaces.d:
>> source-directory /etc/network/interfaces.d
>
> Did you write this file yourself, or are you using something other
> than Debian?  Just curious.
>
> unicorn:~$ grep interfaces /etc/network/interfaces
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> source /etc/network/interfaces.d/*
>
>

I was going to say I almost certainly wrote it myself as this machine
has been continuously upgraded going back to the dark ages. However, now
I check every single machine uses this and I cannot see where I have
manually configured it. I use my own installer - and I now discover that
moinmoin is no longer in bullseye so my wiki-pages about it are all gone
:-(

But when I look at the ifupdown.postinst script for buster I see:
# Generic stuff done on all configurations
if [ "$1" = "configure" ] ; then
   # We don't need loopback interface definition anymore as
   # ifupdown handles loopback interface on its own from now
   if [ ! -f /etc/network/interfaces ] ; then
     if [ -z "$2" ]; then
       echo "Creating /etc/network/interfaces."
       echo "# interfaces(5) file used by ifup(8) and ifdown(8)" >
/etc/network/interfaces
       echo "# Include files from /etc/network/interfaces.d:" >>
/etc/network/interfaces
       echo "source-directory /etc/network/interfaces.d" >>
/etc/network/interfaces
     else
       report_warn "/etc/network/interfaces does not exist"
     fi
   fi
fi

So it looks like it changed for bullseye and as I have not installed a
machine from scratch for bullseye yet I've not seen the latest variant.

[toc] | [prev] | [next] | [standalone]


#245836 — wikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?)

Fromrhkramer@gmail.com
Date2022-03-03 14:50 +0100
Subjectwikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?)
Message-ID<DWU09-5ASG-3@gated-at.bofh.it>
In reply to#245792
On Tuesday, March 01, 2022 10:34:40 AM Tim Woodall wrote:
> I now discover that
> moinmoin is no longer in bullseye so my wiki-pages about it are all gone

I don't remember many details about moin-moin (is there a dash?), but many 
(most?) wikis have text stored in an almost plain text form (possibly with 
some amount of various varieties of markup).

If you can find the data file(s) you might try reading and searching them with a 
plain text editor.

Aside: One of the goals of my  wiki / askSam workalike (being developed, but 
at least one usable iteration (by me ;-) ) is to allow me to keep text files 
(with markup) on my local computer (for searching and editing) and allowing 
those to be easily uploaded (and downloaded when changes have been made 
online) to an online wiki (Foswiki / TWiki), 

[toc] | [prev] | [next] | [standalone]


#245838 — Re: wikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?)

FromGreg Wooledge <greg@wooledge.org>
Date2022-03-03 15:00 +0100
SubjectRe: wikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?)
Message-ID<DWU9P-5AWQ-21@gated-at.bofh.it>
In reply to#245836
On Thu, Mar 03, 2022 at 08:39:33AM -0500, rhkramer@gmail.com wrote:
> On Tuesday, March 01, 2022 10:34:40 AM Tim Woodall wrote:
> > I now discover that
> > moinmoin is no longer in bullseye so my wiki-pages about it are all gone
> 
> I don't remember many details about moin-moin (is there a dash?), but many 
> (most?) wikis have text stored in an almost plain text form (possibly with 
> some amount of various varieties of markup).

MoinMoin does indeed store its articles in plain text files.  This is
very much unlike Mediawiki, which stores them in a MySQL (or other)
database.

There is no fixed location for where pages in a MoinMoin wiki are
stored.  The person who sets up the wiki chooses everything (which
makes maintenance steps inconvenient, as the documentation never tells
you where to go or exactly what to type; you have to do a bunch of
substitutions and interpolations yourself).

The Debian package would have been "set up" by the Debian maintainer,
but I don't know what choices they made.

I set up mine to live in /var/moin, so I have a layout like this:

root@remote:/var/moin/data/pages# ls BashFAQ\(2f\)113/revisions
00000001  00000002  00000003  00000004  00000005  00000006
root@remote:/var/moin/data/pages# file BashFAQ\(2f\)113/revisions/00000006
BashFAQ(2f)113/revisions/00000006: ASCII text, with very long lines, with CRLF line terminators

So, in general, you're looking for the root directory of your wiki.
Underneath that, there should be a data directory, then under that is
pages, and under that are all the individual pages' directories, with
various punctuation characters in the page names converted to (xx)
hexadecimal notation.  Inside *that* is a revisions subdirectory, and
in there are the files containing actual page text, one whole file for
each revision of the page.  No compression, no diffs or incremental
storage, or anything.  Whole copies.

[toc] | [prev] | [next] | [standalone]


#245839 — Re: wikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?)

FromTim Woodall <debianuser@woodall.me.uk>
Date2022-03-03 15:50 +0100
SubjectRe: wikis: moin-moin : plain text (was: Re: What should I put inside the file called wlan0?)
Message-ID<DWUWd-5Bwu-1@gated-at.bofh.it>
In reply to#245836
On Thu, 3 Mar 2022, rhkramer@gmail.com wrote:

> On Tuesday, March 01, 2022 10:34:40 AM Tim Woodall wrote:
>> I now discover that
>> moinmoin is no longer in bullseye so my wiki-pages about it are all gone
>
> I don't remember many details about moin-moin (is there a dash?), but many
> (most?) wikis have text stored in an almost plain text form (possibly with
> some amount of various varieties of markup).
>
> If you can find the data file(s) you might try reading and searching them with a
> plain text editor.
>
> Aside: One of the goals of my  wiki / askSam workalike (being developed, but
> at least one usable iteration (by me ;-) ) is to allow me to keep text files
> (with markup) on my local computer (for searching and editing) and allowing
> those to be easily uploaded (and downloaded when changes have been made
> online) to an online wiki (Foswiki / TWiki),
>
>
Oh, I can definitely recover it, just that I no longer have a buster
machine to quickly get it up again. I missed testing this during the
buster->bullseye upgrade and I've now got another project eating up my
spare time so setting up a new machine and getting it working again
needs to be "scheduled"

There isn't much there anyway, it's a fairly recent thing, but I'd
started to migrate my note taking to it (I chose moinmoin on the grounds
that the debian wiki uses it so I guessed it wasn't likely to be
dropped...)

My setup was (like everything I do :-P) unnecessarily complex so I
either have to roll the machine back that supported it to the
pre-bullseye backup or allow a weekend to get everything setup again on
a new machine - which includes things like firewall rules, dns and
goodness knows what else. I think I have a moinmoin page telling me
how I set it up. :-O

[toc] | [prev] | [next] | [standalone]


#245795

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-03-01 17:30 +0100
Message-ID<DWdxT-5aOL-1@gated-at.bofh.it>
In reply to#245738
On Mon 28 Feb 2022 at 20:59:03 (+0100), Stella Ashburne wrote:

> The contents of my current /etc/network/interfaces file are:
> 
> # The primary network interface

                ↓↓↓⬇↓↓
> allow-hotplug wlp3s0
> iface wlp7s0 inet static
        ↑↑↑⬆↑↑

Is that really what you mean to have?

>         wpa-ssid JupiterRising
>         wpa-psk {a long string of alphanumeric characters}
>         address 192.168.1.99/24
>         gateway 192.168.1.1
>         # dns-* options are implemented by the resolvconf package, if installed
>         dns-nameservers 1.1.1.1 8.8.8.8
> 
> Are you saying that I can cut out the above contents and paste them into a file called wlp7s0 (whose path is /etc/network/interfaces.d/)?

As long as you have "source /etc/network/interfaces.d/*" in your
/e/n/interfaces file, then you can call the file wlp7s0, or wlp3s0,
or anything else, and it will be read. That line in quotes is now
the default in Debian.

BTW does this mean you've given up on iwd?

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#245801

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-02 09:10 +0100
Message-ID<DWsdz-5k5B-7@gated-at.bofh.it>
In reply to#245795
Dearie

> Sent: Wednesday, March 02, 2022 at 12:20 AM
> From: "David Wright" <deblis@lionunicorn.co.uk>
> To: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
>
> As long as you have "source /etc/network/interfaces.d/*" in your
> /e/n/interfaces file, then you can call the file wlp7s0, or wlp3s0,
> or anything else, and it will be read. That line in quotes is now
> the default in Debian.
>

Just so to be clear......

The contents of my /etc/network/interfaces file are:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug enp2s0
#iface enp6s0 inet static
#	address 192.168.1.77/24
#	gateway 192.168.1.1
	# dns-* options are implemented by the resolvconf package, if installed
#	dns-nameservers 1.1.1.1 8.8.8.8

# The primary network interface
allow-hotplug wlp7s0
iface wlp7s0 inet static
        wpa-ssid JupiterRising
        wpa-psk (a long string of alphanumeric characters)
        address 192.168.1.99/24
        gateway 192.168.1.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 1.1.1.1 8.8.8.8

If I have a file called dave in /etc/network/interfaces.d/ and its contents are:



# The primary network interface
allow-hotplug wlp7s0
iface wlp7s0 inet static
        wpa-ssid JupiterRising
        wpa-psk (a long string of alphanumeric characters)
        address 192.168.1.99/24
        gateway 192.168.1.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 1.1.1.1 8.8.8.8


Are you saying that my /etc/network/interfaces file may look like the following so long as the line "source /etc/network/interfaces.d/*" (without quotes) is present?



# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug enp2s0
#iface enp6s0 inet static
#	address 192.168.1.77/24
#	gateway 192.168.1.1
	# dns-* options are implemented by the resolvconf package, if installed
#	dns-nameservers 1.1.1.1 8.8.8.8



> BTW does this mean you've given up on iwd?
>
For the moment, yes. I encountered the same problems when I tried iwd on Fedora 35. The folks of Fedora community were unable to help me fix it. Thanks for asking, mon cher.

Best wishes

Stella

[toc] | [prev] | [next] | [standalone]


#245814

FromBrian <ad44@cityscape.co.uk>
Date2022-03-02 19:00 +0100
Message-ID<DWBqx-5pjh-1@gated-at.bofh.it>
In reply to#245801
On Wed 02 Mar 2022 at 09:01:55 +0100, Stella Ashburne wrote:

> Dearie
> 
> > Sent: Wednesday, March 02, 2022 at 12:20 AM
> > From: "David Wright" <deblis@lionunicorn.co.uk>
> > To: debian-user@lists.debian.org
> > Subject: Re: What should I put inside the file called wlan0?
> >
> >
> > As long as you have "source /etc/network/interfaces.d/*" in your
> > /e/n/interfaces file, then you can call the file wlp7s0, or wlp3s0,
> > or anything else, and it will be read. That line in quotes is now
> > the default in Debian.
> >
> 
> Just so to be clear......
> 
> The contents of my /etc/network/interfaces file are:
> 
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> 
> source /etc/network/interfaces.d/*
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> #allow-hotplug enp2s0
> #iface enp6s0 inet static
> #	address 192.168.1.77/24
> #	gateway 192.168.1.1
> 	# dns-* options are implemented by the resolvconf package, if installed
> #	dns-nameservers 1.1.1.1 8.8.8.8
> 
> # The primary network interface
> allow-hotplug wlp7s0
> iface wlp7s0 inet static
>         wpa-ssid JupiterRising
>         wpa-psk (a long string of alphanumeric characters)
>         address 192.168.1.99/24
>         gateway 192.168.1.1
>         # dns-* options are implemented by the resolvconf package, if installed
>         dns-nameservers 1.1.1.1 8.8.8.8
> 
> If I have a file called dave in /etc/network/interfaces.d/ and its contents are:
> 
> 
> 
> # The primary network interface
> allow-hotplug wlp7s0
> iface wlp7s0 inet static
>         wpa-ssid JupiterRising
>         wpa-psk (a long string of alphanumeric characters)
>         address 192.168.1.99/24
>         gateway 192.168.1.1
>         # dns-* options are implemented by the resolvconf package, if installed
>         dns-nameservers 1.1.1.1 8.8.8.8
> 
> 
> Are you saying that my /etc/network/interfaces file may look like the following so long as the line "source /etc/network/interfaces.d/*" (without quotes) is present?

Correct, although I do nit understand what you gain from using
/etc/network/interfaces.d/.

> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> 
> source /etc/network/interfaces.d/*
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> #allow-hotplug enp2s0
> #iface enp6s0 inet static
> #	address 192.168.1.77/24
> #	gateway 192.168.1.1
> 	# dns-* options are implemented by the resolvconf package, if installed
> #	dns-nameservers 1.1.1.1 8.8.8.

(Nothing to do with your question but these two lines are superfluous:

auto lo
iface lo inet loopback).

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#245827

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-03 09:00 +0100
Message-ID<DWOxs-5xi4-1@gated-at.bofh.it>
In reply to#245814
Dearie

> Sent: Thursday, March 03, 2022 at 1:59 AM
> From: "Brian" <ad44@cityscape.co.uk>
> To: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
> On Wed 02 Mar 2022 at 09:01:55 +0100, Stella Ashburne wrote:
>
> > Are you saying that my /etc/network/interfaces file may look like the following so long as the line "source /etc/network/interfaces.d/*" (without quotes) is present?
>
> Correct, although I do nit understand what you gain from using
> /etc/network/interfaces.d/.
>

Please surf to https://wiki.debian.org/WiFi/HowToUse, sub-heading "WPA-PSK and WPA2-PSK", paragraph 1 which states:

1. Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure (alternatively use a separate config file such as /etc/network/interfaces.d/wlan0 on newer Debian versions):


>
> (Nothing to do with your question but these two lines are superfluous:
>
> auto lo
> iface lo inet loopback).
>
Thanks, dearie, for your tip.

Best wishes

Stella

[toc] | [prev] | [next] | [standalone]


#245831

FromTim Woodall <debianuser@woodall.me.uk>
Date2022-03-03 12:30 +0100
Message-ID<DWROF-5ztd-7@gated-at.bofh.it>
In reply to#245827
On Thu, 3 Mar 2022, Stella Ashburne wrote:

> Dearie
>
>> Sent: Thursday, March 03, 2022 at 1:59 AM
>> From: "Brian" <ad44@cityscape.co.uk>
>> To: debian-user@lists.debian.org
>> Subject: Re: What should I put inside the file called wlan0?
>>
>> On Wed 02 Mar 2022 at 09:01:55 +0100, Stella Ashburne wrote:
>>
>>> Are you saying that my /etc/network/interfaces file may look like the following so long as the line "source /etc/network/interfaces.d/*" (without quotes) is present?
>>
>> Correct, although I do nit understand what you gain from using
>> /etc/network/interfaces.d/.
>>
>
> Please surf to https://wiki.debian.org/WiFi/HowToUse, sub-heading "WPA-PSK and WPA2-PSK", paragraph 1 which states:
>
> 1. Restrict the permissions of /etc/network/interfaces, to prevent pre-shared key (PSK) disclosure (alternatively use a separate config file such as /etc/network/interfaces.d/wlan0 on newer Debian versions):
>
>

If you only have one interface then it probably doesn't make much
difference whether you leave it in interfaces or move it to
interfaces.d/

I prefer interfaces.d/ but I have some machines with lots of interfaces
to configure. I also do quite a lot of maintenance programmatically and
it's much easier to work with separate files than have to find the
correct bit in one long file.


This is orthogonal to the permissions thing. If you do not want your
WiFi password to be in a world readable file then you should ensure that
the file that contains your password isn't world readable.

[toc] | [prev] | [next] | [standalone]


#245847

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-03 19:30 +0100
Message-ID<DWYn8-5DNY-5@gated-at.bofh.it>
In reply to#245831
Mon cheri

> Sent: Thursday, March 03, 2022 at 7:22 PM
> From: "Tim Woodall" <debianuser@woodall.me.uk>
> To: "Stella Ashburne" <rewefie@gmx.com>
> Cc: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
> If you only have one interface then it probably doesn't make much
> difference whether you leave it in interfaces or move it to
> interfaces.d/
>
Thank for your clarification.

Best regards.

Stella

[toc] | [prev] | [next] | [standalone]


#245850

FromBrian <ad44@cityscape.co.uk>
Date2022-03-03 19:50 +0100
Message-ID<DWYGt-5DUE-9@gated-at.bofh.it>
In reply to#245847
On Thu 03 Mar 2022 at 19:23:43 +0100, Stella Ashburne wrote:

> Mon cheri
> 
> > Sent: Thursday, March 03, 2022 at 7:22 PM
> > From: "Tim Woodall" <debianuser@woodall.me.uk>
> > To: "Stella Ashburne" <rewefie@gmx.com>
> > Cc: debian-user@lists.debian.org
> > Subject: Re: What should I put inside the file called wlan0?
> >
> > If you only have one interface then it probably doesn't make much
> > difference whether you leave it in interfaces or move it to
> > interfaces.d/
> >
> Thank for your clarification.

So, having been given extensive advice in this thread - what is your
plan of action?

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#245854

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-03 20:00 +0100
Message-ID<DWYQ9-5DYk-11@gated-at.bofh.it>
In reply to#245850
Mon cheri

> Sent: Friday, March 04, 2022 at 2:40 AM
> From: "Brian" <ad44@cityscape.co.uk>
> To: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
>
> So, having been given extensive advice in this thread - what is your
> plan of action?
>
> --
> Brian.
>
Firstly, I appreciate the advice that you chaps have given me.

Secondly, I shall edit/amend the /etc/network/interfaces file and the one in /etc/network/interfaces.d/brian based on your recommendations.

Best wishes.

Stella

[toc] | [prev] | [next] | [standalone]


#245846

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-03-03 17:00 +0100
Message-ID<DWW1Y-5CdK-3@gated-at.bofh.it>
In reply to#245814
On Wed 02 Mar 2022 at 17:59:07 (+0000), Brian wrote:
> On Wed 02 Mar 2022 at 09:01:55 +0100, Stella Ashburne wrote:
> > From: "David Wright" <deblis@lionunicorn.co.uk>
> > >
> > > As long as you have "source /etc/network/interfaces.d/*" in your
> > > /e/n/interfaces file, then you can call the file wlp7s0, or wlp3s0,
> > > or anything else, and it will be read. That line in quotes is now
> > > the default in Debian.
> > 
> > Just so to be clear......
> > 
> > The contents of my /etc/network/interfaces file are:

[ … ]

> > Are you saying that my /etc/network/interfaces file may look like the following so long as the line "source /etc/network/interfaces.d/*" (without quotes) is present?
> 
> Correct, although I do nit understand what you gain from using
> /etc/network/interfaces.d/.

It allows you to configure each interface for each network in
individual files, which simplifies adding/removing/editing them
(or tailoring their permissions).

In addition, when using "source-directory"¹, you can leave all the
configuration files in place, and deactivate them by, say, adding
a disallowed character to their filenames, rather than having to
remove them.

More and more of the system configuration files are being split up
in this manner.

BTW, I would add that, though I have a reputation with the OP for
not recommending man pages, the paragraph in   man interfaces
that's headed "INCLUDING OTHER FILES" should make it very clear
what the relationship is between the /e/n/interfaces file itself
and any files placed in the /e/n/interfaces.d/ directory.

¹ I think source-directory was the default with buster, looking
  at the netinst ISO. But one of my first actions on any new
  installation is to overwrite the networking files.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#245851

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-03 19:50 +0100
Message-ID<DWYGt-5DUE-11@gated-at.bofh.it>
In reply to#245846
Mon cheri

> Sent: Thursday, March 03, 2022 at 11:50 PM
> From: "David Wright" <deblis@lionunicorn.co.uk>
> To: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
> In addition, when using "source-directory"¹, you can leave all the
> configuration files in place, and deactivate them by, say, adding
> a disallowed character to their filenames, rather than having to
> remove them.
> 
Can you give me an example of (sic) adding a disallowed character to their filenames? Does Linux permit the use of forbidden characters in filenames?

> BTW, I would add that, though I have a reputation with the OP for
> not recommending man pages,
> 
Most of the man pages don't provide an example for each option or argument mentioned therein.

>   But one of my first actions on any new
>   installation is to overwrite the networking files.
> 
Would you like to elaborate please?

Best wishes.

Stella

[toc] | [prev] | [next] | [standalone]


#245855

From<tomas@tuxteam.de>
Date2022-03-03 21:00 +0100
Message-ID<DWZMd-5Exr-3@gated-at.bofh.it>
In reply to#245851

[Multipart message — attachments visible in raw view] — view raw

On Thu, Mar 03, 2022 at 07:44:35PM +0100, Stella Ashburne wrote:
> Mon cheri
> 
> > Sent: Thursday, March 03, 2022 at 11:50 PM
> > From: "David Wright" <deblis@lionunicorn.co.uk>

[...]

> > In addition, when using "source-directory"¹, you can leave all the
> > configuration files in place, and deactivate them by, say, adding
> > a disallowed character to their filenames, rather than having to
> > remove them.
> > 
> Can you give me an example of (sic) adding a disallowed character to their filenames? Does Linux permit the use of forbidden characters in filenames?

I think David meant "disallowed wrt the 'source-directory' statement
in the interfaces file. The man page (man 5 interfaces) has this to
say:

  "Similarly,  "source-directory"  keyword is used to source
  multiple files at once, without specifying them individually
  or using shell globs. Additionally, when "source-directory"
  is used, names of the files are checked to match the following
  regular expression: ^[a-zA-Z0-9_-]+$. In other words, the
  names must consist entirely of ASCII upper- and lower-case
  letters, ASCII digits,  ASCII  underscores, and ASCII minus-
  hyphens."

I.e. all other characters would be "disallowed" in this context.
E.g. renaming "my-cool-interface" to "#my-cool-interface" would
exclude it from being included by a "source-directory" statement.

As to your other question, that would depend on the file system,
but as far as Linux is concerned, only the slash "/" and the
NULL character are taboo for file names.

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#246062

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2022-03-08 16:20 +0100
Message-ID<DYJMZ-nKv-1@gated-at.bofh.it>
In reply to#245851
On Thu 03 Mar 2022 at 19:44:35 (+0100), Stella Ashburne wrote:
> From: "David Wright" <deblis@lionunicorn.co.uk>
> >
> > In addition, when using "source-directory"¹, you can leave all the
> > configuration files in place, and deactivate them by, say, adding
> > a disallowed character to their filenames, rather than having to
> > remove them.
> > 
> Can you give me an example of (sic) adding a disallowed character to their filenames? Does Linux permit the use of forbidden characters in filenames?
> 
> > BTW, I would add that, though I have a reputation with the OP for
> > not recommending man pages,
> > 
> Most of the man pages don't provide an example for each option or argument mentioned therein.

I would maintain that the examples in   man interfaces
and /usr/share/doc/ifupdown/examples/network-interfaces
cover the area pretty well, assuming you're actually
using ifupdown (which you disputed at one point).

> >   But one of my first actions on any new
> >   installation is to overwrite the networking files.
> > 
> Would you like to elaborate please?

Frequently, I have installed wireless machines with ethernet,
which leaves behind an /e/n/i file for ifupdown to read. Up
until buster, I used wicd to configure the network (both wifi
and wired), so I would immediately overwrite /e/n/i with:

$ cat /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
$ 

otherwise wicd will think that some other application is
configuring any interfaces contained therein.

The upshot is that I don't have an unmodified copy of
/e/n/i to check on my statement re source/source-directory.
What I did check was /var/lib/dpkg/info/ifupdown.postinst,
which is alleged to create the file during instalation.

$ diff -U0 /tmp/bull/ifupdown.postinst /tmp/bust/ifupdown.postinst 
--- /tmp/bull/ifupdown.postinst 2020-11-04 00:37:13.000000000 -0600
+++ /tmp/bust/ifupdown.postinst 2019-01-28 14:37:33.000000000 -0600
@@ -23 +23 @@
-      echo "source /etc/network/interfaces.d/*" >> /etc/network/interfaces
+      echo "source-directory /etc/network/interfaces.d" >> /etc/network/interfaces
@@ -30 +30 @@
-# Automatically added by dh_installdeb/13.2.1
+# Automatically added by dh_installdeb/12
@@ -41 +41 @@
-# Automatically added by dh_installinit/13.2.1
+# Automatically added by dh_installinit/12
@@ -48 +48 @@
-# Automatically added by dh_installsystemd/13.2.1
+# Automatically added by dh_installsystemd/12
@@ -65 +65 @@
-# Automatically added by dh_installsystemd/13.2.1
+# Automatically added by dh_installsystemd/12
$ 

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#245848

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-03 19:40 +0100
Message-ID<DWYwN-5DQX-1@gated-at.bofh.it>
In reply to#245814
Note: This reply is addressed specifically to Brian.

Mon cheri

> Sent: Thursday, March 03, 2022 at 1:59 AM
> From: "Brian" <ad44@cityscape.co.uk>
> To: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
>
> (Nothing to do with your question but these two lines are superfluous:
>
> auto lo
> iface lo inet loopback).
>
> --
> Brian.
>
I just remembered I should seek more clarification about your above remark.

The contents of my /etc/network/interfaces file are:



# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp2s0
iface enp6s0 inet static
	address 192.168.1.77/24
	gateway 192.168.1.1
	# dns-* options are implemented by the resolvconf package, if installed
	dns-nameservers 1.1.1.1 8.8.8.8



while in /etc/network/interfaces.d/brian they are:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug wlp7s0
iface wlp7s0 inet static
        wpa-ssid JupiterRising
        wpa-psk (a long string of alphanumeric characters)
        address 192.168.1.99/24
        gateway 192.168.1.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 1.1.1.1 8.8.8.8

Did you mean to tell me that the following lines can be omitted from both /etc/network/interfaces AND /etc/network/interfaces.d/brian ?

# The loopback network interface
auto lo
iface lo inet loopback


Best wishes.

Stella

[toc] | [prev] | [next] | [standalone]


#245849

FromBrian <ad44@cityscape.co.uk>
Date2022-03-03 19:50 +0100
Message-ID<DWYGt-5DUE-7@gated-at.bofh.it>
In reply to#245848
On Thu 03 Mar 2022 at 19:38:07 +0100, Stella Ashburne wrote:

[Snip]

> Did you mean to tell me that the following lines can be omitted from both /etc/network/interfaces AND /etc/network/interfaces.d/brian ?
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback

Indeed I do. ifupdown handles the lo interface without them.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#245852

FromBrian <ad44@cityscape.co.uk>
Date2022-03-03 20:00 +0100
Message-ID<DWYQ9-5DYk-1@gated-at.bofh.it>
In reply to#245849
On Thu 03 Mar 2022 at 19:51:02 +0100, Stella Ashburne wrote:

> Mon cheri
> 
> > Sent: Friday, March 04, 2022 at 2:43 AM
> > From: "Brian" <ad44@cityscape.co.uk>
> > To: debian-user@lists.debian.org
> > Subject: Re: What should I put inside the file called wlan0?
> >
> >
> > Indeed I do. ifupdown handles the lo interface without them.
> >
> > --
> > Brian.
> >
> Thanks but I don't use ifupdown. Does that mean that I can't omit the following lines?
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback

You are using /etc/network/interfaces. Therefore you use ifupdowm.

  apt show ifupdown
  dpkg -L ifupdown

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#245853

FromStella Ashburne <rewefie@gmx.com>
Date2022-03-03 20:00 +0100
Message-ID<DWYQ9-5DYk-3@gated-at.bofh.it>
In reply to#245849
Mon cheri

> Sent: Friday, March 04, 2022 at 2:43 AM
> From: "Brian" <ad44@cityscape.co.uk>
> To: debian-user@lists.debian.org
> Subject: Re: What should I put inside the file called wlan0?
>
>
> Indeed I do. ifupdown handles the lo interface without them.
>
> --
> Brian.
>
Thanks but I don't use ifupdown. Does that mean that I can't omit the following lines?

# The loopback network interface
auto lo
iface lo inet loopback


Best wishes.

Stella

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | linux.debian.user


csiph-web