After tinkering with Haiku nightly, I discovered an odd behavior with su
. Steps to reproduce:
- Launch a Terminal GUI.
- Run
su vagrant
or similar, to temporarily lose root privileges. - Within the
su vagrant
context, runsu user -c 'pkgman refresh'
.
Expected:
su
refreshes the repository data.
Observed:
su
silently fails to escalate privileges to user
-level permissions, resulting in the pkgman refresh
command erroring with *** request for refreshing repository "Haiku" failed : Initialization failed
The su
help message describes the command line syntax as usage: su [-pl] [-c command] [username]
, so I also tried su -c 'pkgman refresh' user
, in case su
was really expecting usernames to appear after the command, but I get the same behavior either way.
The larger goal I’m trying to accomplish is to integrate Haiku into a Vagrant virtual machine, which typically expects a vagrant
user account. Funny that alpha 4 was able to use multiple accounts more easily. Ah well, I think I may just stick with the single user
account for Haiku nightly, since su
broke somehow.