Tuesday, January 27, 2009

How to add a user in the freeBSD using a shell script?

Adding a user in the FreeBSD using a shell script

touch useradd.txt
echo "$linux_login::::::::bash:" > useradd.txt


/usr/sbin/adduser -f useradd.txt -k $skeldir $linux_login -w no


sample useradd.txt file
-----------------------
test::::::::bash: