change session's login shell

Frank Van Damme <[email protected]>
Newsgroups gmane.linux.pam
Message-ID <CAMZ22eLLgqHZ8o=6Y0V59iuf_fUHHafDHBaRKTCQJMUh_dccaA@mail.gmail.com>
List,

I'd like to change a user's shell based on group membership. The group
membership is no problem - that's what pam_listfile is for. Changing
the shell, however, seems non-obvious. I've looked at the source code
of pam_unix and it provides the path to the users login shell
according to /etc/passwd, so it should be possible for a pam module to
set the shell to an arbitrary value, right?

Still, there's no module like this. For those wondering "why", my use
case is users with only scp access on one server and full shell on
another.

-- 
Frank Van Damme
No part of this copyright message may be reproduced, read or seen,
dead or alive or by any means, including but not limited to telepathy
without the benevolence of the author.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.