Workbench home directories not created on UI login

Follow

Problem

You may run into circumstances when you're configuring Posit Workbench with your Windows Active Directory host, and have an issue where home directories aren't being created on logging into the UI, but they are when you SU into the user profile or run pamtester.

A possible solution to this is to run pamtester on a user profile as below:

Cecil@posit:~$ sudo /usr/lib/rstudio-server/bin/pamtester --verbose rstudio cecil@support.posit.co authenticate acct_mgmt setcred open_session close_session
pamtester: successfully authenticated
pamtester: account management done.
pamtester: credential info has successfully been set.
Creating directory '/home/cecil'.
pamtester: sucessfully opened a session
pamtester: session has successfully been closed.

You may notice in the example above, that the home directory is created when running pamtester, but not when a user attempts to login through the user interface.

 

Solution

Firstly, it's highly recommended to review the following documentation to ensure that your Workbench server is correctly configured to use your Active Directory server:

https://docs.posit.co/rsw/configuration/authentication/active-directory/

https://support.posit.co/hc/en-us/articles/360024137174

 

From there, you will need to  make a copy of the PAM profile su. You can call this anything you like, but for the purposes of this article, we will use rstudio session as below:

$ cp /etc/pam.d/su /etc/pam.d/rstudio-session


Then let's point our configuration to use this pam profile in/etc/rstudio/rserver.conf:

# /etc/rstudio/rserver.conf
auth-pam-sessions-enabled=1
auth-pam-sessions-profile=rstudio-session


Lastly, restart the workbench service for this change to take effect:

sudo rstudio-server restart

 

You should be able to log in via the UI, and have this home directory created for you. You can verify this by checking the home directory of an active directory user:

id <user>
getent passwd <user>

Where <user> is the login name of an affected user.

 

Support Ticket

If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here:

https://support.posit.co/hc/en-us/requests/new

Comments