# Getting Started: Managing Users

**URL:** <https://discourse.openondemand.org/t/getting-started-managing-users/1187>\
**Category:** Get Help\
**Tags:** question\
**Created:** [October 29, 2020, 3:42am UTC](https://discourse.openondemand.org/t/getting-started-managing-users/1187 "2020-10-29T03:42:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![n-salvo](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@n-salvo](https://discourse.openondemand.org/u/n-salvo)\
**Post date:** [October 29, 2020, 3:42am UTC](https://discourse.openondemand.org/t/getting-started-managing-users/1187/1 "2020-10-29T03:42:29Z")

</div>

I have a few questions on handling users in OnDemand.  
Some context: I’m learning Ruby and working on building a Ruby on Rails app on top of Ondemand. So far, I have OnDemand 1.7.14 and Slurm installed on a cluster of Centos 7 VMs. The app is little more than a boilerplate RoR app so far.

1. I’ve been reading through the documentation and couldn’t figure out how to properly create new users for Open OnDemand. The only user I have working is the original system user I created on my webserver node. I tried creating more system users, but they can’t log into Open OnDemand. Ideally, I’d have a database manage my users, but it looks like they are handled by the OS.

2. My Ruby on Rails app needs to know which OnDemand user is logged in (name and some sort of unique identifier). I tried looking through the existing OOD system apps, but didn’t have much luck displaying the current user in my app.  
Eventually, I would like this app to be able to create, modify, and delete OnDemand users.

Let me know what suggestions you have for creating new users and integrating them into my app, thanks!

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [October 29, 2020, 12:56pm UTC](https://discourse.openondemand.org/t/getting-started-managing-users/1187/2 "2020-10-29T12:56:26Z")

</div>

OnDemand leverages the OS accounts for users. So there must be a separate OS account per user. In Ruby, the `Process.uid` gives you the UID of the currently logged in user, because the web server the user is connecting to is running as their self. To get the username of this you can do `Etc.getpwuid(Process.uid).name` or use our [https://github.com/OSC/ood\_support](https://github.com/OSC/ood_support) gem and do `OodSupport::User.new.name`

To create more system users and enable them to log into OnDemand you need an Apache authentication strategy and a mapping strategy (for mapping the authenticated user to the system user). The [documentation](https://osc.github.io/ood-documentation/latest/authentication.html) provides some overview on this with many different options. The [hpc-toolset-tutorial](https://github.com/ubccr/hpc-toolset-tutorial) docker images using docker compose shows an example of OnDemand with Dex (mod\_auth\_openidc provider) + LDAP for system accounts. Dex+LDAP is the recommended default approach for a new installation of OnDemand if you don’t have access to a preexisting identity provider to use. Also if you don’t need strong security and are experimenting the [PAM authentication with Apache Basic auth](https://osc.github.io/ood-documentation/latest/authentication/pam.html) might be easy to setup as well.

---

<div class="post-metadata">

**Author:** ![ndusek](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@ndusek](https://discourse.openondemand.org/u/ndusek)\
**Post date:** [May 19, 2021, 3:38pm UTC](https://discourse.openondemand.org/t/getting-started-managing-users/1187/3 "2021-05-19T15:38:49Z")

</div>

Is `Process.uid` non-fungible, in the sense that if I create a Ruby passenger app that makes decisions based on `Process.uid`, the logged in user cannot inject someone else’s UID? My hunch is that as long as write permissions on the passenger app are set correctly such that the user running it can’t modify the code (which should always be the default), then they may be able to see that `Process.uid` is being used but wouldn’t be able to modify it in flight?

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:42pm UTC](https://discourse.openondemand.org/t/getting-started-managing-users/1187/4 "2022-05-26T15:42:55Z")

</div>

Closed on May 26, 2022, 3:42pm UTC


