• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Disable and Remove database login?

hi,

how do i remove and disable user logins for a DB database? if possible, can someone please also advise if i can just remove the user from a group.

thanks in advance
0
alcojoe
Asked:
alcojoe
  • 2
2 Solutions
 
ocgstylesCommented:
hi alcojoe,

by default, db2 uses OS security.  so if you disable the account at OS level, AND the authentication type is set to SERVER, that is an option.

you can also REVOKE the connect privilege from that user:

REVOKE CONNECT ON DATABASE TO USER <USERID>

and again, since authentication takes place at the OS level, by removing the user from the OS group, they will be removed from the database group.

- Keith
0
 
sachinwadhwaCommented:
Keith is right,

except there is one error, it should be:

REVOKE CONNECT ON DATABASE FROM USER <USERID>

I would also suggest that one should always revoke connect from PUBLIC (unless required).

CONNECT TO DATABASE USER <db2admin> using <password>
REVOKE CONNECT ON DATABASE FROM PUBLIC
0
 
ocgstylesCommented:
woops...  thanks for the catch sachinwadhwa
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now