The officially official Devuan Forum!

You are not logged in.

#226 Other Issues » sha512sum... » 2023-02-16 22:58:33

nahkhiirmees
Replies: 11

When i do this:

cp a/*.xx b
cp a/*.yy b
cp a/*.zz b
cd b
sha512sum ./* > sums.txt
sha512sum -c sums.txt

i get OK's from all of the files.
on the other hand when i do this:

cd a
sha512sum ./*.xx > part1.txt
sha512sum ./*.yy >> part1.txt
sha512sum ./*.zz > part2.txt
cp a/*.xx b;cp a/*.yy b;cp a.zz b;cp part*.txt b
cd b
mv part1.txt sums.txt
cat part2.txt >> sums.txt
sha512sum -c sums.txt

i get complaints from lines containing .yy and .zz files.
Have you encountered this kind of behaviour from sha512sum?

Trying to find out if it's either:
a) you're not supposed to use sha512sum(and other commands) like that (the second code-block)
b) i have found a bug in sha512sum
c) there's something wrong with my current desktop

i bought the hard drive abt year ago. And did a 24 hour memtest before installing OS. Passed with flying colours.
So i would like to think it is either a) or b) .

#227 Re: DIY » sudo and slim » 2023-02-16 22:42:53

Fortunately there are many dm:s available even in Devuan. But there's another thing:
i would like to continue using xfce but it's dependencies are starting to bother me. When i install xfce by saying "apt-get install xfce" , some package draws in avahi and libavahi. I did some googling and noticed that it is recommended to remove avahi because it is considered as a security risk.
And then there's also libcups3. When most of things i do with a computer are reading email and watching Netflix and youtube videos, why do i have to run a print server also? OK i'm exaggerating a bit , libcups is not same thing as cups but i wonder why it is needed?

#228 Re: DIY » sudo and slim » 2023-02-16 22:31:47

I managed to find a new way to break slim. Time to look for alternatives. I wonder why on earth slim is the default display manager in Devuan?

#229 Re: DIY » sudo and slim » 2023-02-01 18:00:08

nahkhiirmees wrote:

i am able to rm /etc/sudoers.d/live and still log in to slim. Even remove user devuan from group sudo with usermod and still log in.
So it's either wrong contents in /e/sudoers or something else. The problem is:i need to say sudo /sbin/{ifup,ifdown,shutdown} but sudoers seem too fragile to alter.

I guess i should spend some time with "man sudo".

From "man sudoers" i found an example which mostly fits my needs. As i suspected, i have to say the needed commands before "%sudo". And i can also restrict group sudo to rm and /usr/sbin/usermod . It is not everyday that i need to edit /e/sudoers so it took a while. Maybe i shouldn't quit my day-job.

#230 Re: DIY » sudo and slim » 2023-01-28 15:01:26

Head_on_a_Stick wrote:
nahkhiirmees wrote:

Unfortunately something happened to my old computer so that it became non-compatible with GRUB

Sounds unlikely. Feel free to open a new thread about that.

With AMD's 3-core Phenom, built in 2009 it is a possibility that in 2020'ies the hardware starts to break down. One day i had complaints from every https site i tried to visit. The reason was:the hardware decided that current time is january 2002. Combine that with the fact that suddendly booting .iso images made with grub-mkrescue was not an option anymore, at least under VirtualBox. Changing the motherboard's battery won't help much if BIOS/UEFI decides to forget how to boot at all.

Bit off-topic though.

#231 Re: DIY » sudo and slim » 2023-01-28 14:44:02

So i'm the only one here who has broken slim?-)

#232 Re: DIY » sudo and slim » 2023-01-28 14:42:08

I tried again today. It seems that with these contents as /etc/sudoers:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "@include" directives:

@includedir /etc/sudoers.d

i am able to rm /etc/sudoers.d/live and still log in to slim. Even remove user devuan from group sudo with usermod and still log in.
So it's either wrong contents in /e/sudoers or something else. The problem is:i need to say sudo /sbin/{ifup,ifdown,shutdown} but sudoers seem too fragile to alter.

I guess i should spend some time with "man sudo".

#233 Re: DIY » sudo and slim » 2023-01-27 20:57:48

Head_on_a_Stick wrote:

Why not build an ISO from scratch instead? I think Refracta has tools for that. I use Debian's live-build myself, which works really well.

I have noticed that GRUB can loop mount files. So i can dump my "/" into a file and use grub-mkrescue to make an .iso which contains that file.
Unfortunately something happened to my old computer so that it became non-compatible with GRUB. So i have been stuck with isolinux and pre-existing distros.
My current computer should be in better shape so i would like to think that using GRUB is an option. Maybe i try that Refracta-thing some day.

#234 Re: DIY » sudo and slim » 2023-01-27 20:45:46

Head_on_a_Stick wrote:

It's really not worth bothering with though because it runs X under the root user. My live ISO images used startx from a console login to get X running under the normal user and remove a layer of needless bloat.

No idea how to configure SLiM though, sorry. I wouldn't touch that software with your 10 foot barge pole big_smile

It happens that i have been considering to use devuan minimal live as a base for modifications. So now i have a good reason for that move.
It just takes time and effort.

#235 Re: DIY » sudo and slim » 2023-01-27 20:37:19

I know for a fact that there are some problems with the modified filesystem.squashfs . When i chrooted into the directory that contained extracted contents, and tried to do stuff(removing and installing packages for example), i received enormous amount of complaints from sudo. I got them fixed, for example owners and rights of /usr/bin/sudo and contents of /etc/hosts . But either there's still some things unfixed or collateral damage caused by the commands i used to fix sudo.

It seems that i have a tendency to break slim smile
It would be very useful to find out how to fix it also.

#236 Re: DIY » sudo and slim » 2023-01-27 19:45:28

Any ideas how to fix logging in with slim? What kind of information is needed to fix the aforementioned situation?

grep -v '#' /etc/slim.conf 
default_path        /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
default_xserver     /usr/bin/X11/X
xserver_arguments   -nolisten tcp

halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue.net; exec /bin/login"

xauth_path         /usr/bin/X11/xauth

authfile           /var/run/slim.auth

login_cmd           exec /bin/bash -login /etc/X11/Xsession %session

sessionstart_cmd exec 	/usr/bin/sessreg -a -l "$DISPLAY" %user
sessionstop_cmd exec 	/usr/bin/sessreg -d -l "$DISPLAY" %user

sessiondir            /usr/share/xsessions/

screenshot_cmd      scrot /root/slim.png

welcome_msg         Welcome to %host

shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

default_user devuan

default_user devuan

auto_login yes

current_theme       desktop-slim-theme

lockfile            /var/run/slim.lock

logfile             /var/log/slim.log

Chimaera's /etc/slim.conf is a bit messy so i grepped out lines containing "#". How should the owner and rights of /var/log be? And how about /usr/bin or /etc/X11 ?
I think i have broken the contents of filesystem.squashfs somehow so either i find out how to fix the situation or start from scratch. Former seems better for me. I'm not a teenage nerd anymore so i don't have endless supply of energy to tinker.

#237 Re: DIY » sudo and slim » 2023-01-27 19:30:41

Head_on_a_Stick wrote:
nahkhiirmees wrote:

The livecd i tried is modified devuan chimaera.

Can you be more specific? Looks like you broke it big_smile

I guess i have to upload the .iso image somewhere to be precise enough with what i mean by "modifications".

#238 Re: DIY » sudo and slim » 2023-01-27 19:24:39

I tried with an unmodified devuan chimaera live dvd. I removed devuan from group sudo with usermod. And was able to log in after logging out.
Also removed /etc/sudoers.d/live and logged out. Still was able to log in.

So it seems that the modifications are to blame.

#240 Re: DIY » sudo and slim » 2023-01-27 18:09:48

Head_on_a_Stick wrote:
nahkhiirmees wrote:

So first i thought that i'll remove user "devuan" from group sudo. After that i couldn't log in.

I cannot reproduce that with devuan_chimaera_4.0.2_amd64_desktop-live.iso.

I used

sudo gpasswd -d devuan sudo

Then logged out and was able to log in again via SLiM with no problems.

What were the exact commands you used? Was this with a stock ISO image?

First i used "sudo usermod -G devuan,cdrom,floppy,audio,dip,video,plugdev,netdev devuan" . After that i locked out and i could not back log in as "devuan" .
Also tried commenting out "%sudo    ALL=(ALL:ALL) ALL" in /etc/sudoers . That locked me out too.
The livecd i tried is modified devuan chimaera. I'll soon test an unmodified chimaera dvd too, just in case.

#241 Re: Off-topic » Music » 2023-01-27 17:52:58

nahkhiirmees wrote:

https://www.youtube.com/watch?v=c7kMYeiF5fs Drudkh - A Furrow Cut Short
not so much into Drudkh but this one i like.

This sounds interesting also:

https://www.youtube.com/watch?v=JNWUMsrNp7w Drudkh - U Dakhiv Irzhavim Kolossyu (official premiere)

for some reason guitar parts in the beginning remind me of Megadeth. Maybe same kind of chord progression or something.

#242 Re: Off-topic » What are you reading/want to read ? » 2023-01-27 17:45:52

Liu Cixin:Ball Lightning . I''l strongly recommend. I have been reading books by Alastair Reynolds but L.C is my new favourite now.
Recently i noticed that there's a copy of "linux system programming" in the local library. Maybe i'll read that some day.

#243 DIY » sudo and slim » 2023-01-27 17:40:08

nahkhiirmees
Replies: 32

Thinking aloud:

i'm working on making my own version of Devuan livecd. Remove packages i don't need, add some that i need, change keyboard settings and so on.
One thing is that i don't actually need to run every command with no password as user "devuan". But on the other hand it would be very nice to be able to log in and out of slim. So first i thought that i'll remove user "devuan" from group sudo. After that i couldn't log in.
Removing file "live" under /etc/sudoers.d or removing "@includedir /etc/sudoers.d" from /etc/sudoers on the other hand doesn't seem to restrict superuser-capabilities from devuan.

So how should i approach this thing? Is it absolutely necessary for "devuan" to belong in group "sudo" to be able to log in with slim?

#244 Devuan » what's going on with aufs? » 2023-01-27 17:30:53

nahkhiirmees
Replies: 4

Couple of years ago i found something called "auroot".
Lately i thought that "i'll try it, i may have an use case".
Well:

apt-cache search aufs
bilibop-common - shell functions for bilibop scripts
bilibop-lockfs - lock filesystems and write changes into RAM
mergerfs - another FUSE union filesystem

. So it looks like that i have to use another distribution's repository.
I have been planning to ask from this forum what's going on with aufs and Devuan.
But:

https://aufs.sourceforge.net/

mostly "unsupported since xxx" and "EOL" does not sound good to me. Have anyone tried this "mergerfs"-package? what do you think?

I guess i could use lvm snapshot with chroot but there is some complications with ext3/ext4 and lvm snapshots. Unmounting fs before making snapshot seems to be necessary but not sufficient...

#245 DIY » init script for stubby » 2022-10-24 20:45:01

nahkhiirmees
Replies: 8

Couple months ago i tried dnsmasq and stubby. During that time i noticed that there's no init script for stubby so i wrote one:

#!/bin/sh

### BEGIN INIT INFO
# Provides: stubby
# Required-Start: $network $remote_fs $syslog
# Required-Stop:  $network $remote_fs $syslog
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Description: a dns resolver
### END INIT INFO

#. /lib/lsb/init-functions

case "$1" in
  start)
	touch /run/stubby.pid
	chmod 600 /run/stubby.pid
	chown stubby:65534 /run/stubby.pid
	sudo -u stubby stubby -g
	;;
 stop)
	killall stubby
        ;;
  *)
        echo "Usage: $SCRIPTNAME start" >&2
        exit 3
        ;;
esac

pretty obvious stuff. The #BEGIN ... #END - parts i copied from dnsmasq's init file or some other file and changed a few rows.
How about adding something like this in the stubby package?

#246 Re: DIY » /etc/network/interfaces vs dhclient -s » 2022-07-29 18:12:07

I know how to use "reject" in dhclient.conf .
When i say "/sbin/ifup eth0" , ifup starts dhclient and that sends DHCPDISCOVER-message to broadcast address.
The "reject" - statement reject responses from unwanted servers.

On the other hand, if dhclient sends DHCPDISCOVER-messages only to a server mentioned in "-s" option , "reject" may not be necessary.

(man page of dhclient says: "  -s server-addr
              Specify  the server IP address or fully qualified domain name to
              use as a destination for DHCP protocol messages before  dhclient
              has  acquired an IP address.  Normally, dhclient transmits these
              messages to 255.255.255.255 (the IP limited broadcast  address)")

That made me think, how can i pass "-s server" to dhclient from ifup? I'm yet to figure out if it is even possible.
Those "up", "pre-up" , "manual" keywords in /etc/network/interfaces seemed interesting. Maybe with those i could gain more control, how i set up network interface.

Command "dhclient -s something" by itself is not enough to activate the interface and associate ip address with it. I have tried.

I don't actually need this thing i'm trying. I just like to find out another way of doing things. (Just using /etc/network/interfaces instead of NetworkManager is not radical enough smile
I have read /usr/share/doc/ifupdown/examples  and it seems that it does not contain exactly the thing i'm after .

#247 Re: Installation » [SOLVED] moving /-partition to LVM after installation (Devuan 4) » 2022-07-28 16:01:46

Maybe that "?id=2323"-link was the "trick" i was looking for last sunday.
I'll have to try those "askubuntu.com" and "ogris.de"- links also. Managed to change the passphrases for partitions by using livecd.

#248 Re: DIY » /etc/network/interfaces vs dhclient -s » 2022-07-28 15:51:58

Ok, i found out that i can alter iptables rules without activating ethernet interface. So chicken-and-egg can be avoided. But i'm not sure that iptables rules i added, are restricting packets from port 67. I'll try again later.

#249 Re: DIY » /etc/network/interfaces vs dhclient -s » 2022-07-27 17:20:25

Is it possible to restrict the target address where dhclient sends DHCPDISCOVER messages?
The output of "/sbin/dhclient --help" and https://linux.die.net/man/5/dhclient-options part "option dhcp-server-identifier ip-address; " make me think it is possible.
Ok i guess i could try with iptables, drop ports 67,68 from all unwanted servers or accept only from the server i want to. But for iptables to work, i have to set up the network interface eth0 , right? Kind of a chicken-and-egg situation.

#250 Re: Installation » [SOLVED] moving /-partition to LVM after installation (Devuan 4) » 2022-07-27 16:01:33

Marjorie wrote:

Just checking.

Can you post the code for your
/etc/fstab,
the primary menuentry from /etc/boot/grub/grub.cfg
the results of sudo blkid
and the results of sudo fdisk -l?

I'm wondering whether with your copying root partition contents around the UUID have got misaligned or you are using the wrong /dev/ (LVM vols. are usually on /dev/mapper/)

During last weekend i tried more than once, to copy the contents of / to a logical volume(with cp -a , one directory at a time). And update initrd and GRUB menu. It is possible that something went wrong while copying or there were wrong UUIDs in grub.cfg for a while.  But that's not the whole story. I noticed that new entries for new root were wrong in a sense that there weren't any lines for loading luks drivers. (Forgot to mention in 1st message that / partition and PV were "inside" luks.)

I suspect that initrd/initramfs doesn't activate LVM for some reason. Since i could make PV and VG and LVs after installation, the lvm2 package should be ok.

Board footer

Forum Software