Article 6EQQP Can env variable source with no shell ?

Can env variable source with no shell ?

by
james000
from LinuxQuestions.org on (#6EQQP)
We have some service accounts/users created on RHEL/Centos servers. As they are service accounts, their shells are kept as nologin. Whenever apps guys wants to work on their service accounts, either they will do it with run-as (sudo -u svc-acct command) or they will switch to that user (sudo -su svc-acct) and then they do their work as svc-acct.
But one limitation with second option is, it will not source the environment variables, which they have in bash_profile of that user.
Is there any way, env variables can be sourced and we wouldn't have to give them bash shell ?
Advice please.
Thanks
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments