Hi there,

I've run into the problem multiple times now that lxc-attach can't
detect the default shell of my current user properly, since the NSS
implementations of host and container are incompatible.

One of the patches I just sent to the list mitigates that by having a
fallback - use /bin/sh. The only trouble is that calling any modern
shell as /bin/sh will usually not result in a very user-friendly interface.

So my idea would actually be to introduce an additional fallback: glibc
comes with an additional binary getent(1) that allows one to query the
NSS directly. If getpwuid() doesn't work directly, lxc-attach could
spawn "getent passwd %d" and parse the output to figure out the correct
login shell of the user. That will also not work in all cases, but then
we may still fall back on /bin/sh as a last resort.

Do you think implementing that is worthwhile?

-- Christian

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to