LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   group command line tools (https://www.linuxquestions.org/questions/linux-general-1/group-command-line-tools-249642/)

m2azer 10-31-2004 08:03 PM

group command line tools
 
hello,
i am trying to add groups and users using command line , addgroup/groupadd/usradd/, but i am getting commands can not be found. i think i am missing some "group/user command line tools" that need to be installed so i could use those command from the terminal .

does anyone come accross something like that? what tools or packages am i missing that need to be installed?

fc1+logged on as root

thank u all

bigrigdriver 10-31-2004 08:23 PM

The most likely problem is that the commands are not in your path (when logged in as root), and bash doesn't know where to find the commands. To determine if the commands are indeed installed, open a terminal and issue these commands;
locate useradd
locate groupadd
Bash will probably return something like: /usr/sbin/useradd and /usr/sbin/groupadd.
Since bash doesn't recognize the commands, then /usr/sbin is probably not in your path.
You can run the commands by giving the full path when you try to run the commands:
/usr/sbin/useradd and /usr/sbin/groupadd.
To permanently add /usr/sbin to your path, edit the file /etc/ld.so.conf, and add /usr/sbin, and save the file. Then run /sbin/ldconf to update your path configuration.
There is also a bash PATH and export PATH option to update, but I don't remember how it works.

m2azer 10-31-2004 08:30 PM

thanks for the reply
i did what u said and found /usr/sbin/useradd and /usr/sbin/groupadd
now these are super user command when i add them as u explained to my both would that be security issue since regular users would be able to run the command too?
just a newbe question..

thanks for ur reply

bigrigdriver 10-31-2004 08:41 PM

Should not be a problem. If you check the permissions on /etc and ld.so.conf, you will find that the user/group permissions are set for root/root. Users can't execute without root permission.

btmiller 10-31-2004 09:37 PM

It's more the fact that the password and group files and only writeable by the root user, so when a normal user tries to run useradd, it'll go fine until it actually tries to modify the password or group file, and then konk out with an error. Users generally can run the programs in the sbin directories, but can't use them to modify the system set up because of the permission checks in the system (of course, all this goes out the window if stuff is misconfigured, like if /etc/passwd is world writeable or somesuch).


All times are GMT -5. The time now is 09:06 AM.