Wednesday, March 7, 2012
Login vs. Userid
test environment without restoring master, I break the link
between master..syslogins and each userid in the databases sysusers table. (I cannot restore master as multiple instances of unrelated databases exist on the dataserver)
Can I update the userid's SID entry in the sysusers table to match
what is currently listed for the related login in master's syslogins table,
or are there other columns that are used to create the link between the
userid and login id?You can try update sids but my advice - recreate all logins with sids from your production server:
sp_addlogin [ @.loginame = ] 'login'
[ , [ @.passwd = ] 'password' ]
[ , [ @.defdb = ] 'database' ]
[ , [ @.deflanguage = ] 'language' ]
[ , [ @.sid = ] sid ]
[ , [ @.encryptopt = ] 'encryption_option' ]|||Is it to be assumed that your solution is counting on the Login being
exclusive to the userid being restored?|||This page will help
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q246133|||Create all logins and than restore dbs.|||snail: have to reference rhigdon's link and disagree with you, because this would have worked in 6.5, not in 7.0/2K case, because userid is referencing the SID, not the name field in syslogins.|||During creating logins it needs to set SIDs from production server...
See my first post.
Originally posted by rdjabarov
snail: have to reference rhigdon's link and disagree with you, because this would have worked in 6.5, not in 7.0/2K case, because userid is referencing the SID, not the name field in syslogins.|||rocket39,
I have a TSQL script for realligning user ids at my home. I'll post it for you this evening.
blindman|||I think rhigdon's link contains all the necessary scripts to do just that.|||There is a slight difference, in that my code realligns existing user logins for a given database to match those for the server.
Not as extensive as the code in the link, but usefull if you can't create a particular user under the same ID as another server because the ID is being used, or if there are objects that belong to the user and you don't want to have to drop and recreate them before synchronizing IDs.
blindman|||There is also sp_change_users_login to do sid alignments.|||Those Microsoft bastards stole my code!
Know any good lawyers?
blindman
Login Trigger?
I'm looking for something similar to Oracle's login trigger to limit user
connections. I have an application userid that must have read/write/execute
permissions, but other users who should only have read access are logging in
with this user id. This user id is used by a legacy system and no one how
many places the password is hard coded, so changing the password is not an
option.
Is there a way that I can check the hostname of this user on connection, and
if the connection is not coming from an approved host, deny the connection?
Thanks.
SusanI only know a windows trick MIGHT achieve the effect. You can test this: try
setup the sql server's security policy to only allow certain machines to
login. But if a user login from terminal services or citrix client, you need
to think other methods.
James
"Susan Cooper" wrote:
> Hi,
> I'm looking for something similar to Oracle's login trigger to limit user
> connections. I have an application userid that must have read/write/execute
> permissions, but other users who should only have read access are logging in
> with this user id. This user id is used by a legacy system and no one how
> many places the password is hard coded, so changing the password is not an
> option.
> Is there a way that I can check the hostname of this user on connection, and
> if the connection is not coming from an approved host, deny the connection?
> Thanks.
> Susan
Login Trigger?
I'm looking for something similar to Oracle's login trigger to limit user
connections. I have an application userid that must have read/write/execute
permissions, but other users who should only have read access are logging in
with this user id. This user id is used by a legacy system and no one how
many places the password is hard coded, so changing the password is not an
option.
Is there a way that I can check the hostname of this user on connection, and
if the connection is not coming from an approved host, deny the connection?
Thanks.
Susan
I only know a windows trick MIGHT achieve the effect. You can test this: try
setup the sql server's security policy to only allow certain machines to
login. But if a user login from terminal services or citrix client, you need
to think other methods.
James
"Susan Cooper" wrote:
> Hi,
> I'm looking for something similar to Oracle's login trigger to limit user
> connections. I have an application userid that must have read/write/execute
> permissions, but other users who should only have read access are logging in
> with this user id. This user id is used by a legacy system and no one how
> many places the password is hard coded, so changing the password is not an
> option.
> Is there a way that I can check the hostname of this user on connection, and
> if the connection is not coming from an approved host, deny the connection?
> Thanks.
> Susan
Login Trigger?
I'm looking for something similar to Oracle's login trigger to limit user
connections. I have an application userid that must have read/write/execute
permissions, but other users who should only have read access are logging in
with this user id. This user id is used by a legacy system and no one how
many places the password is hard coded, so changing the password is not an
option.
Is there a way that I can check the hostname of this user on connection, and
if the connection is not coming from an approved host, deny the connection?
Thanks.
SusanI only know a windows trick MIGHT achieve the effect. You can test this: try
setup the sql server's security policy to only allow certain machines to
login. But if a user login from terminal services or citrix client, you need
to think other methods.
James
"Susan Cooper" wrote:
> Hi,
> I'm looking for something similar to Oracle's login trigger to limit user
> connections. I have an application userid that must have read/write/execu
te
> permissions, but other users who should only have read access are logging
in
> with this user id. This user id is used by a legacy system and no one how
> many places the password is hard coded, so changing the password is not an
> option.
> Is there a way that I can check the hostname of this user on connection, a
nd
> if the connection is not coming from an approved host, deny the connection
?
> Thanks.
> Susan
Monday, February 20, 2012
Login Page just refreshes with ASP.NET 2.0 Login Control
I am try to login using the ASP.NET 2.0 Standard Login Control. When I enter the correct userId/Password and hit the Login button, the page just refreshes, no error is displayed. But if I enter wrong userid/password..it give me an error.
Also I check the Membership.ValidateUser() returns true, that means the user is validated, but still I am able to redirect to ReturnURL.?
Is there something wrong with the Authentication, or Creating a cookie. Can somebody shed some light on this,
I have the following machine configuration
Windows XP Pro Service Pack2
IIS 5.1
SQL Server 2000
Visual Studio 2005
DISABLE ANONMYOUS ACCESS IN IIS
ENABLE WINDOWS AUTHENTICATION
I am getting the following output :
Membership.ValidateUser(Login1.UserName, Login1.Password) : - True
HttpContext.Current.User.Identity.Name : - // is blank
User.Identity.IsAuthenticated :- False
User.Identity.AuthenticationType :- // is blank
NOTE : The applicationName is same in web.config as well as in the aspnet_Applications table in SQL Server 2000 membership database.
Do you have an error logged in the SQL Server error log file (name starts with ERRORLOG)?
If not, then you should post the question on an ASP forum.
Thanks
Laurentiu
Login Page just refreshes with ASP.NET 2.0 Login Control
I am try to login using the ASP.NET 2.0 Standard Login Control. When I enter the correct userId/Password and hit the Login button, the page just refreshes, no error is displayed. But if I enter wrong userid/password..it give me an error.
Also I check the Membership.ValidateUser() returns true, that means the user is validated, but still I am able to redirect to ReturnURL.?
Is there something wrong with the Authentication, or Creating a cookie. Can somebody shed some light on this,
I have the following machine configuration
Windows XP Pro Service Pack2
IIS 5.1
SQL Server 2000
Visual Studio 2005
DISABLE ANONMYOUS ACCESS IN IIS
ENABLE WINDOWS AUTHENTICATION
I am getting the following output :
Membership.ValidateUser(Login1.UserName, Login1.Password) : - True
HttpContext.Current.User.Identity.Name : - // is blank
User.Identity.IsAuthenticated :- False
User.Identity.AuthenticationType :- // is blank
NOTE : The applicationName is same in web.config as well as in the aspnet_Applications table in SQL Server 2000 membership database.
Do you have an error logged in the SQL Server error log file (name starts with ERRORLOG)?
If not, then you should post the question on an ASP forum.
Thanks
Laurentiu