LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-16-2005, 03:32 PM   #1
jerryluis
LQ Newbie
 
Registered: Jun 2004
Distribution: Mandrake 10.0
Posts: 6

Rep: Reputation: 0
useradd


Hi, I installed fedora Core 3 on my machine , but I have little problem with some common command.

Actually I want to insall an antivirus (CLAMAV), I want to create a new group and a new user .
I try to run useradd and groupadd, but prompt show me
"bash: useradd: command not found"

Why? I'm login as root and when I run 'man useradd or man groupadd' it explain me every option and details.
Thank you! best regards
Jerry
 
Old 02-16-2005, 03:35 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
are you using su to login as root? last i saw, FC doesn't add the sbin directories to your path when you 'su root', specify them explicitly (use the full path & command) or update your $PATH to include them

edit:
/usr/sbin/useradd
 
Old 02-16-2005, 03:37 PM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Hi.

Type in .... "which useradd" and let me know what it says. On my box it's like this...

[root@red root]# which useradd
/usr/sbin/useradd

Then type this.... /usr/bin/useradd and see if that works for you, let me know. Make sure you do it as root.

>Craig
 
Old 02-16-2005, 03:37 PM   #4
dollster31
LQ Newbie
 
Registered: Feb 2005
Posts: 2

Rep: Reputation: 0
not familiar with fedora, but, from basic unix experience, the useradd command is not in the PATH ENV var. The executable useradd is likely in /usr/sbin.

if it is not there, from the root ( / ) dir, run :
find . -name useradd

that will search the system for the useradd command and print to the term.
 
Old 02-16-2005, 03:37 PM   #5
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Sorry you got in just before me secesh
 
Old 02-16-2005, 03:39 PM   #6
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
no problem, but here's a point to clarify:

Quote:
Which takes one or more arguments. For each of its argu_
ments it prints to stdout the full path of the executables
that would have been executed when this argument had been
entered at the shell prompt. It does this by searching for
an executable or script in the directories listed in the
environment variable PATH using the same algorithm as
bash(1).

if it ain't in your path to begin with, which won't find it... whereis (which searches 'standard linux places') might, though...
 
Old 02-16-2005, 03:43 PM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
useradd is a part of the shadow-utils package

do u have this installed

try

rpm -qa|grep shadow
 
Old 03-20-2005, 01:28 PM   #8
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally posted by secesh
are you using su to login as root? last i saw, FC doesn't add the sbin directories to your path when you 'su root', specify them explicitly (use the full path & command) or update your $PATH to include them
If you are using su to become root, try
Code:
 su -
to get root's path etc., not just root's privileges. (See man su :-)

Also, some distros -- I don't know about FC, provide adduser, moduser, addgroup, etc. instead of useradd, usermod, groupadd, etc.
 
Old 03-22-2005, 09:23 AM   #9
equinox
Member
 
Registered: Dec 2003
Location: Johannesburg, South Africa
Posts: 846

Rep: Reputation: 30
Well here's my 2c worth...

I noticed if I boot with Selinux enabled that I cannot use "useradd" but somehow it does create the home directories but complains that it cannot write the passwd file. If I boot with Selinux disabled I can use the command.

Try for yourself.
 
Old 03-27-2005, 07:37 PM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I found in Debian that the " adduser " command was much better & easier to add a new user and give it permissions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
useradd probs rickict Slackware 5 04-18-2005 05:20 PM
Using Useradd spud Linux - Newbie 6 03-10-2005 03:50 PM
automatic useradd sanacori Linux - Software 0 05-13-2004 07:20 AM
useradd cyrush Linux - Distributions 3 01-21-2003 09:40 PM
useradd qdickens Linux - General 4 11-02-2001 02:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 08:08 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