You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the reason is of course because osh doesn't support --login or -l, which - is an alias of,
you can also replicate an error with su - user -s /path/osh
being the noob that I am, I would just patch here if upstream doesn't he:
add su to recognised incoming applet names. After all, su is pretty ancient, ubiquitous and will be there if macro checks for
__linux or __POSIX or whatever :d
then just deal with whatever... although once that is solved, I assum eit's because you most likely , should , in thename of
interoperability, add --login,-l as silent parsers instead of exiting. By this I mean, if you only want a single entrypoint (no /etc/profile vs. all kinds of various paths), I get that, AND document it.. BUT allow for the flag at least to silently be a no-op
that way one can still use scripts doing chroot $SHELL --login .... bla bla wihtout osh being the odd one out.
Of course, someone might at first get bitten in the bum regarding oh, why wasn't /etc/profile read, but this happens with ANY shell tbh, and people just assume stuff because they are used to certain systems setup. :)
One you have allowed the -l (no-op or whatever), then su becomes trivial (I think).
I would love to help but 2 things, timeeeee as I do so much but also, .
Still, I can whilst I am patching some other shell code, grab yours and have a look if anything.
$ sudo useradd --shell /usr/local/bin/osh osh-user
andy@lenny:~/git/oilshell/oil$ sudo su -l osh-user
No directory, logging in with HOME=/
oil: Invalid applet name 'su'.
It works for
su user
, but notsu - user
orsu -l user
.It works fine with dash.
Found it while investigating #318.
The text was updated successfully, but these errors were encountered: