Difference between revisions of "Enable Non Root Gigaflow"
From Observer GigaFlow Support | VIAVI Solutions Inc.
Kevin Wilkie (Talk | contribs) (Created page with "//Add the user account name you want useradd rosuser //Make sure there is no password so the account can be used on startup passwd -d rosuser //set files to be owned by this u...") |
Kevin Wilkie (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | Add the user account name you want | |
− | useradd rosuser | + | useradd rosuser |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | // | + | Make sure there is no password so the account can be used on startup |
+ | passwd -d rosuser | ||
+ | Sset files to be owned by this user, will need to be done after every update | ||
+ | chown -R rosuser:rosuser /opt/ros | ||
+ | chown -R rosuser:rosuser /etc/init.d/rosd | ||
+ | Edit the default service file | ||
+ | vi /etc/init.d/rosd | ||
+ | Change the su command on line 15 to use the required user (rosuser in this case) | ||
+ | su rosuser -c ${_ROS_ROOT}/resources/start | ||
+ | Test that it works by logging in as the user and starting the service | ||
+ | su - rosuser | ||
+ | /etc/init.d/ros restart | ||
+ | |||
+ | Note that by using a non root account, you will not be able to user ports <1024 |
Revision as of 19:38, 10 March 2021
Add the user account name you want
useradd rosuser
Make sure there is no password so the account can be used on startup
passwd -d rosuser
Sset files to be owned by this user, will need to be done after every update
chown -R rosuser:rosuser /opt/ros chown -R rosuser:rosuser /etc/init.d/rosd
Edit the default service file
vi /etc/init.d/rosd
Change the su command on line 15 to use the required user (rosuser in this case)
su rosuser -c ${_ROS_ROOT}/resources/start
Test that it works by logging in as the user and starting the service
su - rosuser /etc/init.d/ros restart
Note that by using a non root account, you will not be able to user ports <1024