Home Database Mysql Tutorial Oracle的一些安全加固配置

Oracle的一些安全加固配置

Jun 07, 2016 pm 05:18 PM
oracle database database

Oracle数据库安全往往容易被SA或者DBA所忽视,实则还是需要提高警惕,一下是一些配置和参数以改进Oracle数据库的安全性。

Oracle数据库安全往往容易被SA或者DBA所忽视,实则还是需要提高警惕,一下是一些配置和参数以改进Oracle数据库的安全性。

0. 限制sysdba角色的用户使用远程登录
alter system set remote_login_passwordfile=none scope=spfile;
这个参数默认值为 EXCLUSIVE ,注意,修改后只能从主机上使用OS认证的方式进行登录。

1. 使用profile进行限定资源和口令安全
如果要使用口令管理,以SYS执行 utlpwdmg.sql 脚本。
@?/rdbms/admin/utlpwdmg.sql;
口令帐户锁定相关参数:
FAILED_LOGIN_ATTEMPTS  锁允许登录失败的次数
PASSWORD_LOCK_TIME     达到登录失败次数后,帐户锁定的天数,过了这个天数之后帐户会自动解锁
口令失效和过期相关参数:
PASSWORD_LIFE_TIME     口令的生存期(天)
PASSWORD_GRACE_TIME    口令失效后从第一次成功登录算起的更改口令的宽限期(天)
口令历史记录相关参数:
PASSWORD_REUSE_TIME    可以重新使用口令前的天数
PASSWORD_REUSE_MAX     可以重新使用口令的最多次数
口令校验相关参数: 【Linux公社 】
PASSWORD_VERIFY_FUNCTION 检验口令设置的PL/SQL 函数

如何使用这些参数呢?一是创建新的配置文件,然后把配置文件绑定到用户:
CREATE PROFILE profile_name LIMIT  
FAILED_LOGIN_ATTEMPTS 6
PASSWORD_VERIFY_FUNCTION verify_function
PASSWORD_LOCK_TIME 1/24;
ALTER USER user_name PROFILE profile_name;
如果不需要配置文件了,删除:
DROP PROFILE developer_prof CASCADE

二是直接修改默认的配置文件,,这样对每个使用该配置文件的用户都是生效的:
ALTER PROFILE DEFAULT LIMIT
FAILED_LOGIN_ATTEMPTS 6
PASSWORD_VERIFY_FUNCTION verify_function
PASSWORD_LOCK_TIME 1/24;

2. 设置监听器口令
在10g当中,监听器的口令设置已经过时了,对监听器的任何操作默认情况下变成了OS认证方式,也就是说对监听启动操作的用户可以任意停止监听,而非启动用户则无法对监听器进行停止,但是如果你想要恢复到9i的那种需要口令操作的情况,可以如下设置:
listener.ora文件增加如下一行参数:
LOCAL_OS_AUTHENTICATION_[listener name] = OFF

通过以下方式设置口令:
[oracle@test admin]$ lsnrctl

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 08-AUG-2012 14:42:03

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> change_password
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config --奇怪的是保存失败,需要执行下 set password之后重新保存即可
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
TNS-01169: The listener has not recognized the password
LSNRCTL> set password
Password:
The command completed successfully
LSNRCTL> save_config
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.4)(PORT=1521)))
Saved LISTENER configuration parameters.
Listener Parameter File   /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.ora
Old Parameter File   /u01/oracle/10g/product/10.2.0/db_1/network/admin/listener.bak
The command completed successfully
LSNRCTL>

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1671
14
PHP Tutorial
1276
29
C# Tutorial
1256
24
iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

How does Hibernate implement polymorphic mapping? How does Hibernate implement polymorphic mapping? Apr 17, 2024 pm 12:09 PM

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

How to save JSON data to database in Golang? How to save JSON data to database in Golang? Jun 06, 2024 am 11:24 AM

JSON data can be saved into a MySQL database by using the gjson library or the json.Unmarshal function. The gjson library provides convenience methods to parse JSON fields, and the json.Unmarshal function requires a target type pointer to unmarshal JSON data. Both methods require preparing SQL statements and performing insert operations to persist the data into the database.

How to use database callback functions in Golang? How to use database callback functions in Golang? Jun 03, 2024 pm 02:20 PM

Using the database callback function in Golang can achieve: executing custom code after the specified database operation is completed. Add custom behavior through separate functions without writing additional code. Callback functions are available for insert, update, delete, and query operations. You must use the sql.Exec, sql.QueryRow, or sql.Query function to use the callback function.

MySQL: Simple Concepts for Easy Learning MySQL: Simple Concepts for Easy Learning Apr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

How to connect to remote database using Golang? How to connect to remote database using Golang? Jun 01, 2024 pm 08:31 PM

Through the Go standard library database/sql package, you can connect to remote databases such as MySQL, PostgreSQL or SQLite: create a connection string containing database connection information. Use the sql.Open() function to open a database connection. Perform database operations such as SQL queries and insert operations. Use defer to close the database connection to release resources.

See all articles