I installed oracle but it didn't gave me any password at the time of installation and directly its asking for confirm your password for system as username at the end of installation.so please can anyone tell me that what will be the password.
The problem is that you are not able to connect to sql. You first check whether environment variables(ORACLE_HOME,PATH,ORACLE_SID) are set or not. While installing the oracle software you must have created a user called "oracle" and you must have added him to dba group as that is a prerequisite to install.So you switch user to oracle(su - oracle) and check whether you set all the variables or not(echo $ORACLE_HOME).If not, you set those and if those are set you try to connect with "sqlplus / as sysdba". As the oracle user is already added in dba group, the SQL window will open with out any problem.And then you can change the password for SYS if you want to.
BTW the default password for SYS is "CHANGE_ON_INSTALL or INTERNAL".
You just have to check whether environment variables set for that user or not(you can set in .bash_profile file of that user) and have to check whether the credentials that you giving while connecting are having previleges or not.
It is possible to connect to the database without specifying a password. Once you've done that you can then reset the passwords. I'm assuming that you've installed the database on your machine; if not you'll first need to connect to the machine the database is running on.
Ensure your user account is a member of the dba group. How you do this depends on what OS you are running.
Enter sqlplus / as sysdba in a Command Prompt/shell/Terminal window as appropriate. This should log you in to the database as SYS.
Once you're logged in, you can then enter
alter user SYS identified by "newpassword";
to reset the SYS password, and similarly for SYSTEM.
(Note: I haven't tried any of this on Oracle 12c; I'm assuming they haven't changed things since Oracle 11g.)