diff --git a/config/galaxy.ini.sample b/config/galaxy.ini.sample index 6fc63dc61ca..8ca5d65f3f0 100644 --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -1315,7 +1315,10 @@ use_interactive = True # or the username which are both stored in the Galaxy data base. # The latter option is particularly useful for installations that get the # authentication from LDAP. -# Possible values are user_email (default) and username. +# Also, Galaxy can accept the name of a common system user (eg. galaxy_worker) +# who can run every job being submitted. This user should not be the same user +# running the galaxy system. +# Possible values are user_email (default), username or #real_system_username = user_email # File to source to set up the environment when running jobs. By default, the diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index dfae6f3b6b2..a93f81dd226 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -204,8 +204,12 @@ class User( object, Dictifiable ): except KeyError: pass else: - log.warning("invalid configuration of real_system_username") - system_user_pwent = None + try: + system_user_pwent = pwd.getpwnam(real_system_username) + except KeyError: + log.warning("invalid configuration of real_system_username") + system_user_pwent = None + pass return system_user_pwent def all_roles( self ):