пытаюсь через консоль добавить юзера таким образом:
Код: Выделить всё
/netup/utm5/bin/utm5_urfaclient -debug -x /usr/local/www/apache22/data/import/xml/ -api api.xml -a euro_import_14 -full_name "anatolii Jora Kalinin" -login "hernova7_109" -password "aipsw123" -home_tel "8-912-124-17-27" -is_blocked "0" -balance "310" -credit 0 -tariff_current "1" -mac "50:e5:49:b0:45:39" -dialup_login "hernova7_109" -dialup_password "aipsw123" -unabon "1" -group_id "200" -advance_payment "1" -bank_account "2" -bank_id -building -comments -connect_date -district -email -entrance -flat_number -floor -house_id -icq_number -is_juridical -is_send_invoice -kpp_number -mob_tel -passport -personal_manager -tax_number -web_page -work_tel -commission_coefficient -dealer_account_id -default_commission_value -is_dealer -sale_tax_rate -vat_rate -user_id -discount_period_id -tariff_next -discount_date -expire_date -start_date -unprepay -dont_use_fw -expire_date -ip_address -iptraffic_allowed_cid -iptraffic_login -mask -quota -router_id -start_date -tclass_id -dialup_allowed_cid -dialup_allowed_csid -act_address -jur_address -account_id -iptraffic_password -dialup_allowed_csid
Код: Выделить всё
<?xml version="1.0"?>
<urfa>
<call function="rpcf_add_user">
<parameter name="user_id" value="0"/> <!-- don't touch this line -->
<!-- Parametes syntex definition
<parameter name="test_parameter_name" value="test_parameter_value" comment="Parameter description">
-->
<!-- login and password parameters muts be specified here or in the cmdline -->
<parameter name="login" comment="User login"/>
<parameter name="password" comment="User password"/>
<!-- optional parameters with default values -->
<parameter name="full_name" comment="Full name"/>
<parameter name="is_juridical" comment="1 if juridical person, else 0"/>
<parameter name="jur_address" comment="Juridical address"/>
<parameter name="act_address" comment="Actual address"/>
<parameter name="work_tel" comment="Work telephone"/>
<parameter name="home_tel" comment="Home telephone"/>
<parameter name="mob_tel" comment="Mobile telephone"/>
<parameter name="web_page" comment="Web page"/>
<parameter name="icq_number" comment="ICQ number"/>
<parameter name="tax_number" comment="TAX number"/>
<parameter name="kpp_number" comment="KPP number"/>
<parameter name="bank_id" comment="Integer bank ID"/>
<parameter name="bank_account" comment="Bank account"/>
<parameter name="comments" comment="Comments"/>
<parameter name="personal_manager" comment="Personal manager"/>
<parameter name="connect_date" comment="Unix-timestamp connect date"/>
<parameter name="email" comment="e-mail address"/>
<parameter name="is_send_invoice" comment="1 if send invoices to e-mail, else 0"/>
<parameter name="advance_payment" comment="1 if advance payments enabled, else 0"/>
<parameter name="house_id" comment="Integer house ID"/>
<parameter name="flat_number" comment="Flat number"/>
<parameter name="entrance" comment="Entrance"/>
<parameter name="floor" comment="Floor"/>
<parameter name="district" comment="District"/>
<parameter name="building" comment="Building"/>
<parameter name="passport" comment="Passport"/>
<!-- NOT YET IMPLEMENTED, USE edit_user ACTION
<parameter name="parameter_id" comment="Additional parameter ID"/>
<parameter name="parameter_value" comment="Additional parameter value"/>
-->
</call>
<call function="rpcf_add_account">
<parameter name="is_blocked" comment="Account block type"/>
<parameter name="balance" comment="Balance"/>
<parameter name="credit" value="100" comment="Credit"/>
<parameter name="dealer_account_id" comment="Dealer account id or 0 if no dealer"/>
<parameter name="commission_coefficient" comment="Commission coefficient"/>
<parameter name="default_commission_value" comment="Default commission value"/>
<parameter name="is_dealer" comment="1 for dealer account, 0 for user account"/>
<parameter name="vat_rate" comment="Vat rate"/>
<parameter name="sale_tax_rate" comment="Sale tax rate"/>
<parameter name="int_status" value="1" comment="1 if internet is On, else 0"/>
</call>
<call function="rpcf_save_account">
<!--parameter name="account_id" comment="Account ID"/-->
<if variable="is_blocked" value="16" condition="eq">
<parameter name="is_blocked" value="768" comment="Account block type"/>
</if>
<!--preset parameters-->
<parameter name="credit" value="100" comment="Credit"/>
<parameter name="dealer_account_id" value="0" comment="Dealer account id or 0 if no dealer"/>
<!--parameter name="block_start_date" comment="If blocked, block start date. Default is current date"/>
<parameter name="block_end_date" comment="If blocked, block end date. Default is year 2033"/-->
<parameter name="comission_coefficient" value="0" comment="Commission coefficient"/>
<parameter name="default_comission_value" value="0" comment="Default commission value"/>
<parameter name="is_dealer" value="0" comment="1 for dealer account, 0 for user account"/>
<parameter name="vat_rate" value="0" comment="Vat rate"/>
<parameter name="sale_tax_rate" value="0" comment="Sale tax rate"/>
<parameter name="int_status" value="0" comment="1 if internet is On, else 0"/>
<parameter name="block_recalc_abon" value="0" comment="1 if recalculate recurrent fee in blocked state, else 0"/>
<parameter name="block_recalc_prepaid" value="1" comment="1 if recalculate prepaid units in blocked state, else 0 "/>
<parameter name="unlimited" value="0" comment="1 if unlimited account, else 0"/>
</call>
<call function="rpcf_add_group_to_user">
<parameter name="group_id" comment="User group ID"/>
</call>
<call function="rpcf_get_userinfo">
<parameter name="user_id" comment="User ID"/>]
</call>
<call function="rpcf_link_user_tariff">
<parameter name="account_id" comment="Account ID, default is basic account"/>
<parameter name="tariff_current" comment="Current discount period tariff"/>
<parameter name="tariff_next" comment="Next discount period tariff, default is same as tariff_current"/>
<parameter name="discount_period_id" comment="Discount period ID"/>
</call>
<set src="tariff_current" dst="tariff_id"/>
<call function="rpcf_get_tariff"/>
<for name="j" from="0" count="size(service_id_array)">
<set src="link_by_default_array" src_index="j" dst="link_by_default"/>
<if variable="link_by_default" value="1" condition="eq">
<set src="service_id_array" src_index="j" dst="service_id"/>
<set src="service_type_array" src_index="j" dst="service_type"/>
<set dst="return_type" value=""/>
<if variable="service_type" value="1" condition="eq">
<call function="rpcf_add_service_to_user">
<parameter name="discount_date" comment="Discount date for once service"/>
</call>
</if>
<if variable="service_type" value="7" condition="eq">
<call function="rpcf_add_service_to_user">
<parameter name="is_blocked" comment="Block type in numeric form"/>
<parameter name="discount_period_id" comment="Discount period ID"/>
<parameter name="start_date" comment="Service start date (unix timestamp)"/>
<parameter name="expire_date" comment="Service expire date (unix timestamp)"/>
<parameter name="unabon" value="1"/>
<parameter name="unprepay" comment="Decrease prepayed units in blocked state"/>
</call>
</if>
<if variable="service_type" value="5" condition="eq">
<call function="rpcf_add_service_to_user">
<parameter name="is_blocked" comment="Block type in numeric form"/>
<parameter name="discount_period_id" comment="Discount period ID"/>
<parameter name="start_date" comment="Service start date (unix timestamp)"/>
<parameter name="expire_date" comment="Service expire date (unix timestamp)"/>
<parameter name="unabon" value="1"/>
<parameter name="unprepay" comment="Decrease prepayed units in blocked state"/>
<parameter name="ip_address" comment="IP-address array for IP-traffic service"/>
<parameter name="mask" comment="IP mask array for IP-traffic service"/>
<parameter name="mac" comment="MAC address array for IP-traffic service"/>
<parameter name="iptraffic_login" comment="Service link login"/>
<parameter name="iptraffic_allowed_cid" comment="Allowed CID"/>
<parameter name="iptraffic_password" comment="Service link password"/>
<parameter name="ip_not_vpn" value="1" comment="1 if IP is not VPN, else 0"/>
<parameter name="dont_use_fw" comment="1 if don't use firewall, else 0"/>
<parameter name="router_id" comment="Router ID for each IP-address"/>
<parameter name="tclass_id" comment="TClass array for quotas"/>
<parameter name="quota" comment="Quotas array"/>
</call>
</if>
<if variable="service_type" value="2" condition="eq">
<call function="rpcf_add_service_to_user">
<parameter name="is_blocked" comment="Block type in numeric form"/>
<parameter name="discount_period_id" comment="Discount period ID"/>
<parameter name="start_date" comment="Service start date (unix timestamp)"/>
<parameter name="expire_date" comment="Service expire date (unix timestamp)"/>
<parameter name="unabon" value="1"/>
<parameter name="unprepay" comment="Decrease prepayed units in blocked state"/>
<parameter name="callback_enabled" value="0"/>
<parameter name="dialup_login" comment="Service link login"/>
<parameter name="dialup_allowed_cid" comment="Allowed CID"/>
<parameter name="dialup_allowed_csid" comment="Allowed CSID"/>
<parameter name="dialup_password" comment="Service link password"/>
</call>
</if>
</if>
</for>
</urfa>
Код: Выделить всё
Notice: Dec 03 20:04:56 UTM5 Config: Processing config file: /netup/utm5/utm5_urfaclient.cfg
Processing action: euro_import_14
<call> tag: rpcf_add_user
ERROR: code 13 (Permission denied)