Sponsored Content
Full Discussion: useradd script
Top Forums UNIX for Dummies Questions & Answers useradd script Post 30520 by Kelam_Magnus on Wednesday 23rd of October 2002 11:40:25 AM
Old 10-23-2002
I don't know of any off the bat, but there are many great shell scripting sites on the internet.

It is fairly easy to do this with 1 password or NO password for all, but random passwords requires more work.

You can use the command line version of your useradd or adduser program to add them all to your system, but you will have to script something for the password creation.

Smilie
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

useradd -c in a script????

Here's my box info: ROOT@fcivra: uname -a SunOS fcivra 5.6 Generic_105181-26 sun4m sparc SUNW,SPARCstation-5 I am creating a script called adduser, that will incorporate the useradd command. Here is what it looks like: #!/bin/sh echo "Enter the person's VZID (lower case): \c" read VZID... (2 Replies)
Discussion started by: cdunavent
2 Replies

2. Shell Programming and Scripting

useradd

Gurus, I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either. Regards (4 Replies)
Discussion started by: earlysame55
4 Replies

3. UNIX for Advanced & Expert Users

useradd?

Hi Experts, when using useradd command, what are the necessary options/arguments to be included? Please advice. (4 Replies)
Discussion started by: etcpasswd
4 Replies

4. Shell Programming and Scripting

Help with useradd script

Ok Im trying too make this shell script create users from my text file, I also want to type in a password for the new users. So thay can make a uniq one themself after first logon. #!/bin/sh # Sebastian schmidt clear echo "*************************************************************"... (3 Replies)
Discussion started by: chipmunken
3 Replies

5. Shell Programming and Scripting

trouble making a useradd script

i'm new to scripting in unix and am trying to make a script to add a user and an encrypted password for them. this is what i have and it isn't giving me any errors, but when i try to login with the new user, the password doesn't work. i'm hoping someone can point me in the right direction ... (1 Reply)
Discussion started by: patt4179
1 Replies

6. Solaris

useradd

if useradd command is deleted in solaris how do we add user (3 Replies)
Discussion started by: vivek_ng
3 Replies

7. Shell Programming and Scripting

need script for smbldap-useradd/setquota/ldapadd

Hello guys, I am trying to add users to samba/ldap system, set their quota, set them a common password and add auto_home records for the new users User list file is in below format Firstname Lastname Username Command I run to add user is smbldap-useradd -a -m -N $Firstname -S... (0 Replies)
Discussion started by: upengan78
0 Replies

8. Solaris

useradd

I want to creat a 27 logins in solaris.Can anyone tell me how to write a script for that so that i create at a time for all 27 people. Thanks to guide me. (6 Replies)
Discussion started by: kkalyan
6 Replies

9. Shell Programming and Scripting

Useradd script

Trying to create a bash script that will read the /etc/passwd file for existing UID's before adding a new user and also does an incremental by allocating the next available UID.And also add the user to the correct group.Please help I am a newbie in scripting. (2 Replies)
Discussion started by: tshepang
2 Replies
NEWUSERS(8)						      System Manager's Manual						       NEWUSERS(8)

NAME
newusers - update and create new users in batch SYNOPSIS
newusers [new_users] DESCRIPTION
newusers reads a file of user name and cleartext password pairs and uses this information to update a group of existing users or to create new users. Each line is in the same format as the standard password file (see passwd(5)) with the following exceptions. pw_passwd This field will be encrypted and used as the new value of the encrypted password. pw_age This field will be ignored for shadow passwords if the user already exists. pw_gid This field may be the name of an existing group, in which case the named user will be added as a member. If a non-existent numerical group is given, a new group will be created having this number. pw_dir This field will be checked for existence as a directory and a new directory with the same name will be created if it does not already exist. The ownership of the directory will be set to be that of the user being created or updated. This command is intended to be used in a large system environment where many accounts are updated at a single time. CAVEATS
The input file must be protected since it contains unencrypted passwords. SEE ALSO
passwd(1), useradd(8) AUTHOR
Julianne Frances Haugh (jockgrrl@ix.netcom.com) NEWUSERS(8)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy