how to create 100 users at a time in solaris?
Answers were Sorted based on User's Feedback
Answer / hi
We need to write scripting for tht. Write a scripting program to add 100 users at a time.
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / nitin thakur
Write a script with make, make can run in parallel. It can
fork 100 process in one go.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / satish
#!/bin/ksh
#
# Adds users from the userlist.txt file if they are not in
# /etc/passwd.
#
CURRENTUSERS=`awk -F":" '{ print $1 }' /etc/passwd`
EXPECTEDUSERS=`cat userlist.txt`
USERFOUND=0
for i in $EXPECTEDUSERS ; do
for x in $CURRENTUSERS ; do
if [ "$x" = "$i" ] ; then
USERFOUND=1
fi
done
if [ $USERFOUND -eq 1 ] ; then
echo Found user: $i
USERFOUND=0
else
/usr/sbin/useradd -d /home/$i -g wheel $i
echo Adding user: $i
sed s/$i:.*:.*:.*:.*:.*:.*:.*:/$i:XOHWcSkDQKZaA:14208:0:99999:7:::/g </etc/shadow>/etc/shadow2
cp /etc/shadow2 /etc/shadow
rm /etc/shadow2
fi
done
exit 0
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / raghu
There is a script to write......
we can create 100 users at a time in solaris while using for loop condition......
i know about the script......its very important script not to tell like this,, in this........personal send me the message i ll mail to u ok...................its so simple script....
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / net star
Just prepare a /etc/passwd file in notepad for all users ..
and paste to passwd file and rnu pwconv file.
| Is This Answer Correct ? | 1 Yes | 3 No |
Tell me how to solve the system hung issue. Found that the memory state is free, commands to check and solve the issue?
How do you delete tmp files if file system is full becoz of /tmp dir ?
how to check network card speed ? set it mode(half/full duplex)? ndd -get /dev/hme0 link-speed
How to solve the system hang issue.
User is not able to perform cron jobs. How do u troubleshoot?
how to set default runlevel in solaris.How to set the default Runlevel as INIT-2.
What is top cmd?
Port no for telnet (23) , ssh(22)?
1.Have you used vxboot ? 2.Minimum requirement for mirror volume to created ?
Hi friends this is rakesh recently i went to an interview there they asked me what is the port number using to connect telnet from one system to another system and what deamon is used to connect telnet.
How to upgrade diskgroup? Vxdg upgrade
Tell me how to discover global zone name from local zone?