473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to grant privileges automatically to newly created user?

Hi all,

I have created a user and I want that all the privileges(select,update,insert,delete etc) should be automatically granted to this newly created user.Please anybody can tell me how can I do that?

Thanks in Advance...
May 11 '07 #1
7 3172
debasisdas
8,127 Expert 4TB
Can u tell me what do u mean by ALL THE PREVILAGES.

What actually u want to grant

Object level previleges ---with/without GRANT option
or
System level previleges.--------with/without ADMIN option
May 11 '07 #2
Can u tell me what do u mean by ALL THE PREVILAGES.

What actually u want to grant

Object level previleges ---with/without GRANT option
or
System level previleges.--------with/without ADMIN option

Yah Deb ..I want to grant object level previleges without grant option.

Thanks
May 11 '07 #3
debasisdas
8,127 Expert 4TB
1.Create a ROLE

2.Grant the previledges u want to grant to the user to the role.

3.Grant the role to the user.


Advantages----If u grant like this granting/revoking previledges becomes more manageble. In future the same bundle of previledges can be granted to another user also without having to grant multiple times.
May 11 '07 #4
1.Create a ROLE

2.Grant the previledges u want to grant to the user to the role.

3.Grant the role to the user.


Advantages----If u grant like this granting/revoking previledges becomes more manageble. In future the same bundle of previledges can be granted to another user also without having to grant multiple times.

You mean everytime a new user is created the role has be granted by somebody with admin rights...but my requirement is as soon as a new user is created those privileges should be granted automatically without anybody typing commands to grant privileges or roles.Is it possible through trigger or procedure or may be oracle has some facility for that?

To explain myself for example
Lets say I created a user .Now as user it created 'grant create session to user' and 'grant select to user' should be granted automatically either through role or one by one.How can I achieve it?Please can you let me know the step to achieve this.

Thanks
May 11 '07 #5
debasisdas
8,127 Expert 4TB
please follow these steps


1.Create a role;

2.Grant the previledges to the role;

3.Grant the role to PUBLIC;

Note:--PUBLIC means to all the users of the database;

4.Create a new user;

Automatically the new user will get all the previledges that is being granted to the ROLE;


Hope this solves your problem.
May 11 '07 #6
Thanks Deb its working

please follow these steps


1.Create a role;

2.Grant the previledges to the role;

3.Grant the role to PUBLIC;

Note:--PUBLIC means to all the users of the database;

4.Create a new user;

Automatically the new user will get all the previledges that is being granted to the ROLE;


Hope this solves your problem.
May 14 '07 #7
debasisdas
8,127 Expert 4TB
You are always welcome
feel free to post your questions/doubts in the forum
But give a try from your side first
and also put how u have tried to solve this question.
it will help experts of the forum in understanding and solving your problem in a better way.

thanx
debasis
May 14 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: | last post by:
I issued the mysql command Grant all on *.* to myid@localhost identified as "mypw"; and recieved the error message ERROR 1045: Access denied for user" '@localhost' (Using password: NO) I...
3
by: Marc | last post by:
Hello, I have 3 users in my MySQL server. One of them has Grant access (actually: all privileges). I cannot login as this user using phpMyAdmin - my password is not accepted (though I' m sure it...
4
by: Amardeep Verma | last post by:
Hi, I have a quick question. Which role/privileges are required before a user can give the statement "GRANT ALL PRIVILEGES"? Thanking you in Advance Have a nice day
0
by: Charles Cantrell | last post by:
I have recently set up mySQL on a Mandrake release of Linux (Version 7 of Mandrake, I believe), using the binary 4.0.13 standard release. The set up and start up all were normal, as far as I...
0
by: Charles Cantrell | last post by:
I have recently set up mySQL on a Mandrake release of Linux (Version 7 of Mandrake, I believe), using the binary 4.0.13 standard release. The set up and start up all were normal, as far as I...
0
by: Marc | last post by:
Hello, I have 3 users in my MySQL server. One of them has Grant access (actually: all privileges). I cannot login as this user using phpMyAdmin - my password is not accepted (though I' m sure it...
1
by: zeus | last post by:
Hi there, I am using Postgresql 7.3 and I want to grant select rights to a user on all tables in a schema, including those that may be created in the future but whose names are not yet known. I...
6
by: john_woo | last post by:
Hi, db2 GRANT all on a_table_name to user me is for a table, I'm wondering possible to grant all on all_tables to user me, without listing all tables' names? -- Thanks John
5
by: Rahul B | last post by:
Hi, I am having the following issues while trying to restrict the current user from creating any objects. Below is the privileges for the user and response when i try to create a table in that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.