webking
4th April 2007, 16:51
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.
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.