Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 289
  • 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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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