LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   newusers - command not found (https://www.linuxquestions.org/questions/linux-newbie-8/newusers-command-not-found-494698/)

Jayla 10-22-2006 06:08 PM

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

makyo 10-22-2006 06:16 PM

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

Jayla 10-22-2006 06:20 PM

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 :D

cellarlight 10-22-2006 06:29 PM

Don't get mad if I way off but, are you using the command as root? You have to be root to use newusers.

Jayla 10-22-2006 06:34 PM

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

cellarlight 10-22-2006 06:43 PM

Set Path
 
To set path:
Code:

PATH=$PATH:/path/to/file
Better example:
Code:

PATH=$PATH:/usr/sbin/newusers

makyo 10-22-2006 07:12 PM

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

vls 10-22-2006 07:21 PM

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"

Jayla 10-23-2006 07:30 AM

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

pixellany 10-23-2006 08:11 AM

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.

makyo 10-23-2006 09:30 AM

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

pixellany 10-23-2006 11:12 AM

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

Maybe obsolete???

cellarlight 10-23-2006 12:41 PM

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.:eek:


All times are GMT -5. The time now is 07:56 AM.