View Single Post
Old 4th April 2007, 17:51
webking webking is offline
Junior Member
Join Date: Mar 2007
Posts: 29
Thanks: 3
Thanked 0 Times in 0 Posts
Wink Shell Scripting Help...

Hi all,

How difficult is it to get this pseudo code to work under SHELL? This is the task I do every day. I m not sure how to start it. can anyone help?

useradd username
usermod -g username username
passwd username
vi /etc/passwd
define home dir
cd ~username
remove all data
then go to /home/usrbak
cp username.tar.gz to /tmp
cd tmp
gzip -d username.tar.gz
tar -xf username.tar
mv * ~username
vi /usr/local/apache/conf/include-conf/vhosts
add the domain within the vhost
cd ~username
chown -R username:username .
chmod -R 755 .
service httpd restart

Any assistance would be helpful. Thanks in adv.
Reply With Quote
Sponsored Links