Enumerating all AD users, so script runs in a loop

I am going to do a SharePoint upgrade this weekend from 2010 to 2013.
I need this script to run against every Active Directory user automatically, not just one at a time. How do I get this get this script to do that? I figure I create a pipeline, I just don't know where.
Here is the script:
Param(
    [string]  $account = $(Read-Host -prompt "UserAccount")
Add-PSSnapIn Microsoft.SharePoint.PowerShell
foreach ($wa in get-SPWebApplication)
    Write-Host "$($wa.Name) | $($wa.UseClaimsAuthentication )"
    #http://technet.microsoft.com/en-us/library/gg251985.aspx
    $wa.UseClaimsAuthentication = $true
    $wa.Update()
    $account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString()
    $zp = $wa.ZonePolicies("Default")
    $p = $zp.Add($account,"PSPolicy")
    $fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
    $p.PolicyRoleBindings.Add($fc)
    $wa.Update()
    $wa.MigrateUsers($true)
    $wa.ProvisionGlobally()
Please help me! Thank you!

Thank you! 
Where would I place this line in the script?
SR
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
¯\_(ツ)_/¯

Similar Messages

  • Script to run against ALL AD users in a loop

    I am going to do a SharePoint upgrade this weekend from 2010 to 2013.
    I need this script to run against every Active Directory user automatically, not just one at a time. How do I get this get this script to do that? I figure I create a pipeline, I just don't know where.
    Here is the script:
    Param(
        [string]  $account = $(Read-Host -prompt
    "UserAccount")
    Add-PSSnapIn Microsoft.SharePoint.PowerShell
    foreach ($wa in get-SPWebApplication)
        Write-Host "$($wa.Name) | $($wa.UseClaimsAuthentication
        #http://technet.microsoft.com/en-us/library/gg251985.aspx
        $wa.UseClaimsAuthentication = $true
        $wa.Update()
        $account = (New-SPClaimsPrincipal -identity
    $account -identitytype 1).ToEncodedString()
        $zp = $wa.ZonePolicies("Default")
        $p = $zp.Add($account,"PSPolicy")
        $fc=$wa.PolicyRoles.GetSpecialRole("FullControl")
        $p.PolicyRoleBindings.Add($fc)
        $wa.Update()
        $wa.MigrateUsers($true)
        $wa.ProvisionGlobally()
    Please help me! Thank you!

    Hi,
    Need to do something like this
    $Users=Get-ADUser -filter *
    foreach ($User in $Users) {
    YOUR SCRIPT
    -Identity $Users
    YOUR SCRIPT
    YOUR SCRIPT
    YOUR SCRIPT
    Seidl Michael | http://www.techguy.at |
    twitter.com/techguyat | facebook.com/techguyat

  • Report which would collect all users in STAD running an specific program

    Hi
    How could I make an report which would collect all users in STAD running an specific program daily. The issuse is that this program is not available in sm20. How could I then send this list to list of receipients?
    I have in mind to "submit "stad" but it is long time ago I used this and I do not have access to that source
    THX

    we found solution via a job runned report with variant

  • User sites unreachable after weekly script run

    Server 10.3.9 on both my webserver and on my Xserve with RAID where my user sites are hosted.
    I have sites hosted directly on my webserver and my user sites are served through the webserver but site on the Xserve, shared through Open Directory.
    Everything works awesome except every Saturday morning, after the weekly script runs on both machines at 4:30 a.m., my users sites are no longer available through the webserver. If I reboot the webserver they come back just fine.
    I've looked through the weekly script and nothing was obvious to me that would break this connection.
    Has anyone else seen this?
    Thanks
    Eric

    Thanks for these tips. I've tried them and a few other things...
    It sounds, and I may be wrong, like you're proxying
    through your webserver to your file server for the
    user sites. The first thing will be to find out
    which machine is getting goofed up.
    Tomorrow, see if your regular websites are accessible
    after the script runs.
    The user sites are not available this morning through my webserver, as has been the case since installing the server in January. The regular (local) sites on the webserver are just fine.
    Try the user's sites directly
    from the file server, eliminating the webserver
    proxying.
    I don't usually run the webserver on my file server but I did fire it up this morning and was able to reach the user sites through it.
    If both of those are okay, then setup a
    terminal window on each machine, and on both machines
    do:
    tail -f /var/log/httpd/error_log
    and try hitting the user's sites through the
    webserver and see what messages come up on each
    machine, and post them.
    I don't get any error messages when accessing the user sites through the fileserver. I do get errors on the webserver when accessing user sites, saying "File does not exist:" then the path to the Network directory where the users site is. ( /Network/Servers/fileserver.address/Volumes/Home/username/Sites )
    This prompted me to try accessing user sites from one of my desktop machines (running OS X client 10.4.5) that is also connected to the fileserver with OD, and is running a webserver. That worked fine!
    I then tried to traverse the filesystem at the command line on my webserver to reach the users home sites and couldn't do it. I could do it on my desktop machine.
    So it appears that something on Server is breaking the AFP communication between the webserver and the fileserver when the periodic weekly scripts are run. I did try restarting AFP on the webserver just in case but that made no difference. I can't really restart AFP on the fileserver as I have users actively connected, but my guess is that is working just fine since I can access those shared volumes from my desktop machines.
    Instead of restarting whichever machine you've been
    restarting, try stopping and starting just the
    webserver to see if that takes care of the problem.
    I did try this and everything was the same as above.
    Strange that Server has this problem losing connection to AFP shares, but my clients don't. There isn't anything obvious to me in the weekly scripts that could cause this but I'll look again in case I missed this.
    Seems like others would have run across this??
    Note: a reboot of the webserver again this morning (after this testing) returned the users sites to my webserver. Doing an automatic reboot each week would be a kludge solution, but one that I really want to avoid if possible.
    Thanks for the troubleshooting tips. I hope you or someone else has some further advice...
    Eric
    iBook G4, iMac G5, Dual 2.5 GHz G5   Mac OS X (10.4.4)  
    Dual G4 and single Xserve with RAID   Mac OS X (10.3.9)  

  • PowerShell script to check permissions given to "NT Authority\All Authenticated Users" and..

    Hi there,
    On my SharePoint site - some places (Sites/Lists etc) have given permissions to "NT Authority\All Authenticated Users"
    We need to remove these permissions and instead give permissions to "Forest1\Domain Users" and "Forest1\Domain Users"
    PowerSHell script to do above will be appreciated.
    Thank you so much.

    Hello,
    In order to check whether "NT Authority\All Authenticated Users" are present in your site use this reference - Link
    Remove permission script reference - Link
    Finally grant permission script reference - link
    Kindly mark it as answer if it helps you.
    -Hatim

  • Script set to auto apply Retention policy to all new mailbox created and run everyday

      Script to set auto apply Retention policy to all new mailbox created and run everyday on Exchange 2007 , 2010 , and 2013.
     Could you please help me with the script will rename the policy name please help me with script..
     Thanks,
     Chandu

    Hi Chandu,
    Have you find the solution finally? Have you tried Pavan's suggestion?
    Sorry for my lacking of code and script. If your requirement still haven't been achieved, I suggest we can ask a question in Exchange Development forum and Script Center for more professional suggestion:
    Microsoft Exchange Development forum
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads
    Script Center
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Regards,
    Winnie Liang
    TechNet Community Support

  • Minecraft server script (run minecraft server as a daemon in Arch)

    Hey all, I just finished editing and setting up a nice script to run a Minecraft server at boot in Arch. This is based on the original script on the minecraft wiki here. I've edited it to be suitable to place in your /etc/rc.d/ folder with the name "minecraft" (/etc/rc.d/minecraft).
    This requires a user "minecraft" with the home directory /home/minecraft to work by default.
    I decided I wanted to run the server entirely in RAM so I store all my files in /home/minecraft/backup while the server is offline. When it starts up it makes a tmpfs mount at /home/minecraft/minecraft and copies all the files there and runs from there. It makes an hourly backup using /etc/rc.d/backup stored in /home/minecraft/onlinebackup, first erasing the current backup and creating a new one. This is simply to save space. In the event of a crash without proper stopping of the daemon you will have a backup from your previous reboot (or restart of your minecraft server) in /home/minecraft/backup and one from within the previous hour in /home/minecraft/onlinebackup which I figure ought to be enough. You can manually backup at any time by restarting the daemon.
    All paths can be altered. You can run this game under your normal user if you wish, just change the Settings section at the top of the file. RAM amounts may need to be increased for both the server and for the tmpfs, depending on how large your files are (mine are tiny and I have not heard of over 48MB for a game world, but you never know). Just check up on df -h every now and again to make sure your tmpfs has plenty of space, or just increase the allocated maximum size from the start. If you have low RAM you can always change the script to simply not use tmpfs.
    If anyone wants, just ask and I can put up a version without tmpfs (should be easy enough to remove yourself but if you're not sure I'll do it for you)
    All you need to start off with (if starting your server for the first time, using the scrip as is) is the user minecraft created, with the folders backup, onlinebackup and minecraft in the folder /home/minecraft, your minecraft_server.jar file in /home/minecraft/backup and your oninebackup file in /home/minecraft/backup.
    NOTE: onlinebackup file runs from /home/minecraft/minecraft so that if your system crashes, the cron job to run the backups will fail because the link will point to a non-existant file until server is started again.
    You can use these commands to with the server: /etc/rc.d/minecraft {start|stop|restart|update|backup}
    The backup system is designed to wipe all previous sessions' backups upon starting the server, so do not set it to start the server at boot.
    /etc/rc.d/minecraft
    #!/bin/bash
    # /etc/rc.d/minecraft
    . /etc/rc.conf
    . /etc/rc.d/functions
    #Uncomment line below if using Sun JRE
    #. /etc/profile
    #Settings
    SERVICE='minecraft_server.jar'
    USERNAME="minecraft"
    MCPATH='/home/minecraft/minecraft'
    MCOFFLINEPATH='/home/minecraft/backup'
    INVOCATION='java -Xmx768M -Xms768M -jar minecraft_server.jar nogui'
    BACKUPPATH='/home/minecraft/onlinebackup'
    ME=`whoami`
    as_user() {
    if [ "$ME" == "$USERNAME" ] ; then
    bash -c "$1"
    else
    su -c - $USERNAME "$1"
    fi
    mc_start() {
    stat_busy "Starting Minecraft Server"
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "Tried to start but $SERVICE was already running!"
    else
    echo "$SERVICE was not running... starting."
    #Move minecraft from backup folder to ram
    mount -t tmpfs tmpfs -o size=50m $MCPATH
    cp -a $MCOFFLINEPATH/* $MCPATH
    echo "Files moved to RAM."
    cd $MCPATH
    as_user "cd $MCPATH && screen -dmS minecraft $INVOCATION"
    sleep 7
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is now running."
    #Create hourly backups while running
    ln -s $MCPATH/onlinebackup /etc/cron.hourly/minecraftonlinebackup
    echo "Hourly backups initiated."
    else
    echo "Could not start $SERVICE."
    umount $MCPATH
    fi
    fi
    add_daemon minecraft
    stat_done
    mc_saveoff() {
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running... suspending saves."
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER BACKUP STARTING. Server going readonly...\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-off\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
    sync
    sleep 10
    else
    echo "$SERVICE was not running. Not suspending saves."
    fi
    mc_saveon() {
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running... re-enabling saves."
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-on\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER BACKUP ENDED. Server going read-write...\"\015'"
    else
    echo "$SERVICE was not running. Not resuming saves."
    fi
    mc_stop() {
    stat_busy "Stopping Minecraft Server"
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running... stopping."
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER SHUTTING DOWN IN 10 SECONDS. Saving map...\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
    sleep 10
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"stop\"\015'"
    sleep 7
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE could not be shut down... still running."
    else
    echo "$SERVICE is shut down."
    #Stop hourly backups
    rm /etc/cron.hourly/minecraftonlinebackup
    echo "Hourly backup halted."
    #Unmount tmpfs
    cp -a $MCPATH/* $MCOFFLINEPATH
    umount $MCPATH
    echo "Files copied to HDD."
    fi
    else
    echo "$SERVICE was not running."
    fi
    rm_daemon minecraft
    stat_done
    mc_update() {
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running! Will not start update."
    else
    MC_SERVER_URL=http://minecraft.net/`wget -q -O - http://www.minecraft.net/download.jsp | grep minecraft_server.jar\</a\> | cut -d \" -f 2`
    as_user "cd $MCPATH && wget -q -O $MCPATH/minecraft_server.jar.update $MC_SERVER_URL"
    if [ -f $MCPATH/minecraft_server.jar.update ]
    then
    if `diff $MCPATH/minecraft_server.jar $MCPATH/minecraft_server.jar.update >/dev/null`
    then
    echo "You are already running the latest version of $SERVICE."
    else
    as_user "mv $MCPATH/minecraft_server.jar.update $MCPATH/minecraft_server.jar"
    echo "Minecraft successfully updated."
    fi
    else
    echo "Minecraft update could not be downloaded."
    fi
    fi
    mc_backup() {
    echo "Backing up minecraft world"
    if [ -d $BACKUPPATH/world_`date "+%m.%d.%Y"` ]
    then
    for i in 1 2 3 4 5 6
    do
    if [ -d $BACKUPPATH/world_`date "+%m.%d.%Y"`-$i ]
    then
    continue
    else
    as_user "cd $MCPATH && cp -r world $BACKUPPATH/world_`date "+%m.%d.%Y"`-$i"
    break
    fi
    done
    else
    as_user "cd $MCPATH && cp -r world $BACKUPPATH/world_`date "+%m.%d.%Y"`"
    echo "Backed up world"
    fi
    echo "Backing up the minecraft server executable"
    if [ -f "$BACKUPPATH/minecraft_server_`date "+%m.%d.%Y"`.jar" ]
    then
    for i in 1 2 3 4 5 6
    do
    if [ -f "$BACKUPPATH/minecraft_server_`date "+%m.%d.%Y"`-$i.jar" ]
    then
    continue
    else
    as_user "cd $MCPATH && cp minecraft_server.jar \"$BACKUPPATH/minecraft_server_`date "+%m.%d.%Y"`-$i.jar\""
    break
    fi
    done
    else
    as_user "cd $MCPATH && cp minecraft_server.jar \"$BACKUPPATH/minecraft_server_`date "+%m.%d.%Y"`.jar\""
    fi
    echo "Backup complete"
    #Start-Stop here
    case "$1" in
    start)
    mc_start
    stop)
    mc_stop
    restart)
    mc_stop
    mc_start
    update)
    mc_stop
    mc_backup
    mc_update
    mc_start
    backup)
    mc_saveoff
    mc_backup
    mc_saveon
    status)
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running."
    else
    echo "$SERVICE is not running."
    fi
    echo "Usage: /etc/rc.d/minecraft {start|stop|update|backup|status|restart}"
    exit 1
    esac
    exit 0
    /home/minecraft/backup/onlinebackup
    #!/bin/bash
    # /home/minecraft/backup/onlinebackup
    rm -rf /home/minecraft/onlinebackup/*
    /etc/rc.d/minecraft backup
    UPDATE:
    rationalOgre has created an alternate script with a different backup system, which will keep compressed copies of your world indefinitely, along with a working update function. https://bbs.archlinux.org/viewtopic.php … 97#p944797
    Last edited by PIMPinator (2011-06-08 14:00:54)

    @PIMPinator - Weird. On mine, if I don't source /etc/profile it won't work. No clue what the difference is. I tested it after I got it up and running, removing different elements to see if one or the other was the problem. Without it all in place it just didn't work.
    I made some modifications to your script today. Fixed "update" so it works properly. (You had it running mc_backup after mc_stop, which never worked on my system.) I basically reworked it so it runs the backup, then stops the server and performs the update in the ~/backup directory, then restarts the server. I also completely overhauled the "backup" system. (for this to work you have to comment out the rm -rf ~/onlinebackup/* directive in the onlinebackup script.) Now, it creates 4 rolling backups of the server, in tar.gz format. What this means is that over time, you will accumulate the last 4 backups for each day in your ~/onlinebackup folder. I thought about creating a cleanup function to cull anything over 2 days old but to be honest, even if your world was > 50MB, zipped up it's going to be about ~20mb which means you can have 50 of them and only be taking up a gig of server space. Anyway, here's the code if you are interested.
    #!/bin/bash
    # /etc/init.d/minecraft
    . /etc/rc.conf
    . /etc/rc.d/functions
    #Comment out the following if using OpenJDK
    . /etc/profile
    #Settings
    SERVICE='minecraft_server.jar'
    USERNAME="minecraft"
    MCPATH='/home/minecraft/minecraft'
    MCOFFLINEPATH='/home/minecraft/backup'
    INVOCATION='java -Xmx768M -Xms768M -jar minecraft_server.jar nogui'
    BACKUPPATH='/home/minecraft/onlinebackup'
    ME=`whoami`
    as_user() {
    if [ "$ME" == "$USERNAME" ] ; then
    bash -c "$1"
    else
    su -c - $USERNAME "$1"
    fi
    mc_start() {
    stat_busy "Starting Minecraft Server"
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "Tried to start but $SERVICE was already running!"
    else
    echo "$SERVICE was not running... starting."
    #Move minecraft from backup folder to ram
    mount -t tmpfs tmpfs -o size=50m $MCPATH
    cp -a $MCOFFLINEPATH/* $MCPATH
    echo "Files moved to RAM."
    cd $MCPATH
    as_user "cd $MCPATH && screen -dmS minecraft $INVOCATION"
    sleep 7
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is now running."
    #Create hourly backups while running
    ln -s $MCPATH/onlinebackup /etc/cron.hourly/minecraftonlinebackup
    echo "Hourly backups initiated."
    else
    echo "Could not start $SERVICE."
    umount $MCPATH
    fi
    fi
    add_daemon minecraft
    stat_done
    mc_saveoff() {
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running... suspending saves."
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER BACKUP STARTING. Server going readonly...\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-off\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
    sync
    sleep 10
    else
    echo "$SERVICE was not running. Not suspending saves."
    fi
    mc_saveon() {
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running... re-enabling saves."
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-on\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER BACKUP ENDED. Server going read-write...\"\015'"
    else
    echo "$SERVICE was not running. Not resuming saves."
    fi
    mc_stop() {
    stat_busy "Stopping Minecraft Server"
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running... stopping."
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER SHUTTING DOWN IN 10 SECONDS. Saving map...\"\015'"
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
    sleep 10
    as_user "screen -p 0 -S minecraft -X eval 'stuff \"stop\"\015'"
    sleep 7
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE could not be shut down... still running."
    else
    echo "$SERVICE is shut down."
    #Stop hourly backups
    rm /etc/cron.hourly/minecraftonlinebackup
    echo "Hourly backup halted."
    #Unmount tmpfs
    cp -a $MCPATH/* $MCOFFLINEPATH
    umount $MCPATH
    echo "Files copied to HDD."
    fi
    else
    echo "$SERVICE was not running."
    fi
    rm_daemon minecraft
    stat_done
    mc_update() {
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running! Will not start update."
    else
    MC_SERVER_URL=http://minecraft.net/`wget -q -O - http://www.minecraft.net/download.jsp | grep minecraft_server.jar\</a\> | cut -d \" -f 2`
    as_user "cd $MCOFFLINEPATH && wget -q -O $MCOFFLINEPATH/minecraft_server.jar.update $MC_SERVER_URL"
    if [ -f $MCOFFLINEPATH/minecraft_server.jar.update ]
    then
    if `diff $MCOFFLINEPATH/minecraft_server.jar $MCOFFLINEPATH/minecraft_server.jar.update >/dev/null`
    then
    echo "You are already running the latest version of $SERVICE."
    rm $MCOFFLINEPATH/minecraft_server.jar.update
    else
    as_user "mv $MCOFFLINEPATH/minecraft_server.jar.update $MCOFFLINEPATH/minecraft_server.jar"
    echo "Minecraft successfully updated."
    fi
    else
    echo "Minecraft update could not be downloaded."
    fi
    fi
    mc_backup() {
    echo "Backing up minecraft world"
    local COUNTER=
    if [ -f $BACKUPPATH/co ]
    then
    COUNTER=`cat $BACKUPPATH/co`
    if [ $COUNTER -gt 4 ]
    then
    #Loop back to 1 if greater than the max number of desired saves (4 hardcoded)
    as_user "echo 1 > $BACKUPPATH/co"
    COUNTER=1
    fi
    else
    COUNTER=1
    as_user "echo 1 > $BACKUPPATH/co"
    fi
    if [ -f $BACKUPPATH/world_`date "+%m.%d.%Y"`-$COUNTER.tar.gz ]
    then
    as_user "rm $BACKUPPATH/world_`date "+%m.%d.%Y"`-$COUNTER.tar.gz"
    fi
    as_user "cd $MCPATH && tar -czf $BACKUPPATH/world_`date "+%m.%d.%Y"`-$COUNTER.tar.gz world"
    #now to update the counter
    as_user "echo $(($COUNTER + 1)) > $BACKUPPATH/co"
    echo "Backup complete..."
    #Start-Stop here
    case "$1" in
    start)
    mc_start
    stop)
    mc_stop
    restart)
    mc_stop
    mc_start
    update)
    mc_saveoff
    mc_backup
    mc_saveon
    mc_stop
    mc_update
    mc_start
    backup)
    mc_saveoff
    mc_backup
    mc_saveon
    status)
    if ps ax | grep -v grep | grep -v -i SCREEN | grep $SERVICE > /dev/null
    then
    echo "$SERVICE is running."
    else
    echo "$SERVICE is not running."
    fi
    echo "Usage: /etc/rc.d/minecraft {start|stop|update|backup|status|restart}"
    exit 1
    esac
    exit 0
    I hope you don't mind.
    EDIT: Made a small change later that I came back and put in. If you are currently at the latest release it removes the .update file it created.
    Last edited by rationalOgre (2011-06-07 23:05:58)

  • What actions should I take after seeing this script running @ startup today?  "ARDAgent\" to do shell script \"say quack\"'"

    STEPS TAKEN:
    Logged into Mac for first time today.
    Noticed a new individual file in Directory Library ".a.text". (Settings disply hidden system file/folders)
    File contained only the text "--purge".
    Meta data on file directed source to bash process run @ startup.
    Attached History command output.
    Disabled ARD for now.
    SETTINGS:
    All Sharing was Off. 
    Firewall was set to Block All Incoming Connections.
    Home network with no other active users at time.
    Upgraded to Mavs 10.9.2 last night.
    Do not use any file sharing or remote access into Mac.
    The SSH host attempts were my old Amazon EC2 instances.
    Appears to start bitcoin app and few databases.
    Worth noting I've been having tons of various issues last few months.
    Thanks.
    <POB> My CommandLine prompts. XXXX on locals.
    XXXXXX:~ Administrator$ export HISTTIMEFORMAT='%F %T '
    XXXXXX:~ Administrator$ history
    <POB> OUTPUT
        1  2014-02-27 17:23:35 rm -rf ~/.Trash/*
        2  2014-02-27 17:23:35 cd
        3  2014-02-27 17:23:35 .
        4  2014-02-27 17:23:35 ./
        5  2014-02-27 17:23:35 cd
        6  2014-02-27 17:23:35 lib
        7  2014-02-27 17:23:35 cd/
        8  2014-02-27 17:23:35  
        9  2014-02-27 17:23:35 ls
       10  2014-02-27 17:23:35 cd downloads
       11  2014-02-27 17:23:35 ls downloads
       12  2014-02-27 17:23:35 ls Downloads
       13  2014-02-27 17:23:35 find / -nouser -ls
       14  2014-02-27 17:23:35 find /~nouser -ls
       15  2014-02-27 17:23:35 ls
       16  2014-02-27 17:23:35 ls /library
       17  2014-02-27 17:23:35 /LaunchAgents
       18  2014-02-27 17:23:35 ls /LaunchAgents
       19  2014-02-27 17:23:35 ls /Automator
       20  2014-02-27 17:23:35 ls /KeyChains
       21  2014-02-27 17:23:35 sha
       22  2014-02-27 17:23:35 toop
       23  2014-02-27 17:23:35 top
       24  2014-02-27 17:23:35 dscl . -list /Users UniqueID
       25  2014-02-27 17:23:35 $ dscl -plist . readall /users
       26  2014-02-27 17:23:35 $ dscl . readall /users
       27  2014-02-27 17:23:35 $ dscl . readall /503
       28  2014-02-27 17:23:35 ls/Users
       29  2014-02-27 17:23:35 - dscacheutil -q group
       30  2014-02-27 17:23:35 cd
       31  2014-02-27 17:23:35 cd.
       32  2014-02-27 17:23:35 cd .
       33  2014-02-27 17:23:35 ls
       34  2014-02-27 17:23:35 ifconfig
       35  2014-02-27 17:23:35 ifconfig
       36  2014-02-27 17:23:35 ifconfig
       37  2014-02-27 17:23:35 config helper
       38  2014-02-27 17:23:35 config
       39  2014-02-27 17:23:35 ls
       40  2014-02-27 17:23:35 ssh awsXXXX
       41  2014-02-27 17:23:35 defaults write com.google.Keystone.Agent checkInterval 0
       42  2014-02-27 17:23:35 exit
       43  2014-02-27 17:23:35 exit
       44  2014-02-27 17:23:35 /var/log/secure.log
       45  2014-02-27 17:23:35 ssh awsXXXXXX
       46  2014-02-27 17:23:35 exit
       47  2014-02-27 17:23:35 kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
       48  2014-02-27 17:23:35 sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfi x|x)/{print $3}'
       49  2014-02-27 17:23:35 launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
       50  2014-02-27 17:23:35 ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta} * L*/Fonts 2> /dev/null
       51  2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
       52  2014-02-27 17:23:35 top
       53  2014-02-27 17:23:35 ps
       54  2014-02-27 17:23:35 top
       55  2014-02-27 17:23:35 top
       56  2014-02-27 17:23:35 top
       57  2014-02-27 17:23:35 sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -agent -stop
       58  2014-02-27 17:23:35 man who
       59  2014-02-27 17:23:35 who
       60  2014-02-27 17:23:35 whoami
       61  2014-02-27 17:23:35 ps -aux
       62  2014-02-27 17:23:35 ps
       63  2014-02-27 17:23:35 top
       64  2014-02-27 17:23:35 ps -eo pid,etime
       65  2014-02-27 17:23:35 top
       66  ??ps aux | less
       67  2014-02-27 17:23:35 pstree
       68  2014-02-27 17:23:35 ps -eo euser,ruser,suser,fuser,f,comm,label
       69  2014-02-27 17:23:35 pgrep
       70  2014-02-27 17:23:35 pgrep remote
       71  2014-02-27 17:23:35 apt-get install htop
       72  2014-02-27 17:23:35 htop
       73  2014-02-27 17:23:35 netstat -tulpn | grep :80
       74  2014-02-27 17:23:35 ls -l /proc/635/exe
       75  2014-02-27 17:23:35 swapon  -a
       76  2014-02-27 17:23:35 ma ps
       77  2014-02-27 17:23:35 man ps
       78  2014-02-27 17:23:35 man ps
       79  2014-02-27 17:23:35 ps -a
       80  2014-02-27 17:23:35 ps -A
       81  2014-02-27 17:23:35 whoami
       82  2014-02-27 17:23:35 ps -f
       83  2014-02-27 17:23:35 ps -G
       84  2014-02-27 17:23:35 ps -g
       85  2014-02-27 17:23:35 ps -T
       86  2014-02-27 17:23:35 ps-t
       87  2014-02-27 17:23:35 ps -v
       88  2014-02-27 17:23:35 ps start
       89  2014-02-27 17:23:35 top
       90  2014-02-27 17:23:35 ps
       91  2014-02-27 17:23:35 users
       92  2014-02-27 17:23:35 last
       93  2014-02-27 17:23:35 ls /var/log/wtmp*
       94  2014-02-27 17:23:35 last -f /var/log/wtmp.1
       95  2014-02-27 17:23:35 last -f /var/log/wtmp.0
       96  2014-02-27 17:23:35 ~/.bash_history
       97  2014-02-27 17:23:35 cat ~/.bash_history
       98  2014-02-27 17:23:35 ls /Automator
       99  2014-02-27 17:23:35 cat Automator
      100  2014-02-27 17:23:35 open ~/.bash_history
      101  2014-02-27 17:23:35 dscl . readall /users
      102  2014-02-27 17:23:35 ls/library
      103  2014-02-27 17:23:35 cd/library
      104  2014-02-27 17:23:35 cd..
      105  2014-02-27 17:23:35 cd
      106  2014-02-27 17:23:35 ls
      107  2014-02-27 17:23:35 cd Library
      108  2014-02-27 17:23:35 cd/Library
      109  2014-02-27 17:23:35 ls/Automator
      110  2014-02-27 17:23:35 toop
      111  2014-02-27 17:23:35 top
      112  2014-02-27 17:23:35 ifconfig
      113  2014-02-27 17:23:35 config helper
      114  2014-02-27 17:23:35 config
      115  2014-02-27 17:23:35 top
      116  2014-02-27 17:23:35 ps -a
      117  2014-02-27 17:23:35 ps -A
      118  2014-02-27 17:23:35 ps -aux
      119  2014-02-27 17:23:35 ps
      120  2014-02-27 17:23:35 getprocessforpid(677)
      121  2014-02-27 17:23:35 man ps
      122  2014-02-27 17:23:35 ps -U
      123  2014-02-27 17:23:35 ps -u
      124  2014-02-27 17:23:35 GetProcessPID(494)
      125  2014-02-27 17:23:35 GetProcessPID() q
      126  2014-02-27 17:23:35 GetProcessPID494
      127  2014-02-27 17:23:35 GetProcessPID 494
      128  2014-02-27 17:23:35 netstat -b
      129  2014-02-27 17:23:35 top
      130  2014-02-27 17:23:35 top
      131  2014-02-27 17:23:35 top
      132  2014-02-27 17:23:35 netstat -a
      133  2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
      134  2014-02-27 17:23:35 top
      135  2014-02-27 17:23:35 netstat -a
      136  2014-02-27 17:23:35 top
      137  2014-02-27 17:23:35 top
      138  2014-02-27 17:23:35 netstat -a
      139  2014-02-27 17:23:35 ps -aux
      140  2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
      141  2014-02-27 17:23:35 ps -aux
      142  2014-02-27 17:23:35 ps -A
      143  2014-02-27 17:23:35 ps -A
      144  2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
      145  2014-02-27 17:23:35 netstat -a
      146  2014-02-27 17:23:35 top
      147  2014-02-27 17:23:35 top
      148  2014-02-27 17:23:35 netstat -a
      149  2014-02-27 17:23:35 netstat -a
      150  2014-02-27 17:23:35 netstat -a
      151  2014-02-27 17:23:35 q
      152  2014-02-27 17:23:35 top
      153  2014-02-27 17:23:35 top
      154  2014-02-27 17:23:35 sudo tmutil disablelocal
      155  2014-02-27 17:23:35 exit
      156  2014-02-27 17:23:35 top
      157  2014-02-27 17:23:35 top
      158  2014-02-27 17:23:35 top
      159  2014-02-27 17:23:35 top
      160  2014-02-27 17:23:35 top
      161  2014-02-27 17:23:35 top
      162  2014-02-27 17:23:35 neststat -n
      163  2014-02-27 17:23:35 netstat -n
      164  2014-02-27 17:23:35 netstat -n
      165  2014-02-27 17:23:35 ls
      166  2014-02-27 17:23:35 lsaf
      167  2014-02-27 17:23:35 cd ..
      168  2014-02-27 17:23:35 cd ..
      169  2014-02-27 17:23:35 cd ..
      170  2014-02-27 17:23:35 cd ..
      171  2014-02-27 17:23:35 ls
      172  2014-02-27 17:23:35 top
      173  2014-02-27 17:23:35 netstat
      174  2014-02-27 17:23:35 dscl . list/users
      175  2014-02-27 17:23:35 cd ~
      176  2014-02-27 17:23:35 dscl . list/users
      177  2014-02-27 17:23:35 dscl . list /users
      178  2014-02-27 17:23:35 dscl . list /groups
      179  2014-02-27 17:23:35 dscl . readall /users
      180  2014-02-27 17:23:35 netstat
      181  2014-02-27 17:23:35 netstat
      182  2014-02-27 17:23:35 whoami
      183  2014-02-27 17:23:35 ls
      184  2014-02-27 17:23:35 cd ..
      185  2014-02-27 17:23:35 cd ..
      186  2014-02-27 17:23:35 cd .
      187  2014-02-27 17:23:35 cd ..
      188  2014-02-27 17:23:35 ls
      189  2014-02-27 17:23:35 tree
      190  2014-02-27 17:23:35 cd Users
      191  2014-02-27 17:23:35 ls
      192  2014-02-27 17:23:35 cd Administrator
      193  2014-02-27 17:23:35 ls
      194  2014-02-27 17:23:35 cd ..
      195  2014-02-27 17:23:35 cd ..
      196  2014-02-27 17:23:35 cd ..
      197  2014-02-27 17:23:35 ls
      198  2014-02-27 17:23:35 cd Users
      199  2014-02-27 17:23:35 ls
      200  2014-02-27 17:23:35 cd Adminstrator
      201  2014-02-27 17:23:35 cd Administrator
      202  2014-02-27 17:23:35 ls
      203  2014-02-27 17:23:35 cd Downloads
      204  2014-02-27 17:23:35 ls
      205  2014-02-27 17:23:35 exit
      206  2014-02-27 17:23:35 whoami
      207  2014-02-27 17:23:35 ls
      208  2014-02-27 17:23:35 ls
      209  2014-02-27 17:23:35 cd Library
      210  2014-02-27 17:23:35 ls
      211  2014-02-27 17:23:35 cd Application Support
      212  2014-02-27 17:23:35 ls
      213  2014-02-27 17:23:35 cd ..
      214  2014-02-27 17:23:35 ls
      215  2014-02-27 17:23:35 cd ..
      216  2014-02-27 17:23:35 ls
      217  2014-02-27 17:23:35 cd pXXXXXXXX
      218  2014-02-27 17:23:35 ls
      219  2014-02-27 17:23:35 cd Library
      220  2014-02-27 17:23:35 whoami
      221  2014-02-27 17:23:35 sudo - Adminsitrator
      222  2014-02-27 17:23:35 ls
      223  2014-02-27 17:23:35 ls
      224  2014-02-27 17:23:35 sudo -
      225  2014-02-27 17:23:35 more /etc/hosts
      226  2014-02-27 17:23:35 scc ver
      227  2014-02-27 17:23:35 scc numprofiles
      228  2014-02-27 17:23:35 netstat -an |find /i "listening"
      229  2014-02-27 17:23:35 netstat
      230  2014-02-27 17:23:35 top
      231  2014-02-27 17:23:35 kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
      232  2014-02-27 17:23:35 sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfi x|x)/{print $3}'
      233  2014-02-27 17:23:35 launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
      234  2014-02-27 17:23:35 ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta} * L*/Fonts 2> /dev/null
      235  2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
      236  2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
      237  2014-02-27 17:23:35 top
      238  2014-02-27 17:23:35 dscacheutil -flushcache
      239  2014-02-27 17:23:35 sudo killall -HUP mDNSResponder
      240  2014-02-27 17:23:35 top
      241  2014-02-27 17:23:35 ./bitcoin-qt
      242  2014-02-27 17:23:35 cd $home
      243  2014-02-27 17:23:35 ls
      244  2014-02-27 17:23:35 cd ..
      245  2014-02-27 17:23:35 cd ..
      246  2014-02-27 17:23:35 cd ..
      247  2014-02-27 17:23:35 ls
      248  2014-02-27 17:23:35 cd Applications
      249  2014-02-27 17:23:35 ls
      250  2014-02-27 17:23:35 ./bitcoin-qt.app
      251  2014-02-27 17:23:35 top
      252  2014-02-27 17:23:35 ps -420
      253  2014-02-27 17:23:35 ps -9541
      254  2014-02-27 17:23:35 top
      255  2014-02-27 17:23:35 /Applications/Postgres93.app/Contents/MacOS/bin/psql ; exit;
      256  2014-02-27 17:23:35 /Applications/Postgres93.app/Contents/MacOS/bin/psql ; exit;
      257  2014-02-27 17:23:35 top
      258  2014-02-27 17:23:35 ps -a (2077)
      259  2014-02-27 17:23:35 ps -a2077
      260  2014-02-27 17:23:35 sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
      261  2014-02-27 17:23:35 top
      262  2014-02-27 17:23:35 on run
      263  2014-02-27 17:23:35 do shell script "osascript -e 'tell app \"ARDAgent\" to do shell script \"say quack\"'"
      264  2014-02-27 17:23:35 end run
      265  2014-02-27 17:23:35 ls -ls /System/Library/Filesystems/AppleShare/check_afp.app/Contents/MacOS/check_afp 2
      266  2014-02-27 17:23:35 sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
    <POB> END

    I'm extremely unclear on exactly what's happening. You mention something about a script running at startup in your subject, but then never mention that again. What's going on there? Where are you finding that script?
    That script would suggest someone playing a joke on you, by making your computer say "quack" every time you start up. That's not indicative of malware.
    On the other hand, a hidden file as you describe is a common malware trick, though I'm not sure why it would only contain "--purge" - that isn't a complete command, as far as I know, and the purge command isn't likely to be used for malicious purposes anyway.
    Still, you do have some indication that you're using Bitcoin-related apps, and there has been some Bitcoin malware that has appeared recently. See:
    New CoinThief malware discovered
    Note that the post on MacRumors that you refer to in your second post is almost six years old, and references a vulnerability that was closed later in 2008. It's completely irrelevant to any modern system.

  • Reporting Services through ISA server for All Authenticated Users

    Hello colleagues.
    I have MS SQL 2012 server with Reporting Services and it work via link:
    https://reports2.domain.com/reports
    In LAN all work fine, but I want publish this resource via ISA for All Authenticated Users.
    When in publish rule I configure (in Condition) "All users" - all work fine, but when I configure "All Authenticated Users" - I have trouble on web form on
    https://reports2.domain.com/reports/Pages/Report.aspx?ItemPat...  - scripts not work, because it run how "anonymous" (I see on ISA logging) and ISA block scripts.
    I can't use "All Users", because it's not secure.
    Maybe somebody publish Reporting Services through ISA server for All Authenticated Users?
    OR maybe - how on Reporting Services configure Negotiate authenticated for scripts?

    Hi Alexander,
    All users or applications who request access to report server content or operations must be authenticated using the authentication type configured on the report server before access is allowed. The AuthenticationType named RSWindowsNegotiate is supported
    by Reporting Services. To configure Windows Authentication on the Report Server, please see:
    http://msdn.microsoft.com/en-us/library/cc281253(v=sql.110).aspx
    Besides, we can publish report server via ISA server. Please note that you should use a new web port number with a new listener which shouldn’t be used by other web site for report server. Reference:
    http://social.technet.microsoft.com/Forums/forefront/en-US/1cc68996-1ce6-4d88-a30d-2bfd13fba06e/how-to-publish-ssrs-2008-through-isa-2006?forum=Forefrontedgegeneral
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support
    Katherine thanks for answer.
    Report Server service started as Domain account.
    I have in RSReportServer.config this:
    <Authentication>
    <AuthenticationTypes>
    <RSWindowsNegotiate />
    </AuthenticationTypes>
    <RSWindowsExtendedProtectionLevel>Allow</RSWindowsExtendedProtectionLevel>
    <RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
    <EnableAuthPersistence>true</EnableAuthPersistence>
    </Authentication>
    In web.config I have this:
    <authentication mode="Windows" />
        <identity impersonate="true" />
    I can go (from Internet through ISA) to
    https://reports2.domain.com/reports  and LogOn Authentication is work, but scripts not work, because it run how "anonymous" (I see this on ISA logging) and ISA block scripts.
    Do you know where in Reporting Services configure run scripts with Negotiate authentication?

  • People Picker JS Control not fetching all the users...

    Hi,
    I am using Java Script people picker control. It fetching information for users but not all. I used following code block to get the control working. Why is not fetching all the users?? Where as OOTB people picker fetches same user. This does not make sense.
    My environment is SharePoint online.  
    // Run your custom code when the DOM is ready.
    $(document).ready(function () {
    // Specify the unique ID of the DOM element where the
    // picker will render.
    initializePeoplePicker('peoplePickerDiv');
    // Render and initialize the client-side People Picker.
    function initializePeoplePicker(peoplePickerElementId) {
    // Create a schema to store picker properties, and set the properties.
    var schema = {};
    schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
    schema['SearchPrincipalSource'] = 15;
    schema['ResolvePrincipalSource'] = 15;
    schema['AllowMultipleValues'] = true;
    schema['MaximumEntitySuggestions'] = 50;
    schema['Width'] = '280px';
    // Render and initialize the picker.
    // Pass the ID of the DOM element that contains the picker, an array of initial
    // PickerEntity objects to set the picker value, and a schema that defines
    // picker properties.
    this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);
    Here is the link from Microsoft explaining it.
     How to: Use the client-side People Picker control in SharePoint-hosted apps: https://msdn.microsoft.com/en-us/library/office/jj713593.aspx
    Appreciate any help or workaround here.
    Thanks.

    Hi,
    In my case im usign customize people picker. it is better to use in delelopement since you have the control and customization.
    I have used select2 (https://select2.github.io/examples.html) drop down control and create a people picker
    You can use the same REST call to populate data.
    function initApproversPicker(success, fail) {
                var data = { results: [] };
                var executor = new SP.RequestExecutor($$.getAppWebUrlUrl());
                executor.executeAsync(
      url: $$.getAppWebUrlUrl() + "/_api/web/siteusers",
      method: "GET",
      contentType: "application/json;odata=verbose",
      headers: { "Accept": "application/json; odata=verbose" },
      success: function (dt) {
          $.each(JSON.parse(dt.body).d.results, function (i, ele) {
              data.results.push({ id: ele.Id, text: ele.Title });
          executor.executeAsync(
               url: $$.getAppWebUrlUrl() + "/_api/web/sitegroups",
               method: "GET",
               contentType: "application/json;odata=verbose",
               headers: { "Accept": "application/json; odata=verbose" },
               success: function (dt) {
                   $.each(JSON.parse(dt.body).d.results, function (i, ele) {
                       data.results.push({ id: ele.Id, text: ele.Title });
                   $("#WFApprovers").select2({ data: data, multiple: true });
                   if (success) {
                       success();
               error: function (d, errorCode, errorMessage) {
                   if (fail) {
                       fail();
                   utils.log(errorMessage);
      error: function (d, errorCode, errorMessage) {
          utils.log(errorMessage);
    Melick Rajee http://melick-rajee.blogspot.com

  • Powershell User logon script not Exiting With "Exit" scripts are set to be visible in GPO

    I am trying to run this script as a user logon script and it is set to visible to the user. There are other parts of the script but It won't ever Exit. It works fine if I run it directly I only have the trouble when it is in the logon script. I'm thinking
    of tryin "Kill -Id $PID" but I'm sure I'll get a bad return code.
    Has anyone else experienced this or hav any ideas what I could try?
    If (Test-Path U:){
    Robocopy U:\ $Destination /E /move /XF "*.inf"
    New-Item -Path HKCU:\Software\test\test -Name Test –Force
    Else{
    Exit
    Else{
    New-Item -Path HKCU:\Software\test\1 -Name Test1 –Force
    Exit       #here is where it will not stop!
    Exit

    Sorry, I did mention this was only a subset of the complete script.
    So, what I am trying to accomplish in words.
    1. Check for the existence of a certain folderon the c: Drive (that is created as apart of a different process)
    2.  Look to see if a registry key exisits that tells the script if it should run or not. So if certain registry key exists under HKCU then don't run if not continue.)
    3. The first time a user logs in and does not find the value that the process is allready complete show the user a message box aski9ng them if they are ready to do (something) if not write a registry key saying step one has completed and then quit.
    4. When the user logs in again the script looks to see if the process is complete and or if step one is complete, if step one is complete it allows the user to skip the process 2 more times but on the forth login forces the user to complete the process and
    writes the final registry key that it is complete.
    Like I say I have this all working correctly if I manually have the user run it. I just don't know why Exit is not being recognized when in the users login script processing of the script. I appreciate your reply and any direction you can point me to.

  • How to write select query for all the user tables in database

    Can any one tell me how to select the columns from all the user tables in a database
    Here I had 3columns as input...
    1.phone no
    2.memberid
    3.sub no.
    I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
    Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
    Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
    I am trying for this query since 30days...
    Help me please....any kind of help is appreciated.....

    Hi,
    user13113704 wrote:
    ... i need to include the symbol (') for the numbers(values) to get selected..
    eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
    Starting in Oracle 10, you can also use Q-notation:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
    ...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
    -- Suppress SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    -- Run preliminary query to generate main query
    SPOOL     c:\my_sql_dir\all_ah_t.sql
    SELECT       'select call time, record, agn from '
    ||       owner
    ||       '.'
    ||       table_name
    ||       ' where phone_no = ''6186759765'' and memberid = j34563298'
    ||       CASE
               WHEN ROW_NUMBER () OVER ( ORDER BY  owner          DESC
                              ,        table_name      DESC
                              ) = 1
               THEN  ';'
               ELSE  ' UNION ALL'
           END     AS txt
    FROM       all_tables
    WHERE       SUBSTR (table_name, 1, 4)     = 'AH_T'
    ORDER BY  owner
    ,       table_name
    SPOOL     OFF
    -- Restore SQL*Plus features that interfere with raw output (if desired)
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    -- Run main query:
    @c:\my_sql_dir\all_ah_t.sql
    so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"?

  • OID Newbie - Select all OID users

    I want to know if I can run a SQL command to select all the users from OID. I want to do this because I need to create a script to assist me in RAD creations for all the users.
    Anyone have any help for a newbie like me???

    I don't think you can do it in SQL - what you need is an LDAPSEARCH command - I can possibly help with that if you think it might help.
    Remember OID is an LDAP !

  • 'suspend' command in script run as a cronjob not working

    I have the following 2 lines in a script run every minute :
    echo "test" >> $HOME/test
    /usr/bin/systemctl suspend
    The script is run properly as the file 'test' is appended with 'test' every minute. But the suspend command doesn't work. Both command work when they are entered manually.
    What could be causing this?

    To expand on what I think thegala is trying to get at, the use of systemctl's suspend, poweroff, etc. are all made available to a regular user through polkit and logind.  So I am not sure that the cron daemon gets itself an authenticated session, making that suspend non-functional.

  • Will scripts run automatically ?

    If I shut down my Mac everynight(I live in a time zone 6 hours ahead of Eastern US time), will the scripts run automatically when I start it up the next morning...or...do I need a special utility application for this ?

    these scripts are not worth worrying about. you should just leave them alone. the OS does a very good job of running them all by itself. and they are all quite useless anyway. many people (apparently yourself included) seem to think that these periodic scripts are important maintenance tools and will make your system run better and faster. nothing can be further from the truth.
    *monthly scripts* :
    1. archive and recycle fax logs. have you used your mac as a fax machine lately?
    2. write accounting information (total uptime of every account) in the monthly.out log.
    That's IT. so unless you use your mac as a fax machine (do you, really?) you don't need to run monthly scripts. EVER.
    *weekly scripts*:
    in snow leopard they do one thing ONLY: rebuild whois database. it's only useful if you are a unix user and actually use the whois terminal command at least on occasion. I'll bet my bottom dollar you never have and never will. then you don't need to run the weekly scripts either. EVER.
    *daily scripts*
    they do several things
    1. clean up the logs from /Library/Logs/CrashReporter which are more than 60 days old. hardly an urgent task. and those logs are really very few unless your system is seriously messed up. you can go a year without deleting any and will collect a few MBs at the most.
    2. delete junk from /tmp directory that's more than 3 days old.
    This is done automatically on every reboot without any periodic scripts. if you don't reboot the computer then daily scripts will run *no matter* the schedule. if you don't sleep the computer at night they'll run at night. if you do sleep the computer at night they will run first thing in the morning when the computer is turned on. again, zero need to reschedule anything.
    3. deletes files older than 7 days from /var/rwho. this is only relevant if you are running a unix network. otherwise there is nothing to delete - EVER.
    4. rotate accounting files. again, those are nonexistent unless you are a unix administrator.
    5. run the terminal command *df -l -h* and print out the output to daily.out. all this command does is list currently mounted hard drives. useless.
    6.print the current network status in daily.out. this is again just reporting not maintenance.
    7. Delete system messages. Once again this is relevant only for multi-user Unix systems.
    8. remove scratch fax files. see my comment above about using your mac as a fax machine.
    9. it writes some other accounting and system status info to daily.out. this is again only reporting and is ONLY actually present on unix networks.
    and that's all, folks.

Maybe you are looking for

  • Windows 8.1 Bitlocker fails.

    Hello,  Im trying to enable BitLocker on my windows 8.1 laptop.   It starts the setup, shrinks my partition but then gives me the following error.  BitLocker Setup failed to copy boot files.  You may need to manually prepare your drive for BitLocker.

  • FM creation for vendor evaluation data

    Hai,     In my function module I need to get vendor evaluation data. To do this from where I can get the details, r there any tables for this, could u suggest something for this, actually I'm new for this MM. Eventhough if there r any tables, before

  • Assembly failed due to Broken DCs

    Hi All, I have around 8 activities which were waiting for import on cons, after importing them (remember cons is not configured for runtime systems) in the assembly stage for all the activities assembly failed. On checking i came to know the <b>track

  • Can I run two applications at once from two different computers?

    Good Evening, I would like to use the cloud service. I have read over the FAQs and they were quite clear, however I did not seem to find something to the effect of what I need answered. If I were to download the apps on a backup computer and my perso

  • Is PHP part of Leopard Server?

    I am about to install a PHP program called Jomscocial which is a community program for a website that is hosted on my server, am I correct in thinking that PHP is standard on the server etc.