Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: PSD
  • Order by date
  1. PSD

    awk matching::

    Hi all, The awk statement below nearly works as I want it to. That is it removes :: if it is on the end or beginning of the PATH variable, but :: anywhere else is not removed - however ::: is. So it is nearly there. Any awk experts able to shed light light on getting the :: removed rather than...
  2. PSD

    Problem listing all files in a script

    Good questions - because this is AIX and I cannot stop the find command traversing directories (only limit is filesytem boundaries)
  3. PSD

    Problem listing all files in a script

    I knocked this together today but it is not listing all files in the while true FILE loop. I tried two variations, one with the ultimate endgame matching files which are go+w and one without. The idea is to check the files in each users home directory to ensure nothing is go+r. lsuser -a home...
  4. PSD

    Running a script in a shell pipeline

    Hi guys, I have a script which I would like to run as a shell pipeline, so I copied it all into one line and it does not work. su - root -c "echo /:${PATH}" | tr ':' '\n' | while read DIR ; do ; DIR=${DIR:-$(pwd)} ; print "Checking ${DIR}"; while [[ -d ${DIR} ]]; do; [[ "$(ls -ld ${DIR})" =...
  5. PSD

    Script to work out file permissions (not working!)

    Thanks guys, in between posting this I tried it in KSH93 and it works - thanks for the help.
  6. PSD

    Script to work out file permissions (not working!)

    Hi all, I inherited this script which does not work on AIX:- touch a; chmod og-rwx a; ui=($(echo 0027 -n | fold -w1));sys=($(perl -e 'printf "%04o\n",(stat shift)[2] & 07777' a | fold -w1));for (( i=0; i<4; i++ )); do echo -n $(( ${ui[$i]} & ${sys[$i]})); done Basically, it is supposed to...
  7. PSD

    multiple spaces between columns with grep

    Hi all, On AIX I had some problems with \s+ matching spaces so ended up using [[:blank:]]. But if there are multiple spaces between two words in a file, what is the best way of using [[:blank:]] without typing it more than once? Also the number of space varies per line, so there is no fixed...
  8. PSD

    UNIX PATH directory checking

    Thanks Sam, That was a very good idea - have a star. I have ended up with this (adding in a check also for group writable directories). It does not traverse all the way up to "/" so I also hardcoded that into the script. Let me know if you think it could be made more efficient:- #!/bin/ksh su...
  9. PSD

    UNIX PATH directory checking

    Hi all, I am trying to come up with the simplest way to parse root's path and then examine whether or not each directory is world writable or not. So far this works fine in listing the PATH names:- for DIR in `su - root -c "echo $PATH"| tr ':' ' '` do ls -lLd $DIR done This lists:-...
  10. PSD

    egrep and IP addresses

    Hi there, This is giving me a bit of headache. Trying to grep out IP addresses from files, so looking for a "xxx.xxx.xxx.xxx" address format:- cat /tmp/test |egrep "[0-9]{1,3}\.[0-9]{1,3}\.([0-9]{1,3}" This is the command I came up with, sort 0-9, 1-3 times followed by a dot. It works but it...
  11. PSD

    Adding Users w/out SMIT

    Hi, Log in as another user and check out the .profile for that user via vi. It sounds like your default profile may be the problem here i.e. there are invalid entries. Best of luck PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified Specialist - AIX V4 HACMP
  12. PSD

    Failed mirror of rootvg AIX 4.3.3.0

    Josh, If you get the PVID of the failed disk just use: reducevg rootvg <PVID of missing disk> It seems that you did not remove the original hdisk1 from the volume group, according to your steps above. Cheers PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified Specialist -...
  13. PSD

    [color red]Search error[/color]

    amins, This is a limitation is the native AIX grep command. You will need something like GNU grep to get past this limitation, you can download it for AIX 5.1 at: http://aixpdslib.seas.ucla.edu/packages/grep.html Cheers PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified...
  14. PSD

    rsh problem

    Ken, This is most likely due to the name resolution of the server you are connecting from. Add both the hostname and fully qualified domain name into your .rhosts file to be safe, and of course make sure you can resolve both on the target server. Cheers PSD IBM Certified Specialist - AIX...
  15. PSD

    How to modify default stanza in /etc/security/user?

    Bernie, Example: chsec -f /etc/security/user -s default -a maxage=4 Cheers PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified Specialist - AIX V4 HACMP
  16. PSD

    eject a cd-rom from AIX 5.1 host automatically

    David, I am afraid not. I looked into this myself a couple of years ago. Cheers Paul PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified Specialist - AIX V4 HACMP
  17. PSD

    Adding Users w/out SMIT

    Simply: #!/bin/ksh if [ -o $2 ]; then echo "Not enough arguments - you must specify a user id and username" exit 1 fi /usr/bin/mkuser id=$1 pgrp=staff groups=staff,security,system $2 Then you have to specify a user id and username and change the mkuser command to specify the standard...
  18. PSD

    eject a cd-rom from AIX 5.1 host automatically

    David, Simple answer: you need 5.2 and the commands to open and close the cdrom drive are, cdeject and cdutil -l respectively. Cheers PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified Specialist - AIX V4 HACMP
  19. PSD

    password dict

    unixfreak, There is no fileset containing the password dictionary, it's use is controlled by a parameter in /etc/security/user i.e.: dictionlist = /etc/security/dictionary Create a file called dictionary, or whatever you want to call it, owned by root with 600 permissions and add in any words...
  20. PSD

    AIX 5.2 on Ebay

    Hi, There is a full set of AIX 5.2 Cdroms' available on Ebay for a bargain buy it now price of £40. I know that a number of people are after a copy. Best of luck PSD IBM Certified Specialist - AIX V4.3 Systems Support IBM Certified Specialist - AIX V4 HACMP

Part and Inventory Search

Back
Top