LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2006, 07:08 PM   #1
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Rep: Reputation: 30
newusers - command not found


Hi

Is there any reason why I don't have the newusers command?

If i try newusers file.txt it says the command cannot be found, also, there is no man page for newusers

is this a feature that doesnt come standard with the Suse 10 distro? and if so where might I be able to get this feature?

thanks for your time
 
Old 10-22-2006, 07:16 PM   #2
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 730

Rep: Reputation: 75
Hi, Jayla.

It is possible that the location of newusers is not in your PATH setting. For example, on my system:
Code:
% whereis newusers
newusers: /usr/sbin/newusers /usr/share/man/man8/newusers.8.gz
which means that I would need to use the full pathname of newusers because I don't have /usr/sbin in my PATH.

There may be other reasons as well, of course.

Best wishes ... cheers, makyo
 
Old 10-22-2006, 07:20 PM   #3
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Thanks for the speedy reply

yes this is what I get after running whereis

Code:
whereis newusers
newusers:
do you have any idea how I can set it up correctly or even begin to be able to use the newusers command?

many thanks
 
Old 10-22-2006, 07:29 PM   #4
cellarlight
Member
 
Registered: Feb 2006
Location: United States
Distribution: Debian Etch, Suse 10.0, Ubuntu Feisty
Posts: 37

Rep: Reputation: 15
Don't get mad if I way off but, are you using the command as root? You have to be root to use newusers.
 
Old 10-22-2006, 07:34 PM   #5
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Hi

Yeah I'm running it as root, but it seems that there is no PATH set so I cannot view its man page or run the command

any advice on how to set the PATH would be great

Thanks for your time

J
 
Old 10-22-2006, 07:43 PM   #6
cellarlight
Member
 
Registered: Feb 2006
Location: United States
Distribution: Debian Etch, Suse 10.0, Ubuntu Feisty
Posts: 37

Rep: Reputation: 15
Set Path

To set path:
Code:
PATH=$PATH:/path/to/file
Better example:
Code:
PATH=$PATH:/usr/sbin/newusers

Last edited by cellarlight; 10-22-2006 at 07:47 PM.
 
Old 10-22-2006, 08:12 PM   #7
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 730

Rep: Reputation: 75
Hi.

If cellarlight's advice works, then you need not read this.

I'm using SuSE 9, so it may be different.

However, I think that whereis should find newusers regardless of who you are logged as. When I ran that original whereis, I was not root.

I'm thinking that newusers is not installed on your system. That might be because you used a very basic install, or perhaps newusers is called something different on newer SuSEs. It's possible that you might not have manpages installed, but the command should still be there.

The description of newusers on my system is:
Code:
> whatis newusers
newusers (8)         - update and create new users in batch
So you could try:
Code:
man -k users
man -k update
man -k new
to try to find what an appropriate command is.

Keep us posted ... cheers, makyo
 
Old 10-22-2006, 08:21 PM   #8
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
Quote:
Originally Posted by cellarlight
To set path:
Code:
PATH=$PATH:/path/to/file
Better example:
Code:
PATH=$PATH:/usr/sbin/newusers
Sorry, but this is not right.

The PATH environment variable points to directories not specific binaries.

A good root PATH might be this:
Code:
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
 
Old 10-23-2006, 08:30 AM   #9
Jayla
Member
 
Registered: Nov 2005
Location: Suffolk, UK
Distribution: kubuntu 9.04
Posts: 188

Original Poster
Rep: Reputation: 30
Thanks for the replies everybody


Quote:
Originally Posted by vls

A good root PATH might be this:
Code:
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
I have looked in all of these directories and couldn't find newusers

whatis newusers doesnt return an answer

whereis newusers returns "newusers:"

I've gone thru man -k etc like I have been advised but have been unable to find anything relevant that may work

In short, I need a way of adding users on batch to the system, this will be a crontab style job. I figured that having the usernames, passwords etc in a text file, and then calling an expect script that would log in as root, add them all using "newusers" would be the most appropriate way...

Any advice would greatly be appreciated

Thank you all for reading this

J
 
Old 10-23-2006, 09:11 AM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
The first thing I would do to find if "newusers) is on the sytem is type "man newusers". No man page probably means no command.

Mine is in /usr/sbin also

To find ANY file, I like "find". For example: "find / -name newusers" will search the entire filesystem. If you think the file may have a different name, you can do something like: find / -name *user*

If newusers is not in you system, then type it into google to find where to get it.
 
Old 10-23-2006, 10:30 AM   #11
makyo
Member
 
Registered: Aug 2006
Location: Saint Paul, MN, USA
Distribution: {Free,Open}BSD, CentOS, Debian, Fedora, Solaris, SuSE
Posts: 730

Rep: Reputation: 75
Hi.

I searched and found:
Code:
'newuser' does not exist on 9.1 Pro.
http://www.webservertalk.com/archive76-2004-6-283736.html
So it may be missing from that and later versions. If it is missing, I find it unusual that it would not have had a replacement.

Unless someone has a more definitive answer, you may need to create a script and process the items one-by-one with useradd. The man page will have some details. I think you can easily practice by combining that with userdel.

Some distributions are set to disallow remote logins by root, but I haven't checked that on SuSE ... cheers, makyo
 
Old 10-23-2006, 12:12 PM   #12
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Just tried to find "newusers" with Google and Sourceforge--A few man pages, but no links to getting the program.

Maybe obsolete???
 
Old 10-23-2006, 01:41 PM   #13
cellarlight
Member
 
Registered: Feb 2006
Location: United States
Distribution: Debian Etch, Suse 10.0, Ubuntu Feisty
Posts: 37

Rep: Reputation: 15
You could download the source and/or patches for bash.
http://ftp.gnu.org/gnu/bash/

You can get the RPM's here.
http://www.free-soft.org/FSM/english/issue03/bash.html

I checked my version of bash and it's up-to-date and has newusers. Maybe, you might have an incomplete version.
 
  


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
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
bash: <command name> command not found smash Programming 5 03-13-2006 09:48 AM
Newusers command problem. Schlzm Linux - General 6 12-06-2005 10:28 AM
newusers command from a file scoobydude Linux - General 2 05-30-2005 08:44 PM
newusers input file format? Pizentios Linux - General 2 04-13-2005 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration