LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 10-31-2004, 08:03 PM   #1
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Rep: Reputation: 30
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.
 
Old 10-31-2004, 08:23 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 10-31-2004, 08:30 PM   #3
m2azer
Member
 
Registered: Sep 2004
Location: USA
Distribution: red hat, fedora & centos
Posts: 202

Original Poster
Rep: Reputation: 30
Angry

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
 
Old 10-31-2004, 08:41 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 10-31-2004, 09:37 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ Interfacing with command line tools khermans Programming 2 04-14-2005 02:00 PM
Any command-line tools which can edit EXIF image data? neocookie Linux - Software 1 01-27-2005 11:23 AM
writing gui wrappers for command line tools Genjix Programming 2 01-10-2005 09:25 AM
how do I set a path for my java command line tools darkone66669 Linux - Newbie 1 04-19-2004 06:28 PM
delete a group with command line feetyouwell Linux - Software 1 01-27-2004 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration