It is currently Mon May 21, 2018 6:50 am

I wish for a addaccount command script

All times are UTC - 6 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Sat May 28, 2011 3:12 pm   

Joined: Sat May 28, 2011 2:29 pm
Posts: 1
I aim to automate the task of adding users and domains. My view may be flawed, but until I'm set straight, I think the differences are minute.
  • Domain names will have a dot in the name, and adduser won't accept that (eg.
  • Domains will be moved to /var/www while user accounts are created under /home.
  • There is two skeleton directories to populate the directories. One for users. One for domains.

Important is that users or domain admins, end up in their directory at login. Someone who administers a domain, should not login to /home and then have to browse through the system to the directory of their domain.

What I am thinking, is doing something that:
1. mimics adduser, but accept dots.
2. Asks if it's a domain or user and chose skel directory accordingly.
3. If it's a domain, then "usermod -d /var/www/test -m test".

Am I barking up the wrong tree here? I have never programmed before and I am a dedicated hardwareguy. So I appreciate all the help I can get. I found something that possibly is similar to what I want to do, or probably editable to suit, here: But I don't understand much of it.

I can live with adduser as it is, and have a custom script for domains. But it would be nice to have a consolidated "addacount" command.

4. I guess it is possible to add each user to the MySQL database as well. But how?

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours

Who is online

Users browsing this forum: No registered users and 13 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group