Sponsored Content
Top Forums UNIX for Dummies Questions & Answers editing sqlplus id@passwd in multiple scripts, users and directories Post 302116823 by Helmi on Tuesday 8th of May 2007 11:08:00 PM
Old 05-09-2007
thanks all!
i try to think that if the script to edit the sqlplus is running, it will also edit the all the variables that set in that editing scripts. Hence, if being executed for the second time, nothing will changed, right?

using:
Code:
find . -type f -exec grep -l sqlplus.*\@ {} \;

will result:
Code:
./sql
./editor.sh

where editor.sh contained those variable of sqlplus. how to avoid this editor.sh also being edited? But, anyway, it is okay since i have to run this jus t once. Thanks again

Regards,
Helmi
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sqlplus and sh scripts (to_char command))

Hi evrybody!!!! I have a problem with this shell script INICIO=$(sqlplus -s user/user@db1 << END | awk '{printf $1}' set head off set feed off select to_char(min(create_dt) , 'HH24') from table_name where trunc(create_dt)=trunc(sysdate-2); END) I want to recover, in INICIO, the min... (4 Replies)
Discussion started by: josecollantes
4 Replies

2. Shell Programming and Scripting

Scripts for ID´s free in /etc/passwd

As extracting of the file /etc/passwd the ID´s that have not been used in a range specifies. (2 Replies)
Discussion started by: oscar_acm
2 Replies

3. Shell Programming and Scripting

SQLplus in Shell scripts

How to execute a query which is stored in a variable. Say for example : v_source_query=”select count(*) from emp” v_source_value=`sqlplus -S "$DATABASE_LOGIN" << EOF | tr '\n' ' ' set feed off set pagesize 0 set head... (12 Replies)
Discussion started by: trupti_d
12 Replies

4. Shell Programming and Scripting

append 3 users in /etc/passwd

I am looking to add 3 lines in /etc/passwd via a script. Can you please give me an idea on how to write a script that can do that? (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

5. Shell Programming and Scripting

Number of users in passwd

This command prints out username/users in /etc/passwd: cut -d ':' -f '1,5' /etc/passwd | sort I wonder if I also, after above commands output, can get an output that lists number of users in the group? I need to use uniq to get rid of duplicates. I´ve tried this, but cant get it right, can... (5 Replies)
Discussion started by: oskis
5 Replies

6. UNIX and Linux Applications

how to execute multiple .sql scripts from within a shell script using sqlplus

using sqlplus I want to execute a .sql script that has dbms_output statments in rhe script. I want to write the dbms_output statements from .sql file to a log file. is this possible. thanks any help would be appreciated :wall: (1 Reply)
Discussion started by: TRS80
1 Replies

7. Shell Programming and Scripting

Find and execute shell scripts in multiple sub directories in parallel

I have one parent directory and within that parent directory there are several other sub-directories and within those sub-directories there are several other "large number" of sub-directories. All the sub directories have a shell script in them with a common file name execute_command.sh I want... (4 Replies)
Discussion started by: shoaibjameel123
4 Replies

8. Shell Programming and Scripting

Removing old user directories that are no longer Users in /etc/passwd

I am new to shell scripting, and have not done much programming in several years. So I am very rusty at this at best. I know my way around the linux command line, but actually scripting is something I have not done too much of. I have been tasked to come up with a script that will pull all... (5 Replies)
Discussion started by: shuiend
5 Replies

9. Solaris

Can't change users passwd

Have an issue with a user or root changing the user's passwd. We run the passwd command and a complex passwd is entered a message is displayed, "passwd is based on a dictionary word." We do have a dictionary file and I know for a fact the complex passwd is not in the list. This happens on a... (3 Replies)
Discussion started by: solizkewl
3 Replies

10. UNIX for Advanced & Expert Users

Multiple Users - Multiple Scripts

Hello All, I have to restart 100's of scripts for at least 20+ users once the server restarts for any reason. I wanted to come up with a single script to trigger of all scripts/programs under all users with just one script (without root privilege). Is it possible to do so? :confused: If not,... (6 Replies)
Discussion started by: PikK45
6 Replies
privedit(1M)															      privedit(1M)

NAME
privedit - let authorized users edit files that are under access control SYNOPSIS
authorization] file DESCRIPTION
allows authorized users to edit files that are otherwise restricted by permissions or access control lists. Identify which file to edit by specifying the file name as an argument to the command. After you invoke the command, checks the database to determine the authorization required to edit the file. If you have the necessary authorization, invokes the specified editor to edit the file. You can specify which editor uses to edit the file by setting the environment variable. If you do not set the variable, uses the default editor, You cannot pass arguments to the editor via the command line. However, the editor recognizes and supports editor-specific environ- ment variables if you set them before invoking You can use a fully qualified file name as a argument to identify which file to edit. If you do not use a fully qualified file name, adds the current working directory to the beginning of the file name you specify. Regardless of how you specify the file to edit, all file names are fully qualified after invoking The command also recognizes and supports files that are symbolic links. can edit only one file at a time. If you specify multiple file names as arguments, edits the first file specified and ignores the subse- quent file names. The HP-UX RBAC feature also provides the ability to customize how and check user authorizations. (See privrun(1M).) The Access Control Policy Switch (ACPS) module of HP-UX RBAC provides responses to applications that must make authorization decisions. The ACPS configura- tion file, controls which modules are consulted for making access decisions, the sequence in which the modules are consulted, and the rules for combining module responses to return results to applications. See acps.conf(4), acps(3) and rbac(5) for more information. Options recognizes the following options: Match only those entries requiring the specified authorization. The specified authorization must exactly match the authorization present in the database (that is, no wildcards allowed). Print usage or help. Check to see if the user has the authorization to edit the file and inform the user of the results. If the authorization check fails, edit the file with the caller's original privileges. Invoke in verbose mode. Operands recognizes the following operands: file File to edit. The cmd_priv Database As described in privrun(1M), the file contains information indicating which authorizations are required to execute commands or edit files. You can also specify a PAM service name in to indicate how should identify itself to PAM if a user must be reauthenticated. The file contains any number of entries, where each entry is specified on a single line in the following format: {command|file} These fields are defined as follows: Field Description command | file For the fully qualified path of a file to edit. This field may contain wildcards as defined in fnmatch(3C). For the fully qualified path of the command that is being wrapped to provide additional privilege. arguments Ignored. (Used only by The operation the user is required to have on the object specified. Together, the forms the authorization. operation must be fully qualified and cannot contain a wild card in object requires that the user has the specified operation on all objects. (Note: this is satisfied by a specifica- tion of in the database if RBAC is in use.) This field may contain the keyword instead of which indicates that no access check is required and the file can be edited with privilege by any user. Ignored. (Used only by compartment Ignored. (Used only by privs Ignored. (Used only by for privileges .) pam-service Reauthentication service. If specified, the user is required to reauthenticate. The command identifies itself to PAM as the service indicated in this field. This allows the security officer to require an additional set of authentica- tion/account management restrictions for particular files for editing. See pam.conf(4) for a list of PAM services. The keyword must be used to indicate that no reauthorization is required. flags Flag values can be specified to indicate whether or not can edit a file. Additional flag values can be specified to indicate whether can execute a command. The specific values allowed are as follows: The file can be both edited and executed. This is mainly intended for scripts. The file cannot be executed. It can only be edited with any other token or empty (nothing after the last ":") The file is a command that can be executed only. It cannot be edited. The Authorization field can contain the keyword instead of which indicates that no access check is required and the command is invoked with privilege for any user. The UID and GID entry in field 4 is ignored by but the slash character separating the IDs must remain. The pam service name in field 7 may also be which indicates reauthentication is not required. White space between each field (immediately surrounding the field separator in this database is optional and ignored by There may be multiple entries with the same file line (but different authorization required). evaluates each entry in the order specified in the file, continuing on to the next only if the user does not have the required authorization. The command option described above allows users to identify a specific authorization to match or find when multiple entries for the same file exist in the database. EXTERNAL INFLUENCES
Environment Variables specifies the default editor. determines the language in which messages are displayed. International Code Set Support Single-byte character code set is supported. RETURN VALUE
Success If permitted the user to edit the file, then the return value from is the return value of the editor used to edit the file. Failure returns a value of and an appropriate error message is printed to standard error. EXAMPLES
Example 1 In the following example, the caller invokes to edit The database is examined for an entry corresponding to the file If this entry is found, then the necessary authorization is retrieved from that entry. then determines whether the user has the necessary authorization and whether the file is allowed to be edited as determined by the value in the flag field. then invokes the editor to edit a copy of as the original file is never edited directly. The environment variable determines which editor invokes. If a user does not set the environment variable, uses the default editor, After the user exits the editor, the edited file replaces the original file. The editor is always invoked as the regular user so that there are no additional privileges given to the user while the file is being edited. Example 2 In the next example, the caller wants to edit the file with a specific authorization of If a entry exists for the file with the associated authorization and editing is allowed per the flag field, then the usual authoriza- tion/edit process takes place. If this entry does not exist, (even if an entry for appears with different associated authorization then fails and prints an error message. FILES
Database containing valid definitions of all roles. Database containing definitions of all valid authorizations. Database specifying the roles for each specified user. Database defining the authorizations for each role. Database that contains the authorization to execute or edit specified commands or files, and the privileges to alter UID and GID for command execution. SEE ALSO
privrun(1M), rbacdbchk(1M), acps(3), acps.conf(4), rbac(5). privedit(1M)
All times are GMT -4. The time now is 05:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy