Hi.
I think xenodm(1) should setup login class on login. Here is an example
what I mean:
Pretty fresh OpenBSD install:
# sysctl -n kern.version
OpenBSD 7.9-current (GENERIC.MP) #506: Sun May 24 00:04:56 MDT 2026
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
# grep xeno /etc/rc.conf.local
xenodm_flags=
Login class file, as config drop in:
# cat -n /etc/login.conf.d/mkucharski
1 # /etc/login.conf.d/mkucharski
2 mkucharski:\
3 :setenv=SAMPLE_ENV_VAR=this/set/env/works:\
4 :maxproc-max=4096:\
5 :maxproc-cur=2048:\
6 :openfiles-max=4096:\
7 :openfiles-cur=2048:\
8 :datasize-max=6144M:\
9 :datasize-cur=3584M:\
10 :tc=default:
# file /etc/login.conf.db
/etc/login.conf.db: cannot stat '/etc/login.conf.db' (No such file or directory)
# grep -w mkucharski /etc/passwd
mkucharski:*:5001:5001::/home/mkucharski:/bin/ksh
# grep -w mkucharski /etc/master.passwd | cut -d: -f1,3-
mkucharski:5001:5001:mkucharski:0:0::/home/mkucharski:/bin/ksh
Now, I'm using SAMPLE_ENV_VAR to show the unexpected behaviour with
xenodm(1).
1. Login via glass console over /dev/ttyC1:
$ env | grep -i sample
SAMPLE_ENV_VAR=this/set/env/works
2. Login via `su -l mkucharski` from `root` super user:
# su -l mkucharski
$ env | grep -i sample
SAMPLE_ENV_VAR=this/set/env/works
3. Login via xenodm(1):
$ env | grep -ci sample
0
Above behaviour is unexpected.
4. Creating the binary database file doesn't help:
# cap_mkdb /etc/login.conf
# file /etc/login.conf.db
/etc/login.conf.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
With above file present, login via xenodm(1) still doesn't set
SAMPLE_ENV_VAR environment variable.
5. However reading login.conf(5) I would expect that what is in drop-in
config, will end up in the database file, however I don't see it:
# strings /etc/login.conf.db | grep -ci works
0
# strings /etc/login.conf.db | grep -ci sample
0
--
Regards,
Mikolaj