LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-13-2005, 09:41 AM   #1
Pizentios
LQ Newbie
 
Registered: Sep 2004
Location: Brandon Manitoba Canada
Distribution: Slackware and OpenBSD
Posts: 22

Rep: Reputation: 15
newusers input file format?


Hey,

i am trying to add a batch of users to one of our servers here at work. I was coding a bash script to do it, but then i found out about the newusers command. So, not wanting to re-invent the wheel, i proceeded to read the man page to find out how to use the command. However, the man page tells me a little about the command but nothing about the input file format. I've also tried looking at the info page for newusers but it's the same page as the man page.....if that makes any sense.

here's a link to a on-line version of the man page:

HERE

anyways, i guess my question is: has anybody ever used this command? If so how is the input file formatted? The man page gives minor hints, but it's kinda confusing. Thanks for the help in advance.
 
Old 04-13-2005, 11:32 AM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
I've never used the command, but I just did a test of it. The man page does tell you how the input file is supposed to be, but you have to read it twice then take a guess at some things.

newuser1:blah:::New User1:/home/new1:/bin/bash
newuser2:blah:::New User2:/home/new2:/bin/bash
newuser3:blah:::New User3:/home/new3:/bin/bash

That's what the entry of my "new user file" looksl ike. Notice, I didn't put any UID or GID in there, I could if I wanted to, but I wanted to see what the result was. The result is that the new users get created above the 2^16 ID number, which I find interesting, but it works.

Also, the clear text password doesn't get created in /etc/shadow as an MD5 hash, it's created with the old hashing scheme.

Anyway, there ya go...I guess it works, and anything over a few 10 or so new users to add I'd suggest using this.
 
Old 04-13-2005, 02:27 PM   #3
Pizentios
LQ Newbie
 
Registered: Sep 2004
Location: Brandon Manitoba Canada
Distribution: Slackware and OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks for the help man. I have about 30-40 users to add to this server, so it's going to save me some time.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
gdb "not in executable format: File format not recognized" tcma Programming 9 07-18-2007 06:02 AM
newusers command from a file scoobydude Linux - General 2 05-30-2005 07:44 PM
read the input file and write in the given format suchi_s Programming 8 12-17-2004 01:12 AM
Having rm or mv take file input BlueOrb Linux - Newbie 4 06-29-2004 09:42 PM
Changing Keyboard input into UTF-8 format LinuxTiro Programming 1 05-08-2004 09:29 AM

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

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