# Submit job as different user?

**URL:** <https://community.openpbs.org/t/submit-job-as-different-user/1630>\
**Category:** Users/Site Administrators\
**Created:** [June 5, 2019, 8:52pm UTC](https://community.openpbs.org/t/submit-job-as-different-user/1630 "2019-06-05T20:52:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcrist](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@jcrist](https://community.openpbs.org/u/jcrist)\
**Post date:** [June 5, 2019, 8:52pm UTC](https://community.openpbs.org/t/submit-job-as-different-user/1630/1 "2019-06-05T20:52:35Z")

</div>

I’m working on a server to allow users to submit jobs to the cluster without using `qsub` directly (we authenticate the request, and if valid use `qsub` to submit the job to run). From the `qsub` docs, it looks like the `-u` option can be used to submit a job as a different user than the currently logged in user. I’m struggling a bit to get this to work though in practice - it’s not clear to me what configuration is needed.

I’ve gotten things working by adding `serverhost serveruser` to the `~/.rhosts` file for all users, but I was hoping for a way that wouldn’t require modifying all user’s home directories. Is there a way to configure permissions for one user (`serveruser`) to proxy as all users (or all users in a group)?

An alternative is to use `sudo` to login as the user before calling `qsub`, but I’d prefer to avoid that if possible.

---

<div class="post-metadata">

**Author:** ![adarsh](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@adarsh](https://community.openpbs.org/u/adarsh)\
**Post date:** [June 6, 2019, 7:46pm UTC](https://community.openpbs.org/t/submit-job-as-different-user/1630/2 "2019-06-06T19:46:10Z")

</div>

Your analysis and trials are spot on. There are no more alternatives to submit job as other user other than by writing a service / daemon / web service ( Job Submission as a service) , which takes job scripts and user names and submit the job on their behalf.

Wrapper scripts can be also useful to do the needful
