Sponsored Content
Top Forums UNIX for Dummies Questions & Answers shell scripts to create 100 users Post 6215 by xiamin on Friday 31st of August 2001 10:38:37 AM
Old 08-31-2001
shell scripts to create 100 users

Hello

i need a shell script to create 100 users i am running hp-ux.........

startegy is something like this

craete a shell script
Code:
!/bin/ksh
counter=1
while [ $counter .le. 100 ] 
do
{
   useradd usr$counter
   passwd usr$counter
# here begins my problem when i say passwd usr$counter
#it again prompts saying retype new passwd..how do i handle #this situation
   counter=counter+1
}
done

regards
hrishy

added code tags for readability --oombera

Last edited by oombera; 02-19-2004 at 05:18 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

FTP is using shell scripts create ? for file

ftp -n -v <<EOF verbose open 3.57.40.79 user infodvlp pr0gram ascii lcd /home/a501420038/GLA/Success_Load/ cd /ftp/SrcFiles/csg/InstruAsia/ get AU_Success_Log.txt close quit EOF Please help on this, this gives the out put "AU_Success_Log.txt?" As question mark in the last what will... (1 Reply)
Discussion started by: a501420038
1 Replies

2. UNIX for Dummies Questions & Answers

Scripts and changing users

Hi, I am writing somescripts to shut down some services in Korn Shell. Some of the services are under different owners. For example when I want to shutdown NXserver I need to be "root", but when I shut down the webserver I need to be under a different user. Manual I would use "su root" and... (1 Reply)
Discussion started by: bonekrusher
1 Replies

3. OS X (Apple)

interactive shell script to create users 10.4

Hello everyone, Not sure if this is the right place, but OS X isn't your standard Unix, so I figured here would be best. I am looking at creating a script that will be interactive that admins can run to create users. Now, 10.4 uses netinfo database and netinfo manager to handle it's users. ... (3 Replies)
Discussion started by: tlarkin
3 Replies

4. Shell Programming and Scripting

how to create and remove desktop icons from shell scripts

hi all how to create and remove desktop icons or icons from shell scripts? (1 Reply)
Discussion started by: kkpal
1 Replies

5. Shell Programming and Scripting

Create Bash shell scripts corresponding to windows bat files

Experts, I am newbie in shell scripting. I want to write Bash shell scripts corresponding to windows bat files. I have installed cygwin at c:\cygwin and i am trying to crate the sh file using vi editor. i am not able to understand how to use linux/unix convention for the code. following is my... (1 Reply)
Discussion started by: rajuchacha007
1 Replies

6. UNIX for Dummies Questions & Answers

shell scripts - create a filename with the date appended

I am looking to do something where if I created a file named backup,or whatever it would print a name like “backup_Apr_11_2011”. Thanks citizencro (1 Reply)
Discussion started by: citizencro
1 Replies

7. UNIX for Dummies Questions & Answers

shell scripts - list dead users accts and include a count at the end?

I am trying to show the number of dead accts or false shells running and include a count at the end. Does anyone know how to go about this? Thanks - citizencro (3 Replies)
Discussion started by: citizencro
3 Replies

8. Shell Programming and Scripting

How I can create this Shell scripts?

Hi friends you can solve my question about make 3 shell scripts? Thanks for all! (1 Reply)
Discussion started by: dakota
1 Replies

9. Shell Programming and Scripting

Create multiple users with individual passwords to users

hi, i am new to shell scripts i write a shell script to create multiple users but i need to give passwords to that users while creating users, command to write this script (1 Reply)
Discussion started by: DONFOX
1 Replies

10. Shell Programming and Scripting

Shell Script to filter users and create them again from a back-up server

This is a script to filter the users out of etc/passwd and etc/group. So if you want to migrate of restore a server you can use this script from a backup to restore and make the same users on you had.. Please feedback and comments. #!/bin/bash prompt_list () { # haal uit de argumenten de... (5 Replies)
Discussion started by: dannyvdberg
5 Replies
PMC.TSC(3)						   BSD Library Functions Manual 						PMC.TSC(3)

NAME
pmc.tsc -- measurements using the i386 timestamp counter LIBRARY
Performance Counters Library (libpmc, -lpmc) SYNOPSIS
#include <pmc.h> DESCRIPTION
In the i386 architecture, the timestamp counter is a monotonically non-decreasing counter that counts processor cycles. This counter may be selected specifying an event specifier ``tsc'' to pmc_allocate(3). The TSC is a read-only counter that may only be allo- cated in system-wide counting mode. The ``tsc'' event does not support further event qualifiers. Multiple processes are allowed to allocate the TSC. Once allocated, the TSC may be read using the pmc_read() function, or by using the RDTSC instruction. Event Name Aliases The alias ``cycles'' maps to the TSC. SEE ALSO
pmc(3), pmc.atom(3), pmc.core(3), pmc.core2(3), pmc.iaf(3), pmc.k7(3), pmc.k8(3), pmc.p4(3), pmc.p5(3), pmc.p6(3), pmc.soft(3), pmclog(3), hwpmc(4) HISTORY
The pmc library first appeared in FreeBSD 6.0. AUTHORS
The Performance Counters Library (libpmc, -lpmc) library was written by Joseph Koshy <jkoshy@FreeBSD.org>. BSD
October 4, 2008 BSD
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy