Need help in writing AIX ksh scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help in writing AIX ksh scripting
# 1  
Old 12-02-2010
Need help in writing AIX ksh scripting

I need to write the script for the below constraints. Need your help urgently

The PATH environment variable must conform to the following:
• World-writeable directories (/tmp, /var/tmp etc) must not be placed in the PATH variable.
• System directories must always be placed before local directories in the PATH variable.
• Where there is a requirement for a user to have the current working directory ‘.' or other relative path in their PATH, it must be placed at the end
• Where $HOME is included in PATH, it must be included at the end (or immediately before any relative paths if these are also required).
• The PATH must not begin or end with a colon.
• Users must not have access to another user's PATH.


need to check for all the users PATH for the above constraints...SmilieSmilie
# 2  
Old 12-02-2010
Quote:
• Users must not have access to another user’s PATH.
In other words .profile or .kshrc should only be readable by <user>...

All the check should be done on default PATH setting then what is left is the "custom" part in users .profile or .kshrc knowing it will be of the form:
Code:
PATH=$PATH:<cutomized user paths...>

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Writing in excel sheet using ksh

Hello, I'm trying to write a script to export a txt file to excel. The text file is a delimited with commas Example: Report Date,12/12/2014 Report By, Person Issue, Job Failed I tried exporting as csv and mailed to my id. But if I open the csv file the data is coming in single... (6 Replies)
Discussion started by: annamalaikasi
6 Replies

2. Shell Programming and Scripting

AIX 5.3 ksh Scripting

Hi, I posted a request for sever OS types earlier, but got no response. In an attempt to at least have a starting point, I think scaling it to one OS is preferred. Once I see the gist of it I can modify to account for different cases. I need a script that will go and check to see if an LDAP... (2 Replies)
Discussion started by: tekster2
2 Replies

3. Shell Programming and Scripting

help in ksh scripting in aix

Hello gurus I am looking for a script : We need to generate a file list created by user id on a AIX box. Criteria 1: other than userid : dwimpid & aiadmin Criteria 2: Files older than 2 months ( it can be any user id ). File Path to Look: /project and /project1 Thx silu (7 Replies)
Discussion started by: silu
7 Replies

4. Shell Programming and Scripting

Help with ksh scripting in AIX

I am looking for a script which does the following Script will run daily. 1.It will get snapshot off all filesystems including nfs mounts, automounts and clearcase mounts. 2.Then it will compare new snapshot with the snapshot created in the previous run. 3.If filesystem exists in... (20 Replies)
Discussion started by: saidiya
20 Replies

5. Shell Programming and Scripting

Writing sql results to file using ksh -nevermind

I'm having problems with writing my sql results to a file: sqlplus -S username/password@DB <<!! set echo off set verify off set showmode off set feedback off set timing off set linesize 250 set wrap off set pagesize 0 set newpage none set tab off set trimspool on set colsep... (1 Reply)
Discussion started by: avillanueva
1 Replies

6. Shell Programming and Scripting

newbie: writing ksh shell problem

my default profile is using ksh, I tried to write a simple scripts and I had issues, below is my scripts: $ more if_num.ksh USAGE="usage: if_num.ksh" print -n "Enter two numbers: " read x y if ((x=y)) then print "You entered the same number twice." when I tried to executed the... (6 Replies)
Discussion started by: matthew00
6 Replies

7. Shell Programming and Scripting

Help in writing a KSH script to filter the latest record?

Hi All, I have a text file with the folowing content. BANGALORE|1417|2010-02-04 08:41:04.174|dob|xxx BANGALORE|1416|2010-02-04 08:23:19.566|dob|yyy BANGALORE|1415|2010-02-04 08:20:14.497|dob|aaa BANGALORE|1414|2010-02-04 08:19:40.065|dob|vvv BANGALORE|1413|2010-02-04... (4 Replies)
Discussion started by: Karpak
4 Replies

8. UNIX and Linux Applications

Reading and Writing from Excel using Unix scripting

Hi All, I want to read and write into Excel files. I want my script to generate the required output directly in the Excel format. Is it possible through unix scripting or shall I have to use some other language for this purpose? Waiting for your suggestion. Thanks in Advance. ... (3 Replies)
Discussion started by: AshishK
3 Replies

9. Shell Programming and Scripting

Writing CGI scripting using perl

Hi All, I am trying to do the following thing. I am entering name & email id & then in action i am calling a .cgi program that sends a email to the email id entered. I am facing a small problem, once i have entered the details , its printing the contents of .cgi file in browser. there is a... (7 Replies)
Discussion started by: alma
7 Replies

10. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies
Login or Register to Ask a Question