Discussion:
What's on your list?
Add Reply
Joe Rosevear
2018-07-10 09:12:36 UTC
Reply
Permalink
Raw Message
Howdy,

In a different post I described how I got my printer working.
Basically, I twiddled with Slackware's foomatic-rip filters. For more
information go to:

http://joeslife.org/news

This raises a talking point. I wonder if my printer fix needs to be
included somehow in Slackware? I think, perhaps, it should at least be
listed under the heading of "You Might Want to Change This".

I should keep my own list. Here is a first draft:

You Might Want to Change This
-----------------------------

1. The foomatic-rip fix: Mentioned above. Fixes foomatic rip
printing in Slackware 14.2.

2. The Diffie-Hellman fix. I don't know when this became
necessary, but /usr/bin/ssh doesn't work for me. I need to rename
it (/usr/bin/ssh__mods) and replace it with a script like
this one.

#!/bin/sh

/usr/bin/ssh__mods -oKexAlgorithms=diffie-hellman-group1-sha1 $*

3. The backspace fix. I write scripts which prompt for replies.
Sometimes a backspace is needed when replying, but it won't work
without this fix which I learned here in this Usenet group from Alan
Hicks in 2008:

if [ "$TERM" = "xterm" ]; then
stty erase $(tput kbs)
fi

Put the above code in your .bashrc (along with your exports and
aliases).

What's on your list?

-Joe
Sylvain Robitaille
2018-07-10 14:45:06 UTC
Reply
Permalink
Raw Message
Post by Joe Rosevear
...
2. The Diffie-Hellman fix. I don't know when this became
necessary, but /usr/bin/ssh doesn't work for me. I need to rename
it (/usr/bin/ssh__mods) and replace it with a script like
this one.
#!/bin/sh
/usr/bin/ssh__mods -oKexAlgorithms=diffie-hellman-group1-sha1 $*
That's an ugly hack. I have a policy (both personally and at work for
systems I manage there) whereby I make the smallest change necessary at
the OS level to accomplish what I'm after. Anything that can be
accomplished by configuration, of course is done by configuration. See
ssh_config for details of how you (arguably) should have done the above.
We have some old systems at work whose light-out management interfaces
don't work with newer ssh key exchange algorithms. I have the following
in my ~/.ssh/config file to accomodate those:

Host *.console.private
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +3des-cbc
HostKeyAlgorithms +ssh-dss

The same in /etc/ssh/ssh_config would provide the same result on a
system-wide basis.
Post by Joe Rosevear
What's on your list?
Lots of little changes ... here are some selected extracts:

- change default run level to 4
- /usr is mounted read-only
- enable syn cookies
- have sshd lookup hostnames for incoming connections
- enable ntpd
- "su" is available only to group 0
- setuid-root files are runable only by group "users" (with few
exceptions where that restriction is non-trivial)
- a couple of vim settings
--
----------------------------------------------------------------------
Sylvain Robitaille ***@encs.concordia.ca

Systems analyst / AITS Concordia University
Faculty of Engineering and Computer Science Montreal, Quebec, Canada
----------------------------------------------------------------------
Joe Rosevear
2018-07-13 00:29:27 UTC
Reply
Permalink
Raw Message
Post by Sylvain Robitaille
Post by Joe Rosevear
...
2. The Diffie-Hellman fix. I don't know when this became
necessary, but /usr/bin/ssh doesn't work for me. I need to rename
it (/usr/bin/ssh__mods) and replace it with a script like
this one.
#!/bin/sh
/usr/bin/ssh__mods -oKexAlgorithms=diffie-hellman-group1-sha1 $*
That's an ugly hack.
Yes, I suppose it is. I actually felt a twinge of guilt when I did it.
It poses a small danger that later I'll upgrade and lose track of what
I did. Otherwise, except for being non-standard, its pretty safe I
think. It is just a wrapper, and I feel good in my belief that it
won't interfere with how it functions. Of course, I might be wrong.

