This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Remove zadmin_ prefix from database
#1
Remove zadmin_ prefix from database
I have installed Sentora to my Ubuntu 14.04 VPS and it seems to work fine.
Just one thing so far that I find annoying is that I can't seem to find a way to remove/change default prefix to database name.
Reply
Thanks given by:
#2
RE: Remove zadmin_ prefix from database
Hello,

https://github.com/sentora/sentora-core/...er.ext.php
This is where the databases are created, so also where the name is given to the database.

I will try to remove the prefix for you. Remember, when I remove it in the controller, it won't disappear in the page you see. The page is rendered based on another file.

In the file /modules/mysql_databases/code/controller.ext.php, you need to edit line 101.
Original:
Code:
$db = $zdbh->mysqlRealEscapeString($currentuser['username'] . "_" . $databasename);
Replacement:
Code:
$db = $zdbh->mysqlRealEscapeString($databasename);

To delete the prefix in the form, you need to edit this:
File: modules/mysql_databases/module.zpm. Line 72:
Original:
Code:
<td nowrap="nowrap"><@ CurrentUserName @>_<input name="inDatabase" type="text" id="inDatabase" size="30" /></td>
Replacement:
Code:
<td nowrap="nowrap"><input name="inDatabase" type="text" id="inDatabase" size="30" /></td>

I am not responsible for every kind of disadvantages caused. You are trying this on your own risk. I haven't tested this code!
15 years old - HTML - CSS - PHP - Java - Android - jQuery - Javascript
Reply
Thanks given by: apinto
#3
RE: Remove zadmin_ prefix from database
vuks89 I advise you to think clearly about removing "zadmin_" from the db.
The sentora devs are trying to ADD zadmin_ to FTP accounts and to MySQL usernames (thank you Rick Wink ), and they are doing it for a good reason.

Rick I do not believe you should spend your valuable time doing this as it is a clear step back from what we already have. Although I do value your efforts Smile

Anyways, think about all the issues it can cause.
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#4
RE: Remove zadmin_ prefix from database
Hi again.

Not to be mistaken, I don't have any problem with having prefix to database name and/or FTP account, but I'd like to be able to define it for myself.
If it posses the security threat to not have it, doesn't it make just as much as threat to have one that everybody knows about? Smile
Reply
Thanks given by:
#5
RE: Remove zadmin_ prefix from database
It is defined by the account user name... if username is freddy12, then the db, ftp, etc. will be freddy12_
This is so that the admin can tell which databases, ftps, etc. belong to what user at a glance and helps keep everything organized.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#6
RE: Remove zadmin_ prefix from database
(06-09-2015, 08:48 AM)apinto Wrote: @[Rick] I do not believe you should spend your valuable time doing this as it is a clear step back from what we already have. Although I do value your efforts Smile

My time isn't that valuable. My year of school is almost finished, so I actually can't screw it up anymore. I just want to help him. If this is really what fits his needs, he should use Sentora this way.
15 years old - HTML - CSS - PHP - Java - Android - jQuery - Javascript
Reply
Thanks given by:
#7
RE: Remove zadmin_ prefix from database
(06-10-2015, 03:14 AM)Rick Wrote:
(06-09-2015, 08:48 AM)apinto Wrote: @[Rick] I do not believe you should spend your valuable time doing this as it is a clear step back from what we already have. Although I do value your efforts Smile

My time isn't that valuable. My year of school is almost finished, so I actually can't screw it up anymore. I just want to help him. If this is really what fits his needs, he should use Sentora this way.

Well, this will break future updates of Sentora for him. So it is not suggested to do this. He will have to remember to make these changes whenever an update is released Wink
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#8
RE: Remove zadmin_ prefix from database
(06-11-2015, 01:22 AM)TGates Wrote:
(06-10-2015, 03:14 AM)Rick Wrote:
(06-09-2015, 08:48 AM)apinto Wrote: @[Rick] I do not believe you should spend your valuable time doing this as it is a clear step back from what we already have. Although I do value your efforts Smile

My time isn't that valuable. My year of school is almost finished, so I actually can't screw it up anymore. I just want to help him. If this is really what fits his needs, he should use Sentora this way.

Well, this will break future updates of Sentora for him. So it is not suggested to do this. He will have to remember to make these changes whenever an update is released Wink

Yes, but if this is really what he wants, who am I to say no to him? He is responsible for the consequences of his own choices...
15 years old - HTML - CSS - PHP - Java - Android - jQuery - Javascript
Reply
Thanks given by:
#9
RE: Remove zadmin_ prefix from database
If any one know how I can use this? I need 2 special ftp accounts that do not have a prefix.... any help would be awesome
Reply
Thanks given by:
#10
RE: Remove zadmin_ prefix from database
You need to hack the DB and change manually the use name in MySQL table.

BUT this is not adviced or support. Even cpanel have a prefix for all users.

M B
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
MySQL Database user prefix MosleyCale 1 5 ,657 10-17-2020, 09:11 PM
Last Post: Ron-e
Critical Error: [0100] - Unable to connect or authenticate to the Sentora database whatshisface77 1 4 ,447 07-31-2020, 10:58 AM
Last Post: whatshisface77
repo browser Critical Error: [0144] - Sentora database 'query' error (42000). zustudios 0 4 ,462 12-21-2019, 08:08 AM
Last Post: zustudios

Forum Jump:


Users browsing this thread: 5 Guest(s)