Linux - General This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-31-2004, 08:03 PM
|
#1
|
|
Member
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202
Rep:
|
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
Last edited by m2azer; 10-31-2004 at 08:05 PM.
|
|
|
|
10-31-2004, 08:23 PM
|
#2
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,573
|
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.
|
|
|
|
10-31-2004, 08:30 PM
|
#3
|
|
Member
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202
Original Poster
Rep:
|
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
|
|
|
|
10-31-2004, 08:41 PM
|
#4
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,573
|
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.
|
|
|
|
10-31-2004, 09:37 PM
|
#5
|
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 3,816
Rep: 
|
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).
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:12 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|