• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » How to create additional User on Oracle Compute instance (Linux/Window)

How to create additional User on Oracle Compute instance (Linux/Window)

November 6, 2019 by techgoeasy Leave a Comment

When we create the Oracle Compute instance (Linux/Window), by default OPC user is created and it has sudo privileges on Linux and adds user account privileges on Windows instance

To create an additional SSH-enabled user on Linux Compute instance

(1) Generate an SSH key pair for the new user.

How to generate ssh key pair on Unix using ssh-keygen

How to Use Puttygen on Windows for key generation

(2) Copy the public key value to a text file for use later in this procedure.

(3) Log in to your instance using the OPC user

(4) Become the root user:

sudo su

  1. Create the new user:

useradd <new_user>

  1. Create a .ssh directory in the new user’s home directory:

mkdir /home/<new_user>/.ssh

  1. Copy the SSH public key that you saved to a text file into the /home/new_

user/.ssh/authorized_keys file:

echo <public_key> > /home/<new_user>/.ssh/authorized_keys

  1. Change the owner and group of the /home/username/.ssh directory to the new user:

chown -R <new_user>:<group> /home/<new_user>/.ssh

  1. To enable sudo privileges for the new user, run the vi sudo command and edit the

/etc/sudoers file as follows:

In /etc/sudoers, look for:

%<username> ALL=(ALL) NOPASSWD: ALL

Add the following line immediately after the preceding line:

%<group> ALL=(ALL) NOPASSWD: ALL

Creating Additional Users on a Windows Instance

  1. Log in to your instance using a Remote Desktop client.
  2. On the Start menu, click Control Panel.
  3. Click User Accounts, and then click User Accounts again.
  4. Click Manage User Accounts.
  5. Click Manage Another Account.
  6. Click Add User Account.
  7. Enter a User name and Password.
  8. Confirm the password, and then create a Password hint.
  9. Click Next.
  10. Verify the account, and then click Finish.

You can now log in as a new user.

Filed Under: Oracle, Oracle cloud

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • Oracle tkprof utility
  • What is Skew in Database?
  • how to find file based on size in linux
  • SQL trace, 10046 event in Oracle
  • How to use sed replace string in file

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us