Anyway, I didn't have time to reasearch the correct way to do it.
That's why I appreciate your comments. Perhaps now I know how.
Post by Sylvain Robitaille
I have a policy (both personally and at work for systems I manage
there) whereby I make the smallest change necessary at the OS level
to accomplish what I'm after.
Yes, it is good to live (and work) by guiding rules. I don't often
think about mine, however. Perhaps I would profit from writing them
out or at least putting them into words as you have done above.

Yet even if I did this, my rules would likely be different from yours.
I'm a paraeducator at an elementary school. The computer work that I
do is in addition to my normal tasks and is often done for no pay. I
am currently the keeper of about two dozen Slackware-running computers
for mostly students. I am the only person who does any admin work on
those computers.

Your situation, I'll bet, is rather different from mine.
Post by Sylvain Robitaille
Anything that can be accomplished by configuration, of course is done
by configuration. See ssh_config for details of how you (arguably)
should have done the above. We have some old systems at work whose
light-out management interfaces don't work with newer ssh key
exchange algorithms. I have the following in my ~/.ssh/config file
Host *.console.private
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +3des-cbc
HostKeyAlgorithms +ssh-dss
The same in /etc/ssh/ssh_config would provide the same result on a
system-wide basis.
Right. It looks like I would, in fact, want to use
/etc/ssh/ssh_config, and I only need the KexAlgorithms line. I'm
guessing my first line should be "Host *", as I want this to apply to
all hosts. Is that how it works?
Post by Sylvain Robitaille
Post by Joe Rosevear
What's on your list?
- change default run level to 4
I played with run level 4, but I don't use it. Instead, I set up
inittab to invoke /usr/local/bin/autologin.sh in this way:

a1:1235:wait:/sbin/agetty -l /usr/local/bin/autologin.sh -n 38400 tty1 linux

Honestly, I'm doing this in a cookbook sort of way, so I can't tell you
much about what the above does, except that it works. This gives a
handy auto-login. Through use of startx in the .profile this gives me
a one-touch startup that goes all the way to a ready desktop. Just
press the power button.

(Right. I'm different. I don't leave them on all the time. They shut
down automatically at 6:00 PM.)
Post by Sylvain Robitaille
- /usr is mounted read-only
- enable syn cookies
I had to look up "syn cookies". Interesting.
Post by Sylvain Robitaille
- have sshd lookup hostnames for incoming connections
- enable ntpd
- "su" is available only to group 0
- setuid-root files are runable only by group "users" (with few
exceptions where that restriction is non-trivial)
- a couple of vim settings
That's quite a list. I'll bet your admin work keeps you busy.

-Joe
Michael Black
2018-07-10 17:45:41 UTC
Reply
Permalink
Raw Message
Post by Joe Rosevear
Howdy,
In a different post I described how I got my printer working.
Basically, I twiddled with Slackware's foomatic-rip filters. For more
http://joeslife.org/news
This raises a talking point. I wonder if my printer fix needs to be
included somehow in Slackware? I think, perhaps, it should at least be
listed under the heading of "You Might Want to Change This".
If you think something is missing, a bug or something left out as opposed
to something you are certain should be in there because you want it, you
should tell Slackware.

I was trying to get my old printer going with 14.2 a few months ago, and
there was no /dev/lp0 defined. A search uncovered a post here, someone
noticed soon after 14.2 came out. Simple oversight, or someone assuming
few are still using parallel port printers, but a problem for those
expecting it to be there. I don't know if anyone told Slackware, and I
didn't check if the "current" had been fixed, but that's the sort of thing
that is overlooked, and will remain until someone points it out.

These things happen. Reading the changelog over time can be interesting,
I've seen fixes show up that relate to things that were probably in there
for a long time. There are lots of fixes, real simple things, and someone
gets thanked for pointing the problem out.

