Insert DB users by script/code  | |
March 22nd, 2009, 03:50 PM
|
#1 (permalink)
| | Member
Join Date: Mar 2005
Posts: 87
| Insert DB users by script/code
Hello all
I am not sure if this can be done...
Can you insert a DBO or DBA (database user/admin) by scripts or visual basic code? Can these users be created like this?
Thank you for your smart answers!!!  |
| |
March 22nd, 2009, 03:55 PM
|
#2 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 14,982
|
If you can do it manually it can be done with a script. |
| |
March 22nd, 2009, 04:02 PM
|
#3 (permalink)
| | Member
Join Date: Mar 2005
Posts: 87
|
Thank you for your reply!
That's what I think but haven't been able to pull it.
Do you have an idea on how to ?
Thank you, |
| |
March 22nd, 2009, 04:35 PM
|
#4 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 14,982
|
All you really need to do is setup the script to connect to the database and then run the SQL queries you need to add the user/admin.
I've never worked with databases through visual basic, so I can't tell you how. There are probably tons of tutorials if you search through google though. |
| |
March 23rd, 2009, 03:50 PM
|
#5 (permalink)
| | Caveat Emptor
Join Date: Mar 2005 Location: Out of my mind
Posts: 3,241
|
That could depend on the interface too. If it's done via some type of web page or program or application, you have no idea (or maybe you do) what tirggers or procedures can be firing off in the background. A script will not be able to duplicate this (e.g. creating a hash value for a row entry). |
| |
March 23rd, 2009, 03:59 PM
|
#6 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 14,982
|
If a different script is currently being used to insert the data you'd of course have to figure out exactly what and how it is inserting the data as well.
If a different script is inserting it you can still duplicate it as long as you know what things are happening with the data, like if a password is being hashed with md5 or something (which BTW is a very bad idea to use MD5 alone for passwords). |
| |
March 23rd, 2009, 07:44 PM
|
#7 (permalink)
| | Member
Join Date: Mar 2005
Posts: 87
|
So...
I know I can add rows to a table I created. And I know how to do that.
BUT...
Can I add rows to a system database? not one I created but those that are managed by the server? like "sa" user... |
| |
March 23rd, 2009, 09:08 PM
|
#8 (permalink)
| | Caveat Emptor
Join Date: Mar 2005 Location: Out of my mind
Posts: 3,241
|
Probably not. Depends on who's doing secuitry on the database. That person would grant SELECT, INSERT, DELETE etc. access on any given table. And usually a "system" table would not be updated by a user. |
| |
March 23rd, 2009, 09:23 PM
|
#9 (permalink)
| | SoMuchAnime-SoLittleTime
Join Date: Aug 2003 Location: Plymouth, WI
Posts: 14,982
|
If you setup the server to accept incoming connections from your IP address (by default, database systems should only accept local requests from the same machine for security) and have access to a user who has permission to insert rows then it should work.  |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |