Add users in Linux-for example, Oracle

Source: Internet
Author: User

In Linux, how does one add Oracle user information? The following describes how to add Oracle user information in detail, hoping to give you a deeper understanding of Oracle user information.

Create a user group oinstall:
# Groupadd oinstall

Create a user group DBA:
# Groupadd DBA

Create a user home directory/u01/Oracle:
# Mkdir-P/u01/Oracle

Create a user from Oracle to the main group oinstall, sub-group dBA, home directory/u01/Oracle:
# Useradd-G oinstall-g dba-D/u01/Oracle

If an oracle user already exists:
# Usermod-G oinstall-g dba-D/u01/Oracle

View the addition of Oracle
# ID Oracle

View the Oracle group:
# Groups Oracle

Change/u01 owner to Oracle
# Chown-r ORACLE: oinstall/u01

This section describes how to add Oracle user information in Linux.

 

[Root @ websvr01 ~] #Groupadd ftpusrs
[Root @ websvr01 ~] #

[Root @ websvr01 ~] #Useradd-D/home/ftp01 ftp_usr
[Root @ websvr01 ~] #

 

[Root @ websvr01 ~] #Passwd ftp_usr
Changing password for user ftp_usr.
New UNIX password:
Bad password: it is based on a dictionary word
Retype new Unix Password:
Passwd: All authentication tokens updated successfully.
[Root @ websvr01 ~] #

 

[Root @ websvr01 ~] #Usermod-S/sbin/nologin ftp_usr // limits that ftp_usr cannot be used for telnet, and only FTP
[Root @ websvr01 ~] #

[Root @ websvr01 ~] #Usermod-S/sbin/bash ftp_usr // user ftp_usr returns to normal
[Root @ websvr01 ~] #

[Root @ websvr01 ~] #Usermod-D/ftp_usr // although the root directory does not contain the ftp_usr directory !!!
[Root @ websvr01 ~] # Ll/
Total 162
Drwxr-XR-x 2 root Root 4096 May 3 Bin
Drwxr-XR-x 4 Root 1024 May 2 boot
Drwxr-XR-x 8 Root 6480 May 3 Dev
Drwxr-XR-x 88 Root 12288 May 3 etc
Drwxr-XR-x 3 Root 4096 May 3 home
Drwxr-XR-x 2 root Root 4096 Feb 21 2005 initrd
Drwxr-XR-x 12 Root 4096 May 3 lib
Drwx ------ 2 root Root 16384 May 2 lost + found
Drwxr-XR-x 4 Root 4096 May 3 Media
Drwxr-XR-x 2 root Root 4096 Jul 25 2008 Misc
Drwxr-XR-x 3 Root 4096 May 2 mnt
Drwxr-XR-x 2 root Root 4096 Feb 21 2005 OPT
Dr-XR-X 67 Root 0 May 3 08:28 proc
Drwxr-x --- 14 Root 4096 May 3 13:47 Root
Drwxr-XR-x 2 root Root 12288 May 3 sbin
Drwxr-XR-x 2 root Root 4096 May 2 SELinux
Drwxr-XR-x 2 root Root 4096 Feb 21 2005 srv
Drwxr-XR-x 9 Root 0 May 3 08:28 sys
Drwxrwxrwt 5 root Root 4096 May 3 TMP
Drwxr-XR-x 15 Root 4096 May 2 USR
Drwxr-XR-x 22 Root 4096 May 2 VaR
[Root @ websvr01 ~] #

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.