Michael
Mike Spencer
2018-07-10 20:10:49 UTC
Reply
Permalink
Raw Message
Post by Michael Black
I was trying to get my old printer going with 14.2 a few months ago, and
there was no /dev/lp0 defined. A search uncovered a post here, someone
noticed soon after 14.2 came out. Simple oversight, or someone assuming
few are still using parallel port printers, but a problem for those
expecting it to be there. I don't know if anyone told Slackware, and I
didn't check if the "current" had been fixed, but that's the sort of thing
that is overlooked, and will remain until someone points it out.
Huh. I only have 14.2 on a testbed laptop, haven't tried printing.
But my old Brother HL 641 laser printer is still going strong using
lprng with a hand-crafted /etc/printcap. Sent to a DLink router that
has a parallel printer port. Tried CUPS the first distro I got it
with, couldn't make it drive the Brother printer. Never went back to
try again.

I guess going through the router doesn't reference /dev/lp0 but I
assumed that it would work were I to plug the printer in directly to
the host (with real parallel port or via a USB-> parallel adapter).
Both virtual printers (lp=***@192.168.0.1 and lp=/dev/lp0) are options
in /etc/printcap.
--
Mike Spencer Nova Scotia, Canada
Eef Hartman
2018-07-10 22:08:06 UTC
Reply
Permalink
Raw Message
Post by Michael Black
I was trying to get my old printer going with 14.2 a few months ago, and
there was no /dev/lp0 defined. A search uncovered a post here, someone
noticed soon after 14.2 came out.
In my system loading the parallel printer kernel modules in
/etc/rc.d/rc.modules did the trick:
/sbin/modprobe parport_pc io=0x378 irq=7 dma=1
(I use this one and not the default as there possibly is a ZIP drive
too on that port)
/sbin/modprobe -q lp 2> /dev/null

BTW: the printer is a LaserJet 6MP and works with the standard CUPS
filter:
MakeModel HP LaserJet 6P/6MP - PostScript
DeviceURI parallel:/dev/lp0
etc.
Michael Black
2018-07-11 16:30:19 UTC
Reply
Permalink
Raw Message
Post by Eef Hartman
Post by Michael Black
I was trying to get my old printer going with 14.2 a few months ago, and
there was no /dev/lp0 defined. A search uncovered a post here, someone
noticed soon after 14.2 came out.
In my system loading the parallel printer kernel modules in
/sbin/modprobe parport_pc io=0x378 irq=7 dma=1
(I use this one and not the default as there possibly is a ZIP drive
too on that port)
/sbin/modprobe -q lp 2> /dev/null
Yes, Chick Tower at the time asked, and you supplied an answer, which is
what I used to fix my problem.

I don't change hardware enough to be good at this. I plugged in the
printer, and something was different from what I reemmbered, and then I
realized no /dev/lp0

I would think even at this point parallel printers are not uncommon. I
don't expect to come set up for that USB wifi adapter that I had from
eyars ago, too slow now to bother. Or that serial Wacom tablet I found,
probably never many of those running on Linux. But a parallel printer
isn't too antiquated, I picked this "new" refurbished computer because it
still had a parallel and serial port.

So maybe someone forgot, or maybe someone did think it was "too
antiquated" and left it off. But it wasn't something I was expecting.

It is the advantage of installing somewhat after a new release, other
people can find the problems.
Post by Eef Hartman
BTW: the printer is a LaserJet 6MP and works with
MakeModel HP LaserJet 6P/6MP - PostScript
DeviceURI parallel:/dev/lp0
etc.
Mine was an HP 4P, I got it at a Rotary Club sale in 2003, for fifteen
dollars. Sadly, having moved it and then got /dev/lp0 going, soemthing's
broken so I'm going to get a new laser printer. Way cheaper new than back
then, I can't decide which one to buy. And I don't expect a new one,
selling for around $100, will be as sturdy.

