hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

vnet576
I'm trying to add execute privelages to a user that I created on a MSSQL database. I have a administrative account which I used to create the new account:
CODE
sp_addlogin 'newuser', 'newpass'

The user is created successfully but afterwards when I try to give execute privelages to the account using this statement:
CODE
GRANT EXECUTE ON master TO newuser

I get an sql_error code without data return...(I'm doing this programmatically in c++ btw).
I tried various variations of that command including using a NULL database...Any ideas?

The Storm
it must be master.. or am I wrong?
vnet576
yes, at least thats what I thought too...I tried adding it to master "ON master" but I guess I'm missing something. Since the only error that I'm getting is -1 which is "SQL_ERROR" I don't have any feedback on what the problem could be.
jacco
you might try these:

Privileges

SELECT: The privilege to retrieve data
INSERT: The privilege to insert new records.
UPDATE: The privilege to modify records.
DELETE: The privilege to delete records.
REFERENCES: The privileges to reference columns of a specific table
USAGE: The privileges to use domains, collations, characters sets etc. etc.

Example

GRANT SELECT,UPDATE ON master TO newuser
vnet576
It has to be specifically EXECUTE...my user already has all entry and data manipulation privelages.
Psychotec
maybe these examples will help wink.gif

The following example grants EXECUTE privilege on the stored command named ListUserTables to the user named Vivian.

GRANT EXECUTE ON COMMAND ListUserTables TO Vivian


The following example grants EXECUTE privilege on the stored procedure named ShowUsers to the users named Jenny and John, and the group Managers.

GRANT EXECUTE ON PROCEDURE ShowUsers TO Jenny, John, Managers


The following example grants EXECUTE privileges on all stored procedures in the InternetFunc to all present and future users using the PUBLIC keyword.

GRANT EXECUTE ON PROJECT InternetFunc TO PUBLIC

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.