惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
M
MIT News - Artificial intelligence
D
Docker
量子位
T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
月光博客
月光博客
有赞技术团队
有赞技术团队
J
Java Code Geeks
A
About on SuperTechFans
P
Proofpoint News Feed
Jina AI
Jina AI
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
GbyAI
GbyAI
F
Fortinet All Blogs

博客园 - simhare

Fix “Windows cannot access the specified device path or file” Error Domain Space mysql 登录后 修改密码 git delete repository php - func_get_args mysql key mul - 看不懂 mysql show create table `tablename` 查看建表语句 zend framework assumptions linux vsftpd linux chkconfig pkill kill 看看自己是谁 linux 本地编码-如何解决乱码 博文阅读密码验证 - 博客园 yum 只下载不安装 mysql netstat linux pts tty linux pts Linux 启动 进入单用户模式 其他用户无法连接 apache start stop
linux添加用户-例如oracle
simhare · 2013-05-03 · via 博客园 - simhare

何在Linux环境下添加Oracle用户信息呢?下文对Oracle用户信息的添加方法作了详细的介绍,希望可以让您对Oracle用户信息方面有更深的认识。

创建一个用户组oinstall: 
# groupadd oinstall

创建一个用户组dba: 
# groupadd dba

创建一个用户主目录/u01/oracle: 
# mkdir -p /u01/oracle

创建用户oracle 到主组oinstall,副组dba,主目录/u01/oracle: 
# useradd -g oinstall -G dba -d /u01/oracle oracle

如果oracle用户已经存在则: 
# usermod -g oinstall -G dba -d /u01/oracle oracle

查看用户oracle的添加情况 
# id oracle

查看oracle所属的组: 
# groups oracle

把/u01的所有者改为oracle
# chown -R oracle:oinstall /u01

以上Linux环境下添加Oracle用户信息的方法介绍。

[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  //限定用户ftp_usr不能telnet,只能ftp
[root@websvr01 ~]#

[root@websvr01 ~]# usermod -s /sbin/bash ftp_usr //用户ftp_usr恢复正常
[root@websvr01 ~]#

[root@websvr01 ~]# usermod -d /ftp_usr ftp_usr //尽管根目录下没有ftp_usr这个目录!!!
[root@websvr01 ~]# ll /
total 162
drwxr-xr-x 2 root root 4096 May 3 13:38 bin
drwxr-xr-x 4 root root 1024 May 2 11:57 boot
drwxr-xr-x 8 root root 6480 May 3 12:30 dev
drwxr-xr-x 88 root root 12288 May 3 15:11 etc
drwxr-xr-x 3 root root 4096 May 3 15:03 home
drwxr-xr-x 2 root root 4096 Feb 21 2005 initrd
drwxr-xr-x 12 root root 4096 May 3 13:37 lib
drwx------ 2 root root 16384 May 2 07:53 lost+found
drwxr-xr-x 4 root root 4096 May 3 12:30 media
drwxr-xr-x 2 root root 4096 Jul 25 2008 misc
drwxr-xr-x 3 root root 4096 May 2 13:04 mnt
drwxr-xr-x 2 root root 4096 Feb 21 2005 opt
dr-xr-xr-x 67 root root 0 May 3 08:28 proc
drwxr-x--- 14 root root 4096 May 3 13:47 root
drwxr-xr-x 2 root root 12288 May 3 13:38 sbin
drwxr-xr-x 2 root root 4096 May 2 11:53 selinux
drwxr-xr-x 2 root root 4096 Feb 21 2005 srv
drwxr-xr-x 9 root root 0 May 3 08:28 sys
drwxrwxrwt 5 root root 4096 May 3 13:46 tmp
drwxr-xr-x 15 root root 4096 May 2 12:03 usr
drwxr-xr-x 22 root root 4096 May 2 12:10 var
[root@websvr01 ~]#