A form of computer programming that — in the context of system administration — lends it self well to automating tasks.

learn more… | top users | synonyms (2)

0
votes
1answer
35 views

Running server side applications that have no front end or user interaction.

I am setting up a system that required a series of scripts that run 24/7 quering a database to check if data meets certain requirements and then triggers alarms as well as inserting data into the ...
-4
votes
1answer
2k views

How to automate a transfer of file from server to local system using ftp

I have a windows server 2003 which generates backup file to ftp folder in the server(using my own script). And I will ftp and copy it to my local hard disk daily. How can I automate this process using ...
-1
votes
1answer
86 views

ESXi free scripting [closed]

I am trying to figure out if it is possible to script commands on the esxi system to run commands on the esxi system after the first auto start vm at a specific time after it is powered on before the ...
-2
votes
1answer
772 views

Script to copy down portions of a roaming profile [closed]

I'm currently working on migrating users to Windows 7 from XP. We use roaming profiles. Xp creates a folder named "Profile", while Windows creates "Profile.V2". Theses folders are independent of each ...
3
votes
2answers
126 views

Discrepancy in ssh-agent behavior

It seems like i'm having a bit of a discrepancy between the behavior of ssh-agent for two accounts I have configured. I wrote a simple monitoring script to check on the availability of some VMs we ...
0
votes
3answers
34 views

Measuring Program execution time

I would like to call a program from a script, (malwarebytes, chkdsk, A/V scan) and have the script keep track of how long the program ran. Could someone point me in the direction of what I should be ...
0
votes
2answers
354 views

how to get the full path of a of an open file

I have script that runs on a Windows server to perform operations on certain files. The script often fails because various users (even myself) have open file shares on the server that they've ...
2
votes
1answer
82 views

Remove DVD drive from device manager - command line

Is there a way through command line to uninstall the entry under DVD/CD-ROM drives in device manager? Somehow someone applied a GPO on our top level domain and it's affected a number of things, I've ...
1
vote
3answers
700 views

How can I suppress the “…this does not map back…” message when using SSH?

I am writing a script that attaches to several of our machines via SSH to check some usage stats. Each time I do: ssh -i ~/.ssh/ourkeyfile.pem user@host I get the typical message: Address ...
0
votes
4answers
360 views

Script runs on 50 servers. How can I ensure only one executes a particular step?

I have some work that needs to be done on 50+ servers. The first step is to checkout an updated version of some source code onto a shared directory (assume all have the shared drive mounted). The ...
0
votes
1answer
111 views

Close a SSH Session when it suspend

I start a ssh session on a remote host and execute a script on the remote host. The Script is an update script that change the remote IP. Now my local bash script hanging on the line with this ...
1
vote
0answers
835 views

Powershell Script Hard drive Inventory

I've created a script to get hard drive information from our servers. The script use WMI to query the Win32_LogicalDisk class and returns "Size (GB)", "Free Space (GB)" and "Free Space (%)" for each ...
48
votes
6answers
12k views

Why use Chef/Puppet over shell scripts?

New to Puppet and Chef tools. Seems like the job that they are doing can be done with shell scripting. Maybe it was done in shell scripts until these came along. I would agree they are more readable. ...
1
vote
1answer
472 views

How to not run /etc/profile.d/custom.sh during Secure FTP login

When I attempt to Secure FTP (using WinSCP) to my CentOS 6.4 box I'm prompted with a message that states: Received too large (168438314 B) SFTP packet. Max supported packet size is 1024000 B. This ...
0
votes
0answers
75 views

Batch script terminates too soon

I need some help with Windows batch/CMD scripting. I wrote a script to record mic-in to a MP3 for 12 hours. It runs ok when running it manually. It will run with task scheduler too - just that, ...
0
votes
2answers
340 views

Putting this command into bash script

with help of google , script that measures multicast streams bandwidth. Here it is tcpdump -tnn -i eth1 -f multicast | sort | uniq -c | awk '{print $3,"> "$5,$1*$NF/2*8/1024 " Kbps"}' | awk '$1 ...
4
votes
1answer
625 views

How to get Mailbox Folder Permissions with SamAccountName or UPN?

