-
jauntyd
-
VimDiesel
Title: FreeBSD Journal DE May/June 2023
-
DarkUranium
Q. Is there a shorthand to `su` to another user, but using a non-default shell? I basically wants effects of `-m` (w.r.t. env vars), but using /bin/sh instead of the default /usr/sbin/nologin.
-
DarkUranium
Err. The effects of `-l`.
-
DarkUranium
Ideally `-l`. But `-m` works.
-
DarkUranium
I just realized I mangled two questions into one.
-
DarkUranium
1) Using an alternative shell as another user.
-
DarkUranium
2) Wiping env vars, login shell-esque.
-
DarkUranium
I know there's `doas` in ports, but I'm looking for something in the core system. If possible.
-
parv
su user; exec /whatever/shell; . /shell/rc
-
DarkUranium
parv: `su user` won't work when the account has /usr/sbin/nologin.
-
DarkUranium
I guess I can with `-m`.
-
DarkUranium
But that still leaves all the old envvars.
-
DarkUranium
(tl;dr I need to do some tasks as `www`)
-
DarkUranium
I could temporarily `chsh` it, but I'm asking about a different solution, something more elegant.
-
parv
There is allowance for a specific login class via "-c" option
-
parv
Just noticed "-l" & "-m" options are mutually exclusive
-
DarkUranium
They are, yes.
-
DarkUranium
(-lm & -ml was the first thing I tried)
-
DarkUranium
I still get "This account is not currently available." if I just try -c. `-m -c` does not clear env vars.
-
meena
DarkUranium: you could take a look at what rc.subr does
-
meena
(short answer: It commits crimes.)
-
DarkUranium
lmao
-
meena
here's a snippet: limits -C $_login_class $_limits nice -n $_nice setfib -F $_fib env $_env chroot -u $_user -g $_group -G $_groups $_chroot command...
-
meena
and that's a sanitized version
-
meena
i think env wipes the ENV, but I'm not a 100% on that
-
meena
i think I copied the wrong line
-
meena
oh, right, env -i PATH=$PATH HOME=/home/user su -m -c /bin/sh -c blah should give you a clean environment
-
meena
note that we execute env -i to clear the environment, and su -m to leave it unmodified
-
meena
DarkUranium: that criminal enough to work for you?
-
llua
prob want to set TERM too
-
meena
llua: i haven't scrolled back far enough to figure out what they're trying to do. I just provided an example
-
» meena goes actually looking at rc.subr and immediately takes a fork to her eyes
-
meena
wtf.
-
DarkUranium
llua: and USER+GROUP
-
» DarkUranium gave up and just installed `doas`
-
meena
DarkUranium: probably a wise choice given the amount of hacks you'd have to layer on top of each other to make this work.
-
DarkUranium
I feel like FreeBSD *should* have something of this sort in the core.
-
DarkUranium
Akin to GNU's `su -s`
-
DarkUranium
(not a fan of GNU normally, but that's one of the first things I ever missed!)
-
meena
DarkUranium: patches welcome… I'm busy with planning to rip out all of /etc/rc.* and burn it down in a cleansing ritual
-
DarkUranium
lmao
-
DarkUranium
(alternatively, `doas` in core would also work, but y'know)
-
meena
maybe replace it with something less sh-it. but first, I just want to burn it all down.
-
DarkUranium
Understandable.
-
DarkUranium
Well, rc.d isn't too bad. But a lot of the rest is.
-
meena
have you read /etc/rc.subr?
-
DarkUranium
I wish I hadn't.
-
DarkUranium
What I mean is, the service stuff in /etc/rc.d isn't too bad.
-
meena
i say that every time i do
-
DarkUranium
Ha.
-
DarkUranium
Obviously, you should just switch to systemd (/s)
-
meena
yeah, that's not too bad, but some services do waaaaaaaaay too much
-
DarkUranium
(lots and lots of /s)
-
DarkUranium
Fair.
-
meena
DarkUranium: systemd isn't too bad. I just don't like the design, the implementation, the documentation and the community management.
-
meena
the idea is okay, but the idea is nothing new, and probably something we desperately need.
-
meena
Solaris has had it for 10? 15? years? When was Solaris 10 released?
-
meena
Windows (NT) has had it since probably … ever.
-
jgh
and AIX. Not that this is any form of recommendation
-
meena
jgh: yeah, i've used AIX for about 2 weeks, and that was more than enough.
-
meena
OTOH, that might have had to do with the environment i was in…
-
cpet
Mmm aix
-
Demosthenex
mmmm aix
-
mariuss
AIX and pains
-
Demosthenex
i'd say it's the gold standard for what it does. but its only a server, not a desktop.
-
Demosthenex
boring. stable. unchanging.
-
Demosthenex
really wish more of my customers made the low end systems all freebsd, with critical big produciton on aix. it'd be a remarkable world
-
Demosthenex
they can keep linux on the desktop, where it only affects one user at a time
-
Demosthenex
since that's been the goal of all the linux distros. dumb linux down until it's only suitable as a desktop
-
Demosthenex
i'm surprised between gnome and systemd they didn't just say "run everything as root, we only want single user anyway"
-
DarkUranium
Has anyone managed to get Passbolt to run successfully on FreeBSD?
-
DarkUranium
(or, alternatively, know of good self-hosted password managers)
-
Demosthenex
DarkUranium: pwsafe.
-
DarkUranium
Seems to be Windows-only?
-
Demosthenex
-
VimDiesel
Title: GitHub - nsd20463/pwsafe: commandline tool compatible with Counterpane's Passwordsafe
-
Demosthenex
single binary. single file. only clipboard integration.
-
Demosthenex
no hosting, no servers, no browsers, no web servers, no networking, no frills.
-
V_PauAmma_V
DarkUranium, I use keepassxc.
-
Demosthenex
it's a pkg too! nice. pwsafe-0.2.2.b.196
-
DarkUranium
Demosthenex: well, I need something that works on my phone + desktop + laptop. hence, hosted.
-
Demosthenex
syncthing + pwsaf.e
-
Demosthenex
i can't endorse any network enabled password manager. it's just a disaster waiting to happen
-
markmcb
first post freebsd-update ... the console is hung after "32-bit compatibility ldconfig path: /usr/lib32" ... no errors I can see ... do I just power cycle again and hope for the best?
-
markmcb
*first reboot
-
Demosthenex
markmcb: from what to what?
-
markmcb
13.2-p0 to p1
-
Demosthenex
try again, and if that doesn't work, bectl back a version
-
markmcb
ok, will do, thanks
-
DarkUranium
Demosthenex: I use Seafile, but that's kind of a problem for Android.
-
Demosthenex
i hadn't seen that one before
-
Demosthenex
i was using nextcloud... but i'm about to ditch it
-
markmcb
Demosthenex: it booted after the 2nd power cycle, thanks
-
Demosthenex
i think that i can replace it with radicale, syncthing, and keep ejabberd
-
markmcb
+1 for Syncthing
-
Demosthenex
markmcb: i was hesitant regarding syncthing
-
Demosthenex
but after i reviewed it a bit more, it seems ok
-
Demosthenex
my nextcloud instance on devuan is STUCK at v23, and v26 is current. they provide no upgrade path at all
-
Demosthenex
i'd need to upgrade 23 to 24, 24 to 25, 25 to 26. and that requires a php upgrade which i can't do because that devuan is out of support, completely
-
markmcb
i've been running syncthing for years with 20TiB+ data, it's been solid for me
-
Demosthenex
it's not worth the hassle to do a manual compile/install
-
Demosthenex
markmcb: i was suspicious of the server, port forwarding, whether it was also diseased with webdav, etc.
-
Demosthenex
i think my only lingering reservation is that it uses go
-
markmcb
one thing i've noticed is it seems slower to notice file changes on freebsd vs. linux. i don't know all the file watching details, so not sure why. everything else seems the same.
-
Demosthenex
markmcb: may need to check what technique it's using to watch for changes. inotify, etc. its different on linux vs freebsd
-
markmcb
yeah, kqueue i believe is the freebsd mechanism. it's not bad, but i've noticed if i change a few big files at the same time, it can be several minutes before ST on freebsd notices and begins to act. not sure if that's a watching issue, or something else going on. it all still works fine though. so it's a minor gap.
-
Demosthenex
i think for mobile sync ST shouldn't react instantly
-
Demosthenex
anyway, nextcloud has been such high maintenance and flips over versions so fast, and my users really only used the web interface to exchange files on occasion, i think i can do better to separate ejabberd to standalone, syncthing for files if needed, and radicale for caldav/carddav sync
-
Demosthenex
worst part is the addon apps for nextcloud seem to break every version upgrade, so it's really high maint
-
Demosthenex
guess i shouldn't expect much from php :P
-
markmcb
not sure who handles the website, but the RSS links on the security feed have an extra "/" after the domain, e.g.,
freebsd.org//security/advisories/FreeBSD-SA-23:05.openssh.asc
-
markmcb
it made the cli browser "links" get stuck in a redirect loop
-
markmcb
-
VimDiesel
Title: 272132 – Extra Slash in RSS Feed Item Links
-
markmcb
Does that make me an official FreeBSD'er? lol
-
cpet
markmcb: that shouldnt matter
-
markmcb
it does because it triggers a redirect on the server
-
markmcb
i.e., open that double slash link and you'll see it redirect to the correct single slash URL
-
markmcb
if you open it in links, you'll get: Error loading
freebsd.org//security/advisories/FreeBSD-SA-23:05.openssh.asc: Cyclic redirect
-
cpet
That's a feature not a bug
-
RhodiumToad
kqueue as a file change notification mechanism only works well on small trees
-
RhodiumToad
the lack of a mechanism that works on large trees is a source of constant annoyance, to me at least
-
linext
can anyone explain how to fix this error?
ibb.co/xGWw4fW
-
VimDiesel
Title: vmplayer-X16-PWp-AUx-P hosted at ImgBB — ImgBB
-
RhodiumToad
what's the error?
-
linext
usb ethernet card link state toggles between up and down very quickly
-
RhodiumToad
I mean, it's reporting that the ethernet dongle is reporting that the link state is changing
-
RhodiumToad
is the cable properly connected? is the device on the other end good?
-
linext
is it just a warning message?
-
linext
yes, i tested the usb ethernet adapter in windows and it works fine there
-
RhodiumToad
what type of device?
-
linext
i tested it on an intel mini PC and also in vmware using a virutal machine
-
RhodiumToad
what type of device is the ethernet adapter?
-
linext
USB
-
linext
gigabit
-
RhodiumToad
usbconfig -d ugenX.Y dump_device_desc (use usbconfig on its own to see the ugen* ids by device)
-
markmcb
cpet: not sure if you're joking or not, but i'm fairly certain a path starting with // is invalid as that is reserved for the authority component, i.e., /path//to/file is ok, but //path/to/file is not
-
linext
what'
-
linext
what's the command to force an adapter to get an IP address via DHCP?
-
linext
dhclient ue0 worked
-
rwp
markmcb, As a practical matter I do not see any error with lynx (you mentioned lynx) with that URL. It gets the redirect, follows it, and then displays the contents. Works for me.
-
markmcb
rwp: i used links, no lynx
-
rwp
links not lynx. Gotcha. I can reproduce the problem. This appears to me like a bug in links.
-
markmcb
perhaps. it's still a malformed URL regardless
-
markmcb
a redirect should not be required
-
meena
-
VimDiesel
Title: 272129 – rc.d/kld should run before rc.d/sysctl
-
rwp
I definitely agree that if the source is fixed to not include the troublesome //security then the problem will be avoided.
-
meena
the claims in
reviews.freebsd.org/D25601 feel counter to everything I've read here, and in rc.conf(5) and loader.conf(5)
-
VimDiesel
Title: ⚙ D25601 rc.d/kld: Set sysctls after loading modules.
-
markmcb
rwp: just did a curl -I. the redirect looks correct, i.e., 301 with the correct path. so you're right, it's probably a links bug too
-
cpet
chris@daemon:~ % cd //
-
cpet
chris@daemon:/ % cd ///
-
cpet
chris@daemon:/ % cd ////////
-
cpet
chris@daemon:/ %
-
cpet
you sure about that ?
-
markmcb
that's not a URL :)
-
cpet
cpet: not sure if you're joking or not, but i'm fairly certain a path starting with // is invalid as that is reserved for the authority component, i.e., /path//to/file is ok, but //path/to/file is not
-
cpet
now youre mentioning URL's
-
rwp
cpet, Also a caution that in file system namespace exactly two slashes at the front "//foo" is special because that designates the next thing to be a hostname in some network file system environments in a system dependent or system defined context.
-
rwp
But markmcb is talking about URLs and in the source HTML emitted whether it is pedantically allowed there or not having that cleaned up would avoid the problem with links entirely.
-
rwp
And then I think additionally links is not handling the redirect correct. I did not look at the code but it appears by behavior that it has a / on the end of the hostname and then appends the Location redirect header location to it.
-
cpet
bleh he said path path != URL
-
rwp
How come I understood that it was a URL all along then? (shrug)
-
markmcb
cpet: path is a component of a URL
-
cpet
is it now ?
-
rwp
It is described that way. Yes.
en.wikipedia.org/wiki/URL
-
VimDiesel
Title: URL - Wikipedia
-
cpet
A path component, consisting of a sequence of path segments separated by a slash (/). A path is always defined for a URI, though the defined path may be empty (zero length). A segment may also be empty, resulting in two consecutive slashes (//) in the path component. A path component may resemble or map exactly to a file system path but does not always imply a relation to one. If an authority component is defined, then the path
-
cpet
component must either be empty or begin with a slash (/). If an authority component is undefined, then the path cannot begin with an empty segment—that is, with two slashes (//)—since the following characters would be interpreted as an authority component.[18]
-
dvl
I'm updating a FreeBSD 13.1 host to 13.2 - does not boot. I get "Mounting from zfs:zroot/ROOT/FOO failed with error 6" - it boots fine back into 13.1 using that old BE. It was suggested it might be an old ZFS label. Details at
twitter.com/vmisev/status/1671532851462914048
-
rwp
Historically the reason why file system //something is special is Apollo Domain Aegis OS used it for their networked file system. And so POSIX wrote that as allowed into the standard spec. Though no living OS uses it that way now I suspect that some day some OS will start using it that way again.
-
VimDiesel
Title: Vladimir Mišev on Twitter: "@DLangille pls see:
t.co/OTo1FJknGt" / Twitter
-
cpet
ok cool
-
luke86
markmcb: looks like it's just links incorrectly handling redirects? the header looks fine and it works with any other browser
-
cpet
twitter is a sin of all sins
-
cpet
or something
-
rwp
Two problems: 1) URL format problem 2) links redirect handling problem
-
cpet
im sure the PR is enough and itll get fixed when it gets fixed
-
cpet
moving along
-
rwp
I admit to being quite annoyed with the terseness of "failed with error 6" which I have seen myself before too.
-
rwp
It looks like the system is a GPT system. The GPT labels appear to be null, listed as "(null)" there, so no idea what was used to create the pool.
-
RhodiumToad
in what context?
-
rwp
-
VimDiesel
Title: 271989 – zfs root mount error 6 after upgrade from 11.1-release to 13.2-release
-
rwp
Oh, it's nvd0p3 and nvd1p3 using the disk slices. Gotcha. Those are probably stable but can move. Using GPT labels is a recommended best-practice to avoid that but either should work okay.
-
rwp
Going directly from 11 to 13 skipping 12 makes me too nervous for words though. If it were me I would upgrade from 11 to 12 verify things are happen, zpool upgrade at that point, verify still happy, then upgrade from 12 to 13.
-
rwp
dvl, Is there a reason to skip 12? That would seem to be the more well traveled path.
-
RhodiumToad
that wouldn't have helped
-
dvl
rwp: I am not skipping 12. The PR is not mine.
-
dvl
rwp: It was suggested it MIGHT apply to my situation.
-
dvl
I have booted with zfs debug on. Reading my screen shots from that now.
-
dvl
rwp: FYI, those are not my disks either. ;)
-
dvl
I am getting guid mismatch on boot.
-
dvl
-
VimDiesel
Title: Dan Langille @dvl⊙bn on Twitter: "@vmisev This does not seem reasonable. guid mismatch
t.co/2SQtkGh8iG" / Twitter
-
RhodiumToad
can you show the messages around the very first attach
-
dvl
RhodiumToad: I may have missed them, but I have more screen shots to share
-
dvl
-
VimDiesel
Title: Dan Langille @dvl⊙bn on Twitter: "@vmisev I'll now post all the screen shots I have, in order. 1.07.16 PM
t.co/GXYlgukAoQ" / Twitter
-
dvl
running out of battery here This is going on hold until later. I will read what you say later. Thanks.
-
markmcb
i see the release notes for major releases. is there something similar for p1, p2, etc.? or just the errata on the release notes?
-
cpet
Security notes are for patch releases
-
markmcb
got it. so there's no consolidated view of everything that changed with 13.2-RELEASE-p1 on the site, it's just the collection of advisories?
-
cpet
Isn't that what a patch release is ?
-
markmcb
I don't know. This is my first patch with FreeBSD. The system gave a list of everything changing when I did the update. I'm just wondering if there's a web link to something similar, i.e., "p1" resource. As far as I can tell, there is not.
-
linext
the problem i reported earlier appears to be in opnsense, not freebsd
-
linext
-
VimDiesel
Title: USB Ethernet Link toggles between up and down repeatedly · Issue #6628 · opnsense/core · GitHub
-
VimDiesel
6628 – Tyan Tomcat III locks SMP-GENERIC kernel, 3.0-980426-SNAP
bugs.freebsd.org/bugzilla/show_bug.cgi?id=6628
-
yourfate
with packages like samba413 / samba416 etc, can I tell pkg to just install the latest, and also upgrade to newer ones?
-
yourfate
like just, samba-latest
-
RhodiumToad
when the version number is part of the package name like that, it means that the packages are not compatible
-
RhodiumToad
i.e. you can't substitute samba416 if some other program depends on samba413 (whether you can install both at once depends on the package)
-
yourfate
hm right
-
RhodiumToad
whereas foo-1.2 and foo-2.2 are expected to be compatible and will automatically be upgraded to the latest
-
Demosthenex
hrm, anyone know a log analyzer that isn't some enormous webstack? maybe like visidata for syslog?
-
cpet
cat grep sed color codes and beer
-
Demosthenex
cpet: i agree with you, i view at cli all day. but others have to view them sometimes too, and i don't want to setup something huge like greylog or ELK
-
cpet
Automate pf does a very good job at keeping those out
-
meena
RhodiumToad, upgrading across major versions sounds rather dangerous to me
-
RhodiumToad
meena: ?
-
meena
RhodiumToad: it was about "whereas foo-1.2 and foo-2.2 are expected to be compatible and will automatically be upgraded to the latest"
-
meena
either way, I think I'm giving up on flua as shell script replacement tonight
-
RhodiumToad
huh
-
markmcb
just an observation, the user groups page is a graveyard of bad links. the first three i clicked on were dead.
-
meena
RhodiumToad: i'm way out of practice with lua, and some things are kinda surprising… like, there's no string split function