A different name for SQL Server user

aliweb

Perch
Hello

When we create a new SQL Server user in HSphere it automatically adds a prefix to it like xyz-dom_
For example if I add a new user dbadmin then it will be added as xyz-dom_dbadmin.

Is there a way I can name new user only dbadmin?
The reason I am asking because one of my clients is running a DLL in his ASP.Net application. That DLL uses some database user for e.g. abc but problem is this user can't be created through HSphere as it will add prefix to it. That DLL can't be modified because he doesn't have its source code!!
 
Doesn't someone have access via Enterprise Manager -- then you could use the user generic_admin to create whichever other user(s) you needed? My MS SQL DBA skills are very rusty, but I am thinking you could even just run a script to the effect of Create User DBADMIN...

The reality is both Hsphere and the DLL are written poorly if they don't give you a little more flexibility (although the DLL author can be excused if it was written for a particular inhouse use). I imagine finding the code for the DLL would be easier, assuming it is licensed properly, and getting that modified. Most devolpers are pretty nice guys...
 
@timruns
No it won't allow to create a new user throught Enterprise Manager unless you are logged in as 'sa'.
 
The reality is both Hsphere and the DLL are written poorly if they don't give you a little more flexibility

I don't think you can really blame HSphere much for this. It makes a lot of sense to force db and user names into a standard format on shared hosting. If everyone simply chose their own name then what happens if two people want the same name? I guess you can have first come, first served but then things can get complicated if you want to move to a different server and hit a conflict with someone else or something becomes a reserved word on a server upgrade etc.

Here are two suggestions that are probably last resorts with limited chance of success but ... you never know. If the DLL is obfuscated then probably neither will work.

I assume this is a .NET DLL. There are decompilers for .NET. Unfortunately, good ones are not cheap to buy.

If the user name buried in the DLL now is at least as long as one you can create with HSphere then you might be able to find it as a unicode string in the DLL and change it with a binary / hex editor. Keep it the same length by padding with spaces. I'm not sure if that then causes a security issue and stops the DLL from working because hash checksums etc no longer add up. It might depend on if the DLL has been signed. Many years ago back in the dos days when it took three days to send a file to a remote customer via snail mail, I managed to get him to patch an EXE over the phone using dos debug to change a page size on a invoice print. :)

Cheers
Ross
 
BTW Yes we can manually make logins but it leaves a big mess and the user_ prefix makes it MUCH easier for us to do restores, etc. It also allows for better accounting and abuse tracing.
 
BTW Yes we can manually make logins but it leaves a big mess and the user_ prefix makes it MUCH easier for us to do restores, etc. It also allows for better accounting and abuse tracing.

That's what I told my user too ;)
 
If the user name buried in the DLL now is at least as long as one you can create with HSphere then you might be able to find it as a unicode string in the DLL and change it with a binary / hex editor. Keep it the same length by padding with spaces. I'm not sure if that then causes a security issue and stops the DLL from working because hash checksums etc no longer add up. It might depend on if the DLL has been signed. Many years ago back in the dos days when it took three days to send a file to a remote customer via snail mail, I managed to get him to patch an EXE over the phone using dos debug to change a page size on a invoice print. :)

Cheers
Ross

It won't work :)
But I like the way you thought
 
Back
Top