LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-05-2007, 09:09 AM   #1
sikkalgopal
Member
 
Registered: Aug 2004
Location: india
Distribution: Mandrakes,Redhats,Debians.Suses and FreeBSD
Posts: 52

Rep: Reputation: 15
creating multiple users


Hi

I am creating multiple users by editing a file say "multiusers" and added such that


user1: password:501:501::/home/user1:/bin/bash
user50: password:550:550:/home/user50:/bin/bash

(Note: no space between : and p)

After saving i gave

#/usr/sbin/newusers multiusers

All users are created,but when i do su -l user1
i got the prompt -bash-3.00$ instead of user1@machinename$. Is there something missed in the file.Please clarify.

Regards
 
Old 07-05-2007, 10:04 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I've not used this command, but from the man page what you did looks right. (For the user1 line that is -- it looks like you dropped a colon in the user50 line, but I am guessing that was just a typo in your post.) So I don't know what went wrong, but I might be able to point you in the right direction for trouble shooting. The problem is an environmental variable called PS1. By default it's value is \s-\v\$. You can check that easily by:

Code:
#su -l user1
$echo $PS1
This value gives the prompt you are showing. (Look at bash's man page for an explanation of PS1 and how the special characters -- those preceded with a backslash -- are interpreted.) Most distros will use one or more of bash's startup/configuration files to alter this to something nicer. I am talking about files like /etc/profile /etc/bashrc, ~/.bash_profile, ~/.bashrc, and files in /etc/profile.d. You might look through these files and see what is different for the "normal" accounts and the new ones. One thing I would definitely look at is to make sure the files from /etc/skel got copied into the newly created account's home directories.
 
Old 07-06-2007, 12:14 AM   #3
sikkalgopal
Member
 
Registered: Aug 2004
Location: india
Distribution: Mandrakes,Redhats,Debians.Suses and FreeBSD
Posts: 52

Original Poster
Rep: Reputation: 15
Hi

Thanks for the reply.Its typo problem .I browsed here in the forum
and found one good program createusers 1.3.4, which is creating multiple users as i expected but with one problem.In that sample file
they provide 5 users user1 to user5.I just checks the tool is working
but in /var/spool/mail directories i found the owner is changed for all the users.Here is the list,

-rw-rw---- 1 test1 mail 0 Jul 5 11:41 user1
-rw-rw---- 1 user1 mail 0 Jul 5 11:41 user2
-rw-rw---- 1 user2 mail 0 Jul 5 11:41 user3
-rw-rw---- 1 user3 mail 0 Jul 5 11:41 user4
-rw-rw---- 1 507 mail 0 Jul 5 11:41 user5

Any thoughts ?

Regards
 
Old 07-06-2007, 06:01 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
createusers is a bash script. You should be able to read through it to see what it is doing. There would appear to be either a problem with the script or a problem with the config file.

Are you aware that createusers "also sets up new users' home directories for personal Web space with Apache?"
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating new users skvasistha Linux - General 3 11-26-2004 11:02 PM
Creating multiple users in Kmail with a single KDE user jonole Linux - Software 3 10-03-2004 12:36 AM
Multiple users with the same name...users command buldir Linux - General 2 08-30-2004 04:34 PM
[FC2]Why does the users command display multiple users? Harkov Fedora 1 07-10-2004 09:24 PM
script for creating multiple users d3funct Programming 1 08-21-2001 05:22 PM

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

All times are GMT -5. The time now is 05:20 PM.

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