LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   command usermod not found (https://www.linuxquestions.org/questions/linux-newbie-8/command-usermod-not-found-4175477505/)

peterjsmith65 09-17-2013 05:24 PM

command usermod not found
 
I want to modify my own primary group so that the second group becomes the first, but when I enter the command usermod -g secondgroup userid I get the message "command usermod not found"

suicidaleggroll 09-17-2013 05:38 PM

Are you running this command as root? usermod lives in /usr/sbin, a directory reserved for special commands that is usually not included in regular users' PATH.

kooru 09-18-2013 03:05 AM

Hi and welcome to LQ!
As said by suicidaleggroll, probably you're running the command as normal user, instead of root.

jitendra.sharma 09-18-2013 04:56 AM

just try -
$sudo usermod

brianL 09-18-2013 07:41 AM

Quote:

Originally Posted by jitendra.sharma (Post 5029828)
just try -
$sudo usermod

Depends on whether sudo is enabled. Some distros do not enable it on user's accounts by default. If not, try this:
Code:

su -
(enter root's password)
then your usermod command.


All times are GMT -5. The time now is 01:26 PM.