Configuring Shell Script Resource

I am trying to configure a Shell Script Resource on my IDM Instance (8.1)
So far, I only wish to "Test the Configuration", just to make sure that the IDM is able to CONNECT successfully to the Unix Machine, before I proceed to configure the Resource Handlers and Scripts.
Whenever I press the "*Test Configuration*" button, I keep getting this error :
Test connection failed for resource(s):
java.lang.IllegalStateException: Error attempting to decrypt: Input length not multiple of 8 bytes
I have searched everywhere online (even Google), but can't find a solution, or even a REASON for this problem (((

reenter the password on Resource Parameters page and save it. Test the connection. If error still there post the stack trace from app server log here.

Similar Messages

  • Configuring Shell Script Resource on IDM

    Hi all,
    I am in the process of configuring a Shell Script Resource on my IDM system.
    I used the Shell-Script-Resource-Object.xml (which is provided by IDM in the Samples folder).
    So far, everything worked fine. I set up the parameters, tested the "Test Configuration" button, and it was successful.
    The next phase is to proceed with the basic tasks (such as : create user, update user, delete user, etc)
    This is where my problem lies.
    The IDM manuals do not say anything about how this should be done. Neither do any of Sun's reference material (perhaps, I'm looking in the wrong place??)
    I know that the "Resource Actions" should contain the scripts themselves. But, there's no mention of how those scripts should be configured.
    The scripts themselves reside on the UNIX machine, which is where they should be. But, how should I invoke them?
    Any help will be much appreciated.
    Thanks

    OK.
    I created an entirely new script, which allows me to CAPTURE the data (parameters) from IDM, and use them to create a new user.
    It worked (or, it seemed to work).
    In IDM, i got the following error :
    *Error detected: [Adding account to hosts and creating quotas]
Default shell for netpasswd is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default shell for sui-dev is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default home path for sui-dev is /home. This can be changed later.Default shell for ssl3 is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default shell for sui-test is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default home path for sui-test is /home. This can be changed later.[Adding user to groups]
[Creating home directory]
DUMMY - ssh -2 -l root sui-dev "/usr/alt/uadm2/libexec/mkhome sui-dev /users1/u1/mjerome 44444 500 550 mjerome"
DUMMY - ssh -2 -l root sui-test "/usr/alt/uadm2/libexec/mkhome sui-test /users1/u1/mjerome 44444 500 550 mjerome"
[all done].*
    Result Code = 120.
    Error
    *com.waveset.util.WavesetException: An error occurred adding user 'mjerome' to resource 'Unix Administration'. com.waveset.util.WavesetException: Error detected: . com.waveset.util.WavesetException: Error detected: [Adding account to hosts and creating quotas]
Default shell for netpasswd is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default shell for sui-dev is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default home path for sui-dev is /home. This can be changed later.Default shell for ssl3 is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default shell for sui-test is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default home path for sui-test is /home. This can be changed later.[Adding user to groups]
[Creating home directory]
DUMMY - ssh -2 -l root sui-dev "/usr/alt/uadm2/libexec/mkhome sui-dev /users1/u1/mjerome 44444 500 550 mjerome"
DUMMY - ssh -2 -l root sui-test "/usr/alt/uadm2/libexec/mkhome sui-test /users1/u1/mjerome 44444 500 550 mjerome"
[all done]. com.waveset.util.WavesetException: Result Code = 120.*
    From what is written there, I could see that the user was INDEED created. (Just to be sure, I checked my Unix machine. And, yes, the user was created)
    However, I keep getting the above error in IDM.
    I can't figure out any explanation besides the fact that, perhaps, this is because I do not have a RESULT HANDLER script in place yet.
    Could this be it?

  • Configuring Shell Script

    I am a newbie to Shell Scripting.
    I am trying to set up a Unix Resource on my IDM system.
    I have a Test Machine (which is Remote, of course). Naturally, the machine is Unix-based. Within this machine is a Unix Database, which is MySql-based.
    On this machine, I created a User (complete with full Administrator rights and privileges).
    And, to this user's Home Directory, I added certain a scripts which is meant for "*Creating a new User"* in the Unix Database. This script is written in PERL language.
    I created the Shell Resource, by using the IDM sample Shell Script files (the ones located in the IDM sample-folder). Naturally, I modified certain attributes, removed others, etc, etc.
    My problem is : the Get Resource Action and Get Result Handler.
    These two things are MANDATORY when configuring Shell Script. I have absolutely no idea how to write those scripts.
    I have searched everywhere online (sun docs, forums, even google).
    Could anyone please give me an idea of how to code/write the script for those Actions?
    Thanks

    Thanks for your replies.
    I was able to get the "Create User" process to work. What I did was design a custom-script which is suited to my own Unix environment.
    t worked (or, it seemed to work).
    In IDM, i got the following error :
    *Error detected: [Adding account to hosts and creating quotas]
Default shell for netpasswd is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default shell for sui-dev is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default home path for sui-dev is /home. This can be changed later.Default shell for ssl3 is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default shell for sui-test is /usr/alt/uadm2/bin/nologin. This can be changed later.
Default home path for sui-test is /home. This can be changed later.[Adding user to groups]
[Creating home directory]
DUMMY - ssh -2 -l root sui-dev "/usr/alt/uadm2/libexec/mkhome sui-dev /users1/u1/mjerome 44444 500 550 mjerome"
DUMMY - ssh -2 -l root sui-test "/usr/alt/uadm2/libexec/mkhome sui-test /users1/u1/mjerome 44444 500 550 mjerome"
[all done].*
    Result Code = 120.
    Error
    *com.waveset.util.WavesetException: An error occurred adding user 'mjerome' to resource 'Unix Administration'. com.waveset.util.WavesetException: Error detected: . com.waveset.util.WavesetException: Error detected: [Adding account to hosts and creating quotas] Default shell for netpasswd is /usr/alt/uadm2/bin/nologin. This can be changed later. Default shell for sui-dev is /usr/alt/uadm2/bin/nologin. This can be changed later. Default home path for sui-dev is /home. This can be changed later.Default shell for ssl3 is /usr/alt/uadm2/bin/nologin. This can be changed later. Default shell for sui-test is /usr/alt/uadm2/bin/nologin. This can be changed later. Default home path for sui-test is /home. This can be changed later.[Adding user to groups] [Creating home directory] DUMMY - ssh -2 -l root sui-dev "/usr/alt/uadm2/libexec/mkhome sui-dev /users1/u1/mjerome 44444 500 550 mjerome" DUMMY - ssh -2 -l root sui-test "/usr/alt/uadm2/libexec/mkhome sui-test /users1/u1/mjerome 44444 500 550 mjerome" [all done]. com.waveset.util.WavesetException: Result Code = 120.*
    From what is written there, I could see that the user was INDEED created. (Just to be sure, I checked my Unix machine. And, yes, the user was created. I also checked the MySQL database, and the user is there, too)
    However, I keep getting the above error in IDM.
    I can't figure out any explanation besides the fact that, perhaps, this is because I do not have a RESULT HANDLER script in place yet.
    And, this is where my problem is : some documentation on Shell Script say that Result Handlers are needed only for two Actions : GetUser and GetAllUsers.
    However, other documents claim that Result Handlers are needed for ALL resource actions. (In other words, if you have a Create User resource action, then you must have a Create-User result handler).
    I don't even know which of these claims is true.
    Any help, please?

  • Shell Script Resource Adapter

    I am using version 7.0 and I'm trying to setup a resource using the Shell Script resource type. I am having issues with a few things:
    1. How do I let the system know there was an error in the shell script? No matter what exit code I use in the Actions I have configured for the resource, the system thinks everything was successful. Relatedly, how can I send back an error message - where can I view it?
    2. How do I send back multiple values for an attribute? When 'GetUser' is called, it is parsed by 'GetUser AttrParse', I haven't been able to successfully send back mutiple values for an attribute. I have tried semicolon separating the attributes so that I can comma separate the multi-values for an attribute. I have also tried pipe.
    3. When I setup a new resource with the shell script resource type, the 'Test Configuration' button calls a unix command that checks for a bunch of unix commands that have nothing to do with what I will be doing in my shell script. Is there a way to change the test?

    I found a way to send back multiple values for an attribute. Instead of using the collectCsvHeader and collectCsvLines AttrParse tokens as the resource reference guide says, I use str and skip tokens to parse the line. These tokens take delimiters and terminators for the line which allows me to send back multiple values for an attribute.
    Line being parsed looks like this:
    TEST USER, ,MN,People; /home/simtestusr; /bin/sh; 8888888888; simtestusr; 888; group1, group2; host1, host2, host2; ;
    <AttrParse name='UnixShellScript GetUser AttrParse' >
    <str name='gecos' trim='true' term=';'/>
    <skip len='1'/>
    <str name='homedir' trim='true' term=';'/>
    <skip len='1'/>
    <str name='shell' trim='true' term=';'/>
    <skip len='1'/>
    <str name='accountId' trim='true' term=';'/>
    <skip len='1'/>
    <str name='uid' trim='true' term=';'/>
    <skip len='1'/>
    <str name='uidnumber' trim='true' term=';'/>
    <skip len='1'/>
    <str name='groups' multi='true' delim=',' trim='true' term=';'/>
    <skip len='1'/>
    <str name='hostnames' multi='true' delim=',' trim='true' term=';'/>
    <skipToEol/>
    <MemberObjectGroups>
    <ObjectRef type='ObjectGroup' id='#ID#Top' name='Top'/>
    </MemberObjectGroups>
    </AttrParse>
    Also, SUN is telling me that the exit code problem (#1) may be fixed in sp2 for 7.0, I'm waiting to find out when it will be released.
    I still don't have an answer for #3.

  • How to engage Shell Script resource action in an Active Sync workflow.

    A little background, at my organization I have IDM set up simply to recognize changes in LDAP and transmit those changes, via active sync, to AD. We don't yet use the IDM interface to make any changes to users, instead we use external interfaces that we have written to make changes to LDAP which then get picked up via Active Sync and synchronized to AD. However, in addition to AD, there are several other resources that we would like to gradually wrap into this active sync workflow via native and custom resource adapters. Currently I am working on a simple Shell Script resource to manage Linux home directories. I have written all the necessary code and created the resource itself within IDM. This all seems to work, I can create, delete, disable, etc.. users in our Linux environment from the IDM interface.
    Here is the problem, I would like to integrate the creation, deletion, enabling, disabling, etc.. of users into the same Active Sync workflow that engages whenever a change is made to LDAP. This way, whenever a user is created in LDAP (and consequently AD), that user will be granted a home directory in Linux. Unfortunately it seems that Shell Script Resources are not enabled for Active Sync. Any ideas on how one might accomplish this?
    Thanks in advance.

    Thank you for the prompt reply. Funny thing is that I have been banging my head on this problem for a couple weeks now (this is my first attempt at real customization ... ). I finally got desperate and decided to reach out for help. After I posted this message I came to a realization that ended up solving the problem for me, go figure.
    For anyone in my place I can relate what I ended up doing, simple as it was. Keep in mind, of course, that this is a highly customized environment that I am working in so the specifics probably wont apply. What I basically did, is I found an LDAPCreateUserProcess form that gets invoked when Active Sync is run. For all I could tell, this simply processed the new attributes that came through Active Sync and related them to their llighthouse / AD counterarts. But I noticed a line like this:
    <Field name="waveset.resources">
    <Expansion>
    <filterdup>
    <appendAll>
    <ref>waveset.resources</ref>
    <s>AD</s>
    </appendAll>
    </filterdup>
    </Expansion>
    </Field>
    and simply added the name of my shell script resource under the <s>AD</s> line. That was it.
    Anyway, thanks bobm53, I can now get on with my life :-)

  • Shell Script Resource-Timeout error

    Hi!!
    I have an issue with the Shell Script Resource, the problem is as follows:
    When I created a user in this resource and appears a error message:
    com.waveset.util.WavesetException: An error occurred adding user 'user01' to resource 'Shell Script'. com.waveset.util.WavesetException: Script failed waiting for "_,)#+(:" in response "" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "".
    I added the timeout property = 300 000 in my shell script is as follows:
    <ResTypeAction restype='Shell Script' timeout='300000'>
    but it doesn't work.
    I had the IDM 8 with the patch 4 but the problem beging when I did upgrade to patch 4 to 6.
    Does anyone knows what could be the problem.
    Thanks in advance!

    Hello!
    That isn't the problem the test connection works fine but when I try provisioning a user the shell script execute some instructions, in the shell script I need to set the timeout property in order to give more time to finish execute the instructions before the script execute the following command.
    I tested the timeout property in the shell script and work to fine for IDM 8 patch 4 I upgrade to patch 10 and stopped to work.
    Does anyone knows What could be the rigth way to set the timeout property in a resource action for shell script resource?
    Thanks...

  • Shell Scripting Resources && Conditional

    Hiya folks.
    I'm looking for a great shell scripting site. Or a book. The Apple Mac Dev Centre is ... well she ain't workin for me.
    For instance, I'm looking for some leadership on a conditional, which those docs won't show me:
    troubleshooting=false
    *if [$troubleshooting==1]; then*
    * echo $troubleshooting*
    * echo $nameStart*
    * echo $myDate*
    * echo $newFName*
    * echo $mSource*
    * echo $mTarget*
    fi
    How do I trip this conditional?
    Cheers

    How do you set a boolean?
    Everything in a shell variable is a string. Some of those strings may look like numbers, but as far as the variable is concerned they are strings. There are no boolean variables. It is all in how you interpret the strings in your variable.
    I'll have to check up on the syntax for bash.
    You could read, reread, read and read "man bash". But I know it is not easy to actually figure out how to use the stuff the man page tells you, or even what they really mean when they use various terms. A book with examples helps, but there is magic hidden in the man page that sometimes takes ages and heavy use of shell scripting to figure out, and I've found that no one book will clearly explain every trick that can be done with shell scripts.
    I prefer to have spaces in there, but not around parens of any kind. I wish languages would be the same that way. Heh.
    And I like to have spaces around equal signs in assignments, but Bourne based shell scripts have their own rules. That is just the way it is.
    The syntax for the 'if' command is
    if list; then list; [ elif list; then list; ] ... [ else list; ] fi
    where "A list is a sequence of one or more pipelines separated by one of the operators ...". "A pipeline is a sequence of one or more commands separated by the character |".
    In the original Bourne shell (which ran in 64kilobytes of memory for code, data, and stack space) all expressions were handed by an external program 'test'. So your 'if' statement would have originally been
    if test $troubleshooting = 1; then
    fi
    Someone figured out that Unix filenames do not care what characters make up their name, so a hardlink was created between /bin/test and /bin/[
    ls -li /bin/test /bin/[
    57880389 -r-xr-xr-x 2 root wheel 46720 Jun 17 2009 /bin/[
    57880389 -r-xr-xr-x 2 root wheel 46720 Jun 17 2009 /bin/test
    You will notice that 57880389 (the file's inode) is identical for both 'test' and '['.
    So when you wrote
    if [$troubleshooting==1]; then
    the shell first processed the line and performed variable substitution, so the 'if' line converts to
    if [false==1]; then
    now the shell processes the 'list' of pipelines/commands following the 'if' statement. So a command is the first white space separate token, which is "[false==1]", so the shell looked in all the PATH directories looking for a file with the name "[false==1]" and did not find anything.
    However, if you white space separate the command in the 'list' from its arguments, then the shell can figure out what the first command is, invoke that command, and pass its arguments to the command.
    Now shells have more than 64kilobytes of memory to work with, and so the [[ ... ]] syntax was invented as a way to indicate that the expression was to use the shell built-in evaluation code. And I think bash eventually decided that it would do the /bin/[ program code evaluation as a built-in as well.
    But since you can also say
    if myprogram --opt --opt arg arg arg; then
    fi
    the shell must still be able to tell the difference between [ or [[ as expression evaluation operators, and a legal file with the name /home/me/bin/[myprogram, or $HOME/bin/[[myprogram, so it cannot assume that [ or [[ always start an expression evaluation.

  • Shell script adapter and passwords

    Does anyone know how to get a password into a shell script resource adapter?
    I've set up the "password" attribute in my resource adapter's schema, expecting at least to see the encrypted password in in $WSUSER_password, but it's always empty. Other attributes I add to the resource scheme show up in the scripts as shell variables just fine.
    Side question - the Solaris resource adapter, which looks a lot like the shell script adapter, doesn't even have a password in its schema map, yet it seems to set passwords just fine. What's up with that?
    The ShellScriptResourceObjects55.xml example doesn't seem to deal with passwords at all.

    Hi,
    Have you been able to resolve this issue?
    I am currently working on configuring a Shell Script Resource on my IDM system.
    I am still in the "*Create User"* stage of things (I haven't even begun working with the other Actions : Get User, Get All Users, Delete User, Update User)
    After a month-long period of trial-and-error, and a lot of headaches, I finally succeeded in Creating a new user on my Unix Machine, without any errors
    Except for one thing : for some reason, the user I create is not being given a password!
    A first, I configured the "Attribute Mapping" page to include a "Password" attribute. This did not work.
    Then I removed the password from there (I figured that when I input the user's basic information on the IDENTITY tab in IDM, then the password gets automatically passed to the Unix machine).
    Still, this did not work.
    The funniest thing is : I am not getting any errors. The user is created on my Unix machine. And, also, in my My-SQL database.
    The problem is : when I try to log into that same Unix machine as the user, it does not work, because......of course.....*.there is NO PASSWORD*.
    What could be the problem?

  • How to execute power shell script file inside DSC script resource

    Hi,
    How to execute /call powershell scirpt file inside DSC script resource , some thing like below and capture the status of execution.
    Node $AllNodes.NodeName
    Script ExecuteSQLDeploy
    #SetScript = {powershell.exe .\SQLDeploy.ps1  "param1" "param2" "param3" "param4" "param5" }
    #TestScript= {powershell.exe .\SQLDeploy.ps1  "param1" "param2" "param3" "param4" "param5 }
    #GetScript= { return $true;}
    Basawaraj

    Thanks for reply. 
     Now i am able to execute the power shell script with DSC. I  am getting no error when i run , but the script logic wrote inside  ( deploying sql incremental changes ) not working . I am using SQLCMD in the powershell script to deploy sql
    changes . Can you please elaborate on "script is compatible with DSC" , the script
    should not contain write-host cmdlet.... etc something like that.
    Copying recursively from ****************************** to ************************** succeeded.
    Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
    An LCM method call arrived from computer ************ with user sid **********************************************
    [V-BAKANT]: LCM:  [ Start  Set      ]
    [V-BAKANT]: LCM:  [ Start  Resource ]  [[Script]ExecuteSQLDeploy]
    [V-BAKANT]: LCM:  [ Start  Test     ]  [[Script]ExecuteSQLDeploy]
    [V-BAKANT]: LCM:  [ End    Test     ]  [[Script]ExecuteSQLDeploy]  in 0.1110 seconds.
    [V-BAKANT]: LCM:  [ Start  Set      ]  [[Script]ExecuteSQLDeploy]
    [V-BAKANT]: LCM:  [ End    Set      ]  [[Script]ExecuteSQLDeploy]  in 0.3010 seconds.
    [V-BAKANT]: LCM:  [ End    Resource ]  [[Script]ExecuteSQLDeploy]
    [V-BAKANT]: LCM:  [ End    Set      ]
    [V-BAKANT]: LCM:  [ End    Set      ]    in  0.8810 seconds.
    Operation 'Invoke CimMethod' complete.
    Time taken for configuration job to complete is 0.923 seconds
    Basawaraj

  • Shell Script Adapter - getting errors while configuring

    Hi,
    I am trying to configure a shell script adapter for one of my AIX resource.
    the following are the values I gave to test the configuration
    1. host
    2. tcp port (22)
    3. login user
    4. password
    5. login shell prompt (#)
    6. connection type SSH
    with these values, I tried to test the configuration, I get the following errors,
    Test connection failed for resource(s):
    Shell Script: Failed to find 'useradd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'usermod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'userdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
    is this a privilege issue?
    please let me know so that I can get the appropriate privilege from my sysadm to proceed further.
    thanks.

    Hi, thanks for your response.
    I got sudo access as root to the AIX resource.
    Initially, NOPASSWD was set for my sudo privilege. using that I tried configuring the adapter, but I got errors like "Script failed waiting for "ASSWORD:" in response ",)#+(:" . I looked at the forums and was informed that I would need to 'UN-SET' the NOPASSWD attribute. I got that attribute un-set . but now I get the error
    WLP_SmartScript_Original: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' WLP_SmartScript_Original: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' WLP_SmartScript_Original: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
    Not sure why Sun should check this. these commands are not part of AIX. right? can you please tell me where I am going wrong?

  • Running a shell script in a Cocoa-Applescript, from the Resources folder?

    Hello!
    I need to use a bash script, but the script must be IN the application. I placed them in the "Supporting files", but i am not able to find them using "do shell script"
    Thanks!

    If you stick the script in the Resources folder you can get it by
    path to resource "Bash Script"
    If you want to put it in the folder Supporting files you need to construct the path
    (path to me as string) & "Contents:Resources:Supporting files:Bash Script"
    (where Bash Script is the name of your script)
    Don;t know if there is a shorter way for the second case.

  • Resource utilization alerts shell scripts, Memory and CPU

    Hi All,
    I am using the Oracle Enterprise Linux verison 4.6 x64 for Oracle 10g database. I want to implement some alerts for SWAP space thresholds, CPU comsumption and memory usage thresholds. For example I want an email alert is SWAP space is used 90%. Memory usage is more than 85%. CPU is 80% busy.
    I am sure that you Gurus must have implemented this kind of alerts through some tools or shell scripts so seeking your help to implement these.
    Thanks
    Naveed

    Hi Naveed,
    Firstly, I can tell you that Oracle has its own SNMP MIBs which can be used by SNMP to send trap (alerts) to various SNMP monitoring systems. If however, you are a bit like myself and perhaps don't have the cash or the need to use something so fancy, you can use Shell Scripting or in my case something like PERL.
    By using commands such as 'grep', 'awk' and 'less' (to name but a few) on can monitor simple things such as diskspace or memory.
    For example, if I were to look for diskspace usage on a partition known as u01 I could pipe in the output of 'df -h' to PERL, then run a regular expression on it looking for anything greater than 80%.
    Example of PERL code;
    # read in df -h command, looking for the partition /u01
    open(DISKUSAGE, "df -h | grep u01|");
    $diskUse = <DISKUSAGE>; #read its input
    chomp $diskUse; #remove last characterThis reads in the command into a 'buffer' in which you can search for things, i.e. to see if the disk usage is equal to, or greater than 80% from the variable $diskUse. As a starter I would look at splitting the string on empty spaces into an array for example, and reading the array index containing your disk usage. This can also be done with a Shell Script.
    Perl also has a very easy to use SMTP module which can be used for sending E-Mails. Do a search for Net::SMTP on google on how to use it. It really is very simple.
    I'm not expert on this stuff, and I'm sure there are many other and better ways of doing such things, but I hope this at least points you in the right direction.
    Best of luck,
    Conor

  • How do I create a package that will install a shell script?

    From various sources I have made this shell script which creates a hidden admin user, starts ard and sshd.
    I would like to make this a package which will run on a machine on first boot. (I'm using deploystudio to deploy ML)
    It creates a hidden user called testuser1 with the password of password1
    [code]# Create user record in directory services
    dscl . -create /Users/testuser1
    dscl . -create /Users/testuser1 RealName "testuser1"
    dscl . -create /Users/testuser1 UniqueID 401
    dscl . -create /Users/testuser1 PrimaryGroupID 20
    dscl . -create /Users/testuser1 UserShell /bin/bash
    dscl . -passwd /Users/testuser1 "password1"
    # Set up a hidden home folder
    dscl . -create /Users/testuser1 NFSHomeDirectory /var/testuser1
    cp -R /System/Library/User\ Template/English.lproj /var/testuser1
    chown -R testuser1:staff /var/testuser1
    # Grant admin & ARD rights
    dseditgroup -o edit -t user -a testuser1 admin
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart -activate -configure -access -on -users testuser1 -privs -all -restart -agent
    # Tell loginwindow not to show the user
    defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE
    # Alternate: defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array testuser1
    # start remote login ssh
    systemsetup -setremotelogin on[/code]
    I'm using package maker but it keeps failing. If I add it from somewhere like my Documents dir it says it will give my username the permissions instead of root. If I add it from / and make root the owner packagemaker errors probably because my user doesn't have the rights to it. I want it to copy somewhere then maybe have another script that copies to the same location and does an rm to remove the previous script so no admin details are left on the machine

    Basicilly I want to roll out an image that will work with all models of macs which are comaptible with Mountain Lion. To do so I'm using deploystudio with the installESD.dmg as the image. This way it will install the relevant drivers for each model of mac. So the image should work whether it's a mac pro tower/mac mini/macbook.
    Upon completetion deploystudio lets you run packages so I would like the script above to be in a package. I don't want it even to copy the script anywhere I would just like it to run the .sh file I've made if thats possible?
    I'm just not sure what steps to take with packagemaker, I've never used it before.
    But yeah the ultimate goal is: upon installation completetion setup hidden admin user that will have ssh and ard access.

  • Unix Shell Script :  Attribute Parsing

    I am configuring a Unix Shell Resource on my IDM system (at least, I am TRYING to configure it)
    I am creating the script for "Get User Attribute Parsing".
    Here is the script I am using :
    *<AttrParse name='ShellSample-74kfX GetUser AttrParse' createDate='0'>*
    *<collectCsvHeader idHeader='Account ID' nameHeader='Username' delim=',' trim='true' unQuote='true'/>*
    *<collectCsvLines trim='true' unQuote='true'/>*
    *<MemberObjectGroups>*
    *<ObjectRef type='ObjectGroup' id='#ID#All' name='All'/>*
    *</MemberObjectGroups>*
    *</AttrParse>*
    But, IDM keeps giving me the following error :
    Unexpected end of data preparing to parse token number 1(<collectCsvLines trim='true' unQuote='true'/>)
    Please, could anyone give me any tips?
    Thanks.

    You didn't specify if you want a total time for a portion of a shell script, or the whole script in general. If you only want to know the time of the whole shell script, just reference the linux/unix built-in variable ${SECONDS}. This variable is reset for each PID.
    I usually add these lines to the bottom of long running shell scripts (just before an exit code):
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    ((TIME = ${SECONDS} / 60))
    echo "Script ran for ${TIME} minutes. (${SECONDS} seconds total.)
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    Like I said, ${SECONDS} starts ticking from 0 when you start the script, so no need to export the variable, just reference it. The nice part is that you don't have to bother getting into sqlplus and hit the database.

  • Shell Script Adapter - what kind of sudo privilege needed?

    Hi All,
    I have a requirement in my project where I need to manage unix user provisioning and de-provisioning by using shell scripts in AIX servers. For this purpose, I selected Shellscript adapter as it allows us to execute scripts that run on the resource.
    1. while I have account in the AIX server, I need to know what kind of sudo privilege is needed. Will I need sudo access to root? if yes, does it mean, I (or my account) should be added to root? please let me know.
    2. also, I tried configuring the adapter using the login id, host, password, login shell prompt, port and SSH. When i tried to test the configuration, it gave the following error,
    Test connection failed for resource(s):
    Shell Script: Failed to find 'useradd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'usermod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'userdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupadd' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupmod' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin' Shell Script: Failed to find 'groupdel' in the path '/usr/bin /etc /usr/sbin /usr/ucb /home/eumusr/bin /usr/bin/X11 /sbin . /usr/local/bin'
    I am wondering why should it search for these commands? please let me know.
    thanks.

    Hi All,
    I got this issue resolved after a fine-grained sudo setting to the account that is used for provisioning.
    The revised sudo setting was able to do all the provisioning tasks without having a root access.
    This is what I set on my service account
    (root) /bin/awk, /bin/cat, /bin/cp, /bin/cut, /bin/grep, /bin/login, /bin/mv, /bin/rm, /usr/bin/auths, /usr/bin/cat, /usr/bin/chgroup, /usr/bin/chgrpmem, /usr/bin/chsec, /usr/bin/chsh, /usr/bin/chuser, /usr/bin/cp, /usr/bin/last, /usr/bin/lastlog, /usr/bin/listusers, /usr/bin/logins, /usr/bin/lssec, /usr/bin/mkgroup, /usr/bin/mkuser, /usr/bin/mv, /usr/bin/passwd, /usr/bin/profiles, /usr/bin/pwdadm, /usr/bin/rm, /usr/bin/roles, /usr/sbin/groupadd, /usr/sbin/groupdel, /usr/sbin/groupmod, /usr/sbin/lsgroup, /usr/sbin/lsuser, /usr/sbin/rmgroup, /usr/sbin/rmuser, /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /usr/sbin/logins
    (root) NOPASSWD: /usr/bin/chgrp, /usr/bin/chmod, /usr/bin/chown, /usr/bin/chpasswd, /usr/bin/cp
    In this way, you need not have to be a root user to perform provisioning using AIX.
    Hope this helps!!
    thanks.

Maybe you are looking for

  • Timthimb does not work correctly

    Hi, I use a rockettheme theme as website. sannebakker.com. in other browsers the 5 small images show up under the big image. Timthumb is integrated in the theme. I adjusted several spaces to have the 5 images next to each other. Only that was not wor

  • Sort order of Imessages and SMS

    In previous IOS versions, when you deleted a Imessage or an SMS, the sort order of message automatically changed to last date. In IOS 8.1 the sort order doesn´t do this, which means that if you delete a message send today and the one before that was

  • BI Publisher - Install error - Windows 7 64Bit

    Hi All, I am trying to install BI Publisher on Windows 7 64Bit in a VMWare virtual machine. OS: Windows 7 Professional 64bit BIP Version: bipublisher_windows_x86_101341.zip VMWare Workstation Version: 7.1.0 JDK Version: 6_21 (both 64 and 32 bit versi

  • Software Update can't find server, but internet connection is good

    The Software Update function does not work - "Can't connect to Update Server", and Safari will not load any pages - "CAn't connect to server...". However, Network Diagnostics says that I am connected to the internet, as does Firefox - it loads pages

  • How best to split a cluster?

    We have a cluster that is currently handling IPCC and Enterprise IP Phones. We want to add another cluster, but have the original cluster handle the IPCC users and the new cluster handle the Enterprise phones. What is the best practice to achieve wha