Tag Info

New answers tagged

0

As others have mentioned in the comments, the best way is to get a certificate from your internal certificate server (Active Directory Certificate Services or similar). If the internal certificate authority isn't an option, the next best is to get a certificate from a reputable certificate provider (Verisign, Thawte, etc.). The last option is to create a ...


1

Based on this gist, I've made a concise and clean version: # Prevent sudo timeout sudo -v # ask for sudo password up-front while true; do # Update user's timestamp without running a command sudo -nv; sleep 1m # Exit when the parent process is not running any more. In fact this loop # would be killed anyway after being an orphan(when the parent ...


-1

The following should fix this issue. Set the SQL Server's user AND the SQL Server Agent on both the Share and the folders as Change for the share and Modify for the Security.


0

Expect is based on Tcl language, so you shouldn't use bash 'echo' - you should use 'puts' to print something on the screen: #!/usr/bin/expect -f set device "1.1.1.1" set user "testuser" spawn ssh $user@$device puts $device puts $user And you will got result like this: $ ./test.exp spawn ssh testuser@1.1.1.1 1.1.1.1 testuser


0

The error messages suggests you are running the command with an explicit interpreter, eg: bash ./testexpect.exp This will ignore the "#!" line. Whatever is launching the script needs to just name the file (or explicitly say expect ./testexpect.exp). If your #! line was bad you would have got /usr/bin/expect: bad interpreter: ...


0

#!/bin/bash while read line; do echo $line > /tmp/output.log mail -s 'Event Msg.' 'email@gmail.com' < /tmp/output.log done < <(tail -n0 -F /var/adm/messages)


0

For these of you who needs to pass parameters to the script it should be as follows: ssh user@remotehost "echo `base64 -w0 script.sh` | base64 -d | sudo bash -s <param1> <param2> <paramN>"


0

Ok I resolved my issue! The "find" line stay the same: find . -type f -mtime -200 -fprintf $SCRIPT_DIR/includes.txt "%P\n" And I use the "--files-from" option instead of "--exclude-from" rsync . -e ssh -qrtl --files-from=$SCRIPT_DIR/includes.txt $USER@$DEST_SRV:$DEST_DIR


0

According to man pages, --exclude=PATTERN exclude files matching PATTERN --exclude-from=FILE read exclude patterns from FILE --include=PATTERN don't exclude files matching PATTERN --include-from=FILE read include patterns from FILE The exclusion is made reading pattern from files, and not according to the files names themselves. I ...


-2

set sFolderName=%time: =0% xcopy "%UserProfile%\Pictures\*.jpg" Y:\"%DATE%-%sFolderName:~0,2%h%time:~3,2%m%time:~6,2%s-%random%" /I /C /Y 15.06.2015-03h43m34s-5357 5357-%random%"


0

You can use the -L option for curl to have it follow redirects.



Top 50 recent answers are included