# Specify user in the update-nodejs-and-nodered script

**URL:** https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871
**Category:** Feature Requests
**Created:** [30 December 2021 04:58 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871 "2021-12-30T04:58:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![trentinc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trentinc/32/53260_2.png) [@trentinc](https://discourse.nodered.org/u/trentinc)
#### Post date: [30 December 2021 04:58 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871/1 "2021-12-30T04:58:39Z")

</div>

I've been learning Ansible for automatic deployment of NODE-RED and ran into a stumbling block.  
The pi zero w (assuming all armv6's) doesn't have an official nodejs rep so one would need to use the `bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)` install script.

The installation requires elevated privileges however running the script as 'become:true' (and all the --confirm arguments) and has the side effect of installing under /root which is not ideal.

In stead of trying to figure out how to store and pass credentials to a script in Ansible it was a lot easier to fork the linux-installers and add a --nodered-user to the argument list in update-nodejs-and-nodered. see [fork](https://github.com/trentinc/linux-installers/blob/master/deb/update-nodejs-and-nodered)

If anyone else knows the proper way to do it I'd love to know. If anyone else finds this addition useful then I'd like to assist in adding a PR for it

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [30 December 2021 09:50 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871/2 "2021-12-30T09:50:54Z")

</div>

Happy to consider a PR for this as an option.

---

<div class="post-metadata">

### Author: ![trentinc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trentinc/32/53260_2.png) [@trentinc](https://discourse.nodered.org/u/trentinc)
#### Post date: [30 December 2021 18:52 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871/3 "2021-12-30T18:52:39Z")

</div>

I noticed the rpm script doesn't accept arguments for the script. I don't run any rpm distros but I could add the same arguments in the deb code to the rpm code so that the two match more closely, I'll have to spin up a few different rpm vms to test then I'll update the fork and put in a PR.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [30 December 2021 21:24 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871/4 "2021-12-30T21:24:01Z")

</div>

If you do that please do it as a separate PR. The rpm installer is deliberately much simpler as it doesn’t need to cope with the nuances of Pi processor architectures, gpio nodes etc. so any extra options need to be discussed beforehand. Thanks

---

<div class="post-metadata">

### Author: ![trentinc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trentinc/32/53260_2.png) [@trentinc](https://discourse.nodered.org/u/trentinc)
#### Post date: [31 December 2021 14:10 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871/5 "2021-12-31T14:10:49Z")

</div>

I've added a PR for the modifying the deb installer along with results of my testing

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [1 March 2022 14:10 UTC](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/55871/6 "2022-03-01T14:10:58Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