I need to collect and store the folder permissions for each folder in each mailbox of our Exchange system. I'm already aware of the Cmdlet Get-MailboxFolderPermission but it has a serious problem. ...
0
votes
1answer
63 views

How to write a script to install multiple things by just executing it

I have a server (centOS) on which I would like to install the staple development tools. Java, Tomcat, and MySql. What is a good way to write a script that can be ran on newly spawned server so that ...
0
votes
1answer
218 views

> /dev/tty - What is the purpose of this command?

This is in one of the rc scripts in Red Hat and I want to understand the purpose of > /dev/tty[n] last=0 for i in `LC_ALL=C grep '^[0-9].*respawn:/sbin/mingetty' /etc/inittab | sed 's/^.* ...
-1
votes
1answer
196 views

Can not seem to get expr substr to work

Can anyone tell me what I am doing wrong ? [ /jlr/sub/libexec/vmr-staging ] $ expr substr "onetwothree" 1 4 expr: syntax error I got the syntax from http://stackoverflow.com/a/220464/1150847
0
votes
1answer
121 views

If I ssh to a remote computer and run a script, do I need to keep my connection for the script to finish executing?

I apologize if this question has been asked before, I wasn't able to find anything with my exact query. I have a rather lengthy script that needs to be run on a remote computer, and it takes about 3 ...
2
votes
1answer
52 views

Rolling Oncall Distribution List with Microsoft Exchange

I'm trying to set up an "oncall" user/email for Microsoft Exchange (ex: oncall@mybiz.org), with the idea being that whoever on my team is currently "oncall" will be added to the list. Then, when they ...
1
vote
2answers
677 views

Scripts or tools to parse email message to remove attachment of particular name

I have configured Redmine email integration and while it's awesome, a major annoyance is that people have signatures that include a company logo, which then gets posted to every ticket they update via ...
0
votes
1answer
118 views

Recursively delete empty folders with verbose output

This should be fairly simple, but I am not sure what i'm missing. I'd like to recursively delete empty directories, and get an output for what's being deleted, this command works for sure, but I just ...
0
votes
2answers
695 views

Debian webserver - Crontab error (not running php script)

I've a webserver with several sites and I'm trying to run a script by crontab but it gives me a error (126 and 127) My script is in: /var/www/site1/script.php When I run the command: php ...
1
vote
2answers
4k views

Is it possible to change BIOS settings from Linux?

I'm trying to write a script to enable IPMI on a ton of machines without having to hook up a KVM to them one by one. Is it possible to change the BIOS settings from Linux? OS is SL6. I understand ...
0
votes
2answers
74 views

How do I set the Red Hat hostname at boot via a script?

In our computing environment we have a number of virtual machines running Red Hat Enterprise Liunx 6 that need to set their hostname programmaticly when they boot for the first time. Currently they ...
0
votes
2answers
85 views

get informations from x servers per ssh by bash script

I've server Master,SlaveA,SlaveB,SlaveC, and want to get eg. the space information from the server by executing one bash script on the master. How can I do that? --case-- 192.168.1.1 - Master ...
0
votes
0answers
130 views

openvpn up script execute command in schroot

We would like to control a service in a chroot environment utilising scripts run during an openvpn up and down sequence. Host OS is ubuntu-12-04, chroot environment runs ubuntu-12-10 A session has ...
1
vote
1answer
106 views

Windows Server 2003: Schedule FORFILE loop in TASK SCHEDULER

I am trying to create a SCHEDULED TASK that will kick off a FORFILE loop, and terminate the process after an hour (or 12 hours). I expect there to be MILLIONS of files the the paths defined, and I ...
0
votes
1answer
70 views

Template for use with Outlook 2010 t enable creation of multiple PST's for many users on one system

This is probably not something many people would have a need for but at this company where there is a large turnover, every user has to have IT create their account on a laptop. Even when recycling, ...
0
votes
0answers
25 views

Running command from script won't give desired output

If I run sudo /usr/lib/update-notifier/apt-check -p &> ~/update-list.txt directly on terminal, I get the update-list.txt file with all the updates in it. But if I write the same command in a ...
5
votes
2answers
1k views

Changing physical path on IIS through appcmd isn't activated

We have come across an issue on IIS 7.5 where we have a simple deploy system which consists of the following: Create a zip-file of new webroot, consisting of three folders: Api Site Manager This ...
1
vote
2answers
218 views

Running a script periodically via a GPO

I search a way to run a script each hour via a GPO accross every computers on a domain. The only way I found is a GPO which create a scheduled task. Anybody have a better idea ?
1
vote
1answer
69 views

Bash, what does this redirect command do

I have a script that looks something like this: ruby foo.rb > log.out 2> error.log < /dev/null & In this case, i understand that STDOUT is redirecting to log.out and that 2> is ...
0
votes
1answer
50 views

#! won't make linux run an interpreter

Here's the script: #!/usr/bin/env ruby CODES = {} puts "ok" Under root user everything is fine: # ./test.rb ok When munin's default interpreter is /bin/false nothing is happpening: # su munin ...
0
votes
1answer
302 views

What tools can run scripts on multiple windows servers? [closed]

I'm looking for a tool that can schedule a job (shell script, vbs, powershell) on 100+ standalone Windows servers. I know Altiris can do that, but I think it needs an agent on every server. I prefer ...
0
votes
1answer
61 views

How to tell passwd to use salted passwords?

I am hunting the web on how to change passwords of an existing user using a salted hash. I found that way with adding a non-existing user: ...
1
vote
1answer
219 views

Allow normal user to run PHP script as root using SUDO

How can I allow a normal user on Ubuntu to run php scripts? sudo php /path/to/script/script.php Basically the script needs to be run as root but the users does not have root privileges on their ...
4
votes
4answers
223 views

Disabling ssh as root on Linux boxes and the challenges of writing scripts

It's a common suggestion from security-minded people to disable ssh as root on Linux boxes. My question is this: Let's say you normally write lots of scripts which ssh to a large number of Linux ...
0
votes
3answers
1k views

Local login script to delete folder of currently logged in user

How can I create a login script that will delete the contents of the folder below, each time a user logs off of a PC? (We have a shared PC that about a dozen users use, for a particular program. That ...
0
votes
1answer
191 views

Hyper-V and Windows Server with Powershell/Automated?

So my work is looking into Automating Hyper-V Servers for Test Environments, Basically in the end we want to have a sort of Web/Form interface for selecting a server spin up. Right now it's done ...
2
votes
1answer
76 views

How Can I Source My $Profile From A Powershell Function?

I like to make a lot of changes to my $profile file. After saving a change, I would like to source the file using an "sop" alias. Here's how I hope to accomplish that: set-alias sop Source-Profile ...
4
votes
1answer
788 views

Trying to monitor file/folder changes on the server and send notification. What am I dong wrong?

I am trying to make a script to monitor a directory of the EC2 webserver I am managing. I found inotify and tried to make the following script but upon trying it nothing happened. #!/bin/sh while ...
0
votes
1answer
384 views

How to reference Domain-Admins with icacls?

I need to reference the "Domain-Admins" group in a batch file. The line in question looks like this: icacls "test\folder" /grant mydomain.com\Domain-Admins:F ... and works as expected. But how do ...
2
votes
2answers
898 views

Using API to get info about VMWare datastore

I need to create a report of datastore capacity, provision and usage. What is the best tool to do that? Vcenter API seems more concerned with creating VMs and such. Is this the right tool for the ...
2
votes
3answers
592 views

Bash script: Monitor hotfolder and partial files

I have a customer that upload files through FTP, I made a script that basically monitor the ftp folder and move the file on a production machine. How can I check if the file has been completely ...
0
votes
1answer
651 views

Powershell script to insert SQL Statement with a apostrophe error

I have the following part of a script that takes objects form Exchange and AD and inserts into a MYSQL table. But some of the Full Names variables have a ' like the distribution group PA's. Here's ...
2
votes
3answers
2k views

gpg-agent says agent exists, but gpg says agent doesn't exist?

I'm struggling with some issues while scripting gpg with bash on a Debian 6.0.6 box. I have a script that does a batch of operations and wants to make sure that a gpg-agent is available before it ...
0
votes
2answers
2k views

Linux command to find and delete certain files, but output the result or verbose mode?

So I use these command on my storage server to clean up some junk, but it doesn't produce any output or result. I found the syntax online somewhere and just modified for which files I need it. What ...