Michael
Joe Rosevear
2018-07-11 00:44:02 UTC
Reply
Permalink
Raw Message
Post by Michael Black
Post by Joe Rosevear
Howdy,
In a different post I described how I got my printer working.
Basically, I twiddled with Slackware's foomatic-rip filters. For more
http://joeslife.org/news
This raises a talking point. I wonder if my printer fix needs to be
included somehow in Slackware? I think, perhaps, it should at least be
listed under the heading of "You Might Want to Change This".
If you think something is missing, a bug or something left out as opposed
to something you are certain should be in there because you want it, you
should tell Slackware.
I was trying to get my old printer going with 14.2 a few months ago, and
there was no /dev/lp0 defined. A search uncovered a post here, someone
noticed soon after 14.2 came out. Simple oversight, or someone assuming
few are still using parallel port printers, but a problem for those
expecting it to be there. I don't know if anyone told Slackware, and I
didn't check if the "current" had been fixed, but that's the sort of thing
that is overlooked, and will remain until someone points it out.
These things happen. Reading the changelog over time can be interesting,
I've seen fixes show up that relate to things that were probably in there
for a long time. There are lots of fixes, real simple things, and someone
gets thanked for pointing the problem out.
Michael
Yes, you're right. I searched on on the 32-bit changelog on "Thanks".
I got 333 hits.

-Joe
Grover Cleveland
2018-07-11 11:33:10 UTC
Reply
Permalink
Raw Message
Post by Joe Rosevear
This raises a talking point. I wonder if my printer fix needs to be
included somehow in Slackware? I think, perhaps, it should at least be
listed under the heading of "You Might Want to Change This".
You Might Want to Change This -----------------------------
The rename command under Slackware is archaic. The rename command in
the Debuntu family is much more flexible. And it's a perl script,
which means it and its manpage are portable. For me this was a
15-minute fix.
Joe Rosevear
2018-07-13 00:49:42 UTC
Reply
Permalink
Raw Message
Post by Grover Cleveland
Post by Joe Rosevear
This raises a talking point. I wonder if my printer fix needs to be
included somehow in Slackware? I think, perhaps, it should at least be
listed under the heading of "You Might Want to Change This".
You Might Want to Change This -----------------------------
The rename command under Slackware is archaic. The rename command in
the Debuntu family is much more flexible. And it's a perl script,
which means it and its manpage are portable. For me this was a
15-minute fix.
Thank you for that information.

I looked it up to learn more and found this 2014 post to
alt.os.linux.slackware:

https://groups.google.com/forum/#!topic/alt.os.linux.slackware/QuKcuX3ik3s

-Joe

Henrik Carlqvist
2018-07-12 06:54:49 UTC
Reply
Permalink
Raw Message
Post by Joe Rosevear
What's on your list?
I used to have a written list with things to manually fix or mostly
customize on my Slackware installation. But then I replaced this list
with a directory filled with custom Slackware packages and I also
customized the Slackware installation scripts to also install my custom
packages last at installation.

I found that everything I needed to customize was able to being put in a
package created by makepkg. Those packages can contain things like
customized configuration files below /etc and/or the script
install/doinst.sh which is being run as root during package installation.

Example of such a package:

PACKAGE NAME: kdehome-14.2-noarch-hc1
COMPRESSED PACKAGE SIZE: 512
UNCOMPRESSED PACKAGE SIZE: 10K
PACKAGE LOCATION: /var/log/mount/slackware64/cus/kdehome-14.2-noarch-
hc1.tgz
PACKAGE DESCRIPTION:
FILE LIST:
./
etc/
etc/profile.d/
etc/profile.d/kde.csh
etc/profile.d/kde.sh

...and the customization of those files is:

-8<----------------------------------------------------------
# Added by henca to allow different versions of KDE to coexist
KDEHOME=$HOME/.kde_slack142
export KDEHOME
-8<----------------------------------------------------------

The above fix is for an environment where users with their home
directories on NFS servers might log in on machines with different
versions of Slackware. Without that fix, logging in to a newer version of
Slackware would probably break KDE for older versions of Slackware.

Some installation scripts need to consider if the package was installed
during first installation or at a later occasion. If I install custom ssh
settings in /etc/ssh on a running system I want to restart the ssh daemon
for the new settings to take effect:

-8<---------------------------------
#!/bin/sh

fgrep sshd /usr/local/etc/rc.d/*

if [ $? -ne 0 ]; then
/etc/rc.d/rc.sshd restart
fi
-8<---------------------------------

Yes, I also have my own directory for all the things that I start or
restart from rc.local...

regards Henrik
Loading...