HOW TO CREATE 10 USERS IN UNIX(HP-UX) USING SHELL
SHELL SCRIPT?
Answers were Sorted based on User's Feedback
Answer / nimal
#!/bin/sh
for i in {1..10)
do
echo "creating user"$i;
useradd user$i;
done
to list the created users.
cat /etc/passwd
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / pitambar mishra
My dear friends,
you have used 'useradd' command in the script through which we can only add the user name. But for adding password you should use 'passwd' command because password is also mandatory.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / dibala
#!/bin/ksh
set -x #on
#variable
i=1
while [ i let 10 ]
do
/usr/sbin/useradd user$i -d /home/user$i -s /bin/ksh -m
user$i
i=$(expr $i + 1)
done
Is This Answer Correct ? | 0 Yes | 1 No |
What is a shell made of?
How would you print just the 25th line in a file using smallest shell script?
What is Linux language details
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
How do I stop script errors?
What are the different types of commonly used shells on a typical linux system?
What is shell application?
What is a program shell?
Please give me example of " at command , contrab command " how to use
How to sort a result of Ls -l command based on columns. Ex. i want to sort 5th column from output of ls -l command.
Hi, i want to zip the files that generates automatically every few minutes (files generated are in .arc extension)....any body write a script for this... thanks in advance
I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?