Sponsored Content
Top Forums Shell Programming and Scripting Creating User Accounts from a list in file Post 93675 by mahendramahendr on Wednesday 21st of December 2005 08:58:03 AM
Old 12-21-2005
I'm not good at linux, may be you can try below stuff

cat users.txt | \
while read userid
do
useradd $userid
done


i hope useradd is not an interactive program. But passwd program needs to be invoked for each and every user to assign password or the users can change their password on first longin.. but not sure whether we have a better solution.
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

Creating mail accounts online.?

Hi all. Can anybody help me about this topic. I am working on the project which lets people create an mail account an sign in to send or recieve mail( shortly like yahoo hotmail). At the moment , records of People who registers to my mail service, is saved to database.after, I am creating... (1 Reply)
Discussion started by: vbs
1 Replies

2. UNIX for Dummies Questions & Answers

[LINUX] Creating new user accounts

I've had Linux when I was young, on one of our first computers and learned it pretty quickly... However, I've been working on Windows for about 7 years now and just made the switch back to Linux, Mandrake 9.1. So I have some problem with creating new user accounts. I could create one, but once I... (3 Replies)
Discussion started by: Arendo
3 Replies

3. UNIX for Advanced & Expert Users

creating user accounts in AIX

Hello all: I am new to UNIX and I am given the responsibility of administering a UNIX machine recently. The system is a IBM AIX 3.1. As a part of my duties I recently created some user accounts using "smit". It looked as if everything went well. But, after creating the account, I logged into... (3 Replies)
Discussion started by: pdepa
3 Replies

4. Shell Programming and Scripting

User Accounts

I have found a script to create user accounts. But there are a few lines i dont understand. Can someone help me with this? Here's the code: ###################################### while ; do ACCT=${USER_ACCT}${START} START=`expr $START + 1` START=`echo ${START} | awk... (3 Replies)
Discussion started by: Sensor
3 Replies

5. UNIX for Dummies Questions & Answers

Help with user accounts

I have a root access to a UNIX system. I want to create another account with administrative permissions (create users, delete them, manage print and system configuration), how do I do that? I have a Solaris 9 (SunOS 5.9) installed. Please help. :o (3 Replies)
Discussion started by: neked
3 Replies

6. UNIX for Dummies Questions & Answers

Creating user accounts

Hey everyone I am new to the forums and to Unix. I am currently taking a class on Unix, our teacher posed the question to us How do u create a user account without using GUI or command? We are currently running Knoppix version of Unix and for the life of me I can't figure out how this is possible.... (0 Replies)
Discussion started by: Redditt90kg
0 Replies

7. Shell Programming and Scripting

Creating user accounts

Hi, I have written a program using shell scripting. When you run the file it will asks you to enter the user name, if the user exists it says " user exists " if not it will displays like " user doesnt exist" and then asks you like " do you want to add user with options Yes or No " if you say... (1 Reply)
Discussion started by: vishwaprasad
1 Replies

8. UNIX for Dummies Questions & Answers

single user mode - user accounts passwords

hello ppl, someone must be able to help with this --> I have an old NCR tower 32 with an ADDS terminal running a unix version 020102 (Im not sure if thats correct but its unix for sure). I have no user names and no passwords and need to login to read a tape. Is there any way to do that? I hear... (3 Replies)
Discussion started by: orestis
3 Replies

9. UNIX for Dummies Questions & Answers

Difference between : Locked User Account & Disabled User Accounts in Linux ?

Thanks AVKlinux (3 Replies)
Discussion started by: avklinux
3 Replies
USERMGMT.CONF(5)					      BSD File Formats Manual						  USERMGMT.CONF(5)

NAME
usermgmt.conf -- user management tools configuration file SYNOPSIS
usermgmt.conf DESCRIPTION
The usermgmt.conf file defines the default values used by the user management tools, useradd(8) and friends. Options in this file can be set by manually editing /etc/usermgmt.conf or using the -D option to useradd(8). base_dir sets the base directory name, in which new users' home directories are created when using the -m option to useradd(8). class sets the default login class for new users. See login.conf(5) for more information on user login classes. expire sets the default time at which the current password expires. This can be used to implement password aging. Both the expire and inactive fields should be entered in the form ``month day year'', where month is the month name (the first three characters are sufficient), day is the day of the month, and year is the year. Time in seconds since the epoch (UTC) is also valid. A value of 0 can be used to disable this feature. group sets the default primary group for new users. If this is '=uid', then a uid and gid will be picked which are both unique and the same, and a line will be added to /etc/group to describe the new group. It has the format: group gid | name | =uid homeperm sets the default permissions of the newly created home directory if -m is given to useradd(8). The permission is specified as an octal number, with or without a leading zero. inactive sets the default time at which new accounts expire. A value of 0 can be used to disable this feature. Also see the expire field. password specifies an already-encrypted default password. preserve If this value is one of 'true', 'yes', or a non-zero number, then the user login information will be preserved when removing a user with userdel(8). range specifies the uid boundaries for new users. If unspecified, the default is ``1000..60000''. It has the format: range starting-uid..ending-uid gid_range specifies the gid boundaries for new groups. If unspecified, the default is ``1000..60000''. It has the format: gid_range starting-gid..ending-gid shell sets the default login shell for new users. skel_dir sets the default skeleton directory in which to find files with which to populate the new user's home directory. FILES
/etc/usermgmt.conf /etc/skel/* /etc/login.conf SEE ALSO
login.conf(5), passwd(5), user(8), useradd(8), userdel(8), usermod(8) HISTORY
The usermgmt.conf configuration file first appeared in NetBSD 1.5. BSD
December 31, 2009 BSD
All times are GMT -4. The time now is 09:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy