Jump to content

How to change the user Emby runs as?


KarmaPolice

Recommended Posts

KarmaPolice

Initially I read this: https://github.com/MediaBrowser/Wiki/wiki/Linux but the configuration directive for changing the user Emby runs as is no longer there... 

 

So what's the process for changing the user Emby runs as? Note that I'm trying to change it from emby to something else, not install it from scratch as something other than emby.

 

Thanks for any help you can provide, I spent a good 30 mins searching the forums for info on this and nothing appeared to solve this question...

Link to comment
Share on other sites

mastrmind11

Can I ask the reason for having to do this?  Not saying there's anything wrong with it, just curious.

Link to comment
Share on other sites

riothamus

Yeah, I'm wondering why you would want this as well.  Is this for an external service account (something from an LDAP server, maybe?).

 

Are you wanting to transfer this to an existing user on your system or to a new user account?  Bear in mind that the UID/GID typically need to be below that of the normal user's ID range for most service accounts (unless you plan on going the systemd --user route).

Link to comment
Share on other sites

  • 2 weeks later...
KarmaPolice

On Ubuntu

Inititally I wanted to do this because I had a huge media library with specific permissions based on another user account... and while i ended up just changing the permissions to allow access to the emby user, i wouldn't have minded the ability to change the user emby runs as to an existing user account (and yes, would have used the systemd user/group options)

 

No need to reply now... but perhaps worth mentioning that the wiki still points to the old way of doing things to change the run as user here: https://github.com/MediaBrowser/Wiki/wiki/Linux

 

 

 

 One, you can adjust the user Emby server runs as. You can do this by adjusting the conf file which can be found in /etc/emby-server.conf
Link to comment
Share on other sites

  • 3 months later...

This helped me as i run Emby on ubuntu 18.04 and connect to my media via NFS.  I want to ensure that the running user/group IDs match those that AD account is set to in order to avert any permissions issues if Emby writes data.  

Link to comment
Share on other sites

  • 1 month later...
feardamhan

So is there a new method of doing this? Appears that the wiki still refers to setting the user in emby-server.conf but that does not appear to work. 

 

Running mine on dietPi

Link to comment
Share on other sites

So is there a new method of doing this? Appears that the wiki still refers to setting the user in emby-server.conf but that does not appear to work. 

 

Running mine on dietPi

 

Hi, what install package did you use?

Link to comment
Share on other sites

feardamhan

The latest version. As installed by the dietPi software installer.

 

I figure out how to do it in the end. Editing the service and changing the permissions. Makes a difference when monitoring an upload folder for auto organize.

 

So you want me to post the steps I used for putting on the wiki?

Link to comment
Share on other sites

So you want me to post the steps I used for putting on the wiki?

 

Hi, that would be great, thanks !

Link to comment
Share on other sites

feardamhan

So, if you want to have it run under a user called newuser

 

systemctl stop emby-server
vim /usr/lib/systemd/system/emby-server.service
Change 'User=emby' to 'User=newuser'
Save emby-server.service
chown -R newuser:newuser /var/lib/emby/
systemctl start emby-server
systemctl status emby-server
 
Worked for me. Allowed my auto-organize to cleanup the upload folder after parsing files into the correct location.
  • Like 1
Link to comment
Share on other sites

angusleung

Initially I read this: https://github.com/MediaBrowser/Wiki/wiki/Linux but the configuration directive for changing the user Emby runs as is no longer there... 

 

So what's the process for changing the user Emby runs as? Note that I'm trying to change it from emby to something else, not install it from scratch as something other than emby.

 

Thanks for any help you can provide, I spent a good 30 mins searching the forums for info on this and nothing appeared to solve this question...

 

After version 3.5.0.3 you could not use the conf file to change running user anymore as far as I know.

 

I run emby on ubuntu and 

 

Every time I install a new version I will run the following lines.

systemctl disable emby-server@emby --now
systemctl enable emby-server@[MY_USER] --now

which emby will run on user other than emby 

P.S. It is sure that you should run the chown thing first.

Edited by angusleung
Link to comment
Share on other sites

geopirate

This seems like a lot of hassle when you can just change the group permissions on the files and add the emby user to that group....

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
el_Pedr0

For people who like me stumble across this post when trying to run emby as a different user. Here's advice I received in another thread that seems to be working well at the momemt:
 

 

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...