Jump to content

Recommended Posts

Posted

I have Armbian running on an Orange Pi and I like to work by changing to su so I'm not having to constantly type sudo in front of commands when I have a lot of commands that need root privilege. However, bizzarely, sometimes I still ahve to use sudo. So for example:
 

root@orangepi5-plus:/home/Data/Mercurial_Info# usermod -a -G www-data username

bash: usermod: command not found


If I do

 

sudo usermod -a -G www-data username 

 

How can I fix this please? It's also stopping me running a script I  need that I ran on my old Banana Pi running Armbian.

Posted

This is likely a $PATH issue. usermod is in /usr/sbin which is probably not in your user's $PATH. If you su without adding - you do not get root's $PATH but with sudo you do.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines