What's new

Running Syncthing without admin user!

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Phylongue

New Around Here
I have installed syncthing on GT-AX11000 running AsusWRT-Merlin. However, it is being run as root user "admin". I was wondering if there is a possibility to change the user who runs it.

I used the following command:

opkg install syncthing

It created the following service file

Bash:
#!/bin/sh

ENABLED=yes
PROCS=syncthing
ARGS=""
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func

if [ ! -d /opt/etc/syncthing ]; then
   syncthing -generate="/opt/etc/syncthing"
   sed -i 's|127.0.0.1:8384|0.0.0.0:8384|' /opt/etc/syncthing/config.xml
elif [[ -f /opt/etc/syncthing/config.xml ]]; then
   sed -i 's|127.0.0.1:8384|0.0.0.0:8384|' /opt/etc/syncthing/config.xml
fi
 
I have installed syncthing on GT-AX11000 running AsusWRT-Merlin. However, it is being run as root user "admin". I was wondering if there is a possibility to change the user who runs it.

I used the following command:



It created the following service file

Bash:
#!/bin/sh

ENABLED=yes
PROCS=syncthing
ARGS=""
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

. /opt/etc/init.d/rc.func

if [ ! -d /opt/etc/syncthing ]; then
   syncthing -generate="/opt/etc/syncthing"
   sed -i 's|127.0.0.1:8384|0.0.0.0:8384|' /opt/etc/syncthing/config.xml
elif [[ -f /opt/etc/syncthing/config.xml ]]; then
   sed -i 's|127.0.0.1:8384|0.0.0.0:8384|' /opt/etc/syncthing/config.xml
fi
AsusWRT itself and any derivatives is only built to work with one root account, although you can rename 'admin' to whatever you desire in the Web GUI.

I'd just create a good password, keep the firmware software updated and most importantly, close any unnecessary open ports and services to the internet (WAN) and tunnel my way in through a reliable VPN server like OpenVPN or WireGuard etc. Good luck!
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top