Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: User needs to change password

Re: Newbie: User needs to change password

From: Andrew Allen <andrew.allen_at_handleman.com>
Date: Tue, 25 Feb 2003 20:53:55 GMT
Message-ID: <3E5BCAD4.4060403@handleman.com>


Rauf Sarwar wrote:
> "Patrick L. Nolan" <pln_at_cosmic.stanford.edu> wrote in message news:<b3elbc$dfn$1_at_news.Stanford.EDU>...
>

>>Have mercy.  We're starting to learn Oracle 9.0.1 here.
>>Until now I have done everything from the DBI account,
>>since I was working alone.  Now there's somebody else
>>and we want to set up user accounts properly.  I made
>>one for the new guy with
>>  create user joeuser identified by <password>;
>>So far so good.  I can modify the password with ALTER
>>USER.  But it seems like good practice to allow him to
>>set his own password.  I can't figure out how to do
>>that.  Probably it would require granting him some
>>privilege or role, but I haven't been able to figure
>>out which one.  Can someone illuminate me?

>
>
> Just granting create and alter session will do it. Here's how,
>
> SQL> connect sys/xxxxx as sysdba
> Connected.
>
> SQL> create user foo identified by foo;
>
> User created.
>
> SQL> grant create session to foo;
>
> Grant succeeded.
>
> SQL> grant alter session to foo;
>
> Grant succeeded.
>
> SQL> connect foo/foo
> Connected.
> SQL> alter user foo identified by new_foo;
>
> User altered.
>
> SQL> connect foo/new_foo
> Connected.
> SQL> connect sys/xxxxx as sysdba
> Connected.
> SQL> drop user foo;
>
> User dropped.
>

The following sql will force the user to change his password the first time he tries to use his account (SQL*Plus).
create user       jouser identified by Change_This_Passowrd_Now
         default   tablespace users
         temporary tablespace temp
         quota     10m on users
         password  expire;

grant create session to jouser;
grant create table to jouser; Received on Tue Feb 25 2003 - 14:53:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US