Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Originally posted by Sifvion i got it work thks alot
By the way at the 1st place i was able to just type adduser and it work but now i had to type /usr/sbin/adduser. DO you guys know why?
apparently if you still have to type the full path, then /usr/sbin is not in your path.. that is why you would have to type the full path. to make it permanently, you need to either edit your /etc/profile or in the users home directory, edit .bashrc and or .bash_profile
I rebooted my system and im no longer able to do the following commands
groupadd
useradd
and what not..
for useradd the following works "/usr/sbin/adduser" but i was wondering how i could make it so i no longer need the location and just be able to do "useradd"
Originally posted by ColdSun I rebooted my system and im no longer able to do the following commands
groupadd
useradd
and what not..
for useradd the following works "/usr/sbin/adduser" but i was wondering how i could make it so i no longer need the location and just be able to do "useradd"
Are you running the command as root? Either log in as root or in a terminal run su -. If that doesn't work, maybe something is wrong with your PATH. Log in as root or run su - and then run echo $PATH to print out your path. See if /usr/sbin is listed. Post a copy of your PATH.
I open the terminal as user. Then i su to root account. but i cant use the adduser command. But if login as root at the 1st place i can use the command.
Any ideas?
Originally posted by Sifvion I open the terminal as user. Then i su to root account. but i cant use the adduser command. But if login as root at the 1st place i can use the command.
Any ideas?
If you're using su to become root, use su - instead. Using su, you inherit the user's environment. That includes the user's path and you need root's path to run ' adduser '. So, use su - to get root's path.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.