Hello.
I have recently set up a new server, and decided to mess with Virtualmin as a hosting panel. I am working on coding up a PHP front end for the server, but I need to figure out how your command line system works first. I looked through the documentation for the CLI, and found what I need but when ever I run the command to add an account, it always gives an error.
So here is what I am trying to do from CLI:
Create an account for Domain test.com
Description will be a acc #, like 1234
Password will be "test" in this example
It will use the "Default Template"
it will go with the plan named "Free Plan"
It will get its limits, and functions from the plan and template.
Give the site a static IPv6 from my pool of addresses
make the site an account, just like if I made it from the virtualmin panel.
The plan has all features enabled, minus mailing lists and some admin features.
So heres the command I run...
virtualmin create-domain --domain test.com --pass test --unix --dir --desc "1234" --allocate-ip6 --template "Default Settings" --plan "Free Plan" --limits-from-plan --features-from-plan
But the error I get is this:
Mail for the domain cannot be enabled unless an administration user is created.
When I add an account using virtualmin I never have this issue, and I have yet to find a way to fix this from searching this forum. Is anyone able to help me out?
Howdy,
Try passing in the --user parameter, it looks as if something is causing it not to create that.
-Eric
Threw in --user, same error comes out.
Any other ideas?
The command line you shared above -- even without adding the --user option -- actually works for me as-is.
Since I don't have a plan named "Free Plan", I changed that to "Default Plan", but it otherwise worked.
I suspect that means something within your free plan is causing what you're seeing.
What features is that plan set to try and setup by default?
-Eric
Well I have two plans currently, A free plan and unlimited plan. Here are my settings for the Free Plan:
Basic Plan Details:
Quota for entire server 500MB
Quota for server administrator user Unlimited
Limit on number of mailboxes At most 2
Limit on number of aliases At most 10
Limit on number of databases At most 2
Limit on number of virtual servers At most 0
Limit on number of alias servers At most 0
Limit on number of non-alias servers At most 0
Bandwidth limit At most 10 GB every 30 days
Can choose database names? No
Can rename domains? No
Allow sub-servers not under this domain? No
Allow sub-servers under other users' domains? No
Selected Allowed Server Features:
BIND DNS domain
Apache website
MySQL database
Virus Filtering
DAV Login
Home directory
Mail for Domain
Webalizer reporting
log file rotation
spam filtering
webmin login
awstats reporting
Selected Allowed Capabilities:
Can manage users
Can manage aliases
Can manage databases
Can install scripts
Can edit forwarding and proxies
Can edit website redirects
Can manage extra admins
Can configure spam and virus delivery
Can edit website options
Can edit email settings
Can make backups
Can schedule backups
Can restore backups
Can create catchall aliases
Can change domain's password
Can change DNS options
Can edit DNS records
All scripts allowed
So can anyone else help me here? :( Really stuck on this... The command is always ran from root.
Howdy,
Well, I'm curious if you have the same problem when using the default plan.
However, I suspect the issue is something within the "Default available features".
You may want to try enabling some options to see if any of them resolve your issue. Especially options relating to users... the Administration User option, for example.
-Eric
ok, il mess with that today and see what I can figure out.
I just find it strange it can create accounts from the web panel with no issues, yet it can't from command line.
Nice catch man, I had administrative user de-selected! all is good now! :)
I owe you a beer or non-alcoholic beverage!