tag:blogger.com,1999:blog-85416463441856113082024-02-20T17:03:57.423-08:00Eden NelsonHow do I feel? I feel undefeated.Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-8541646344185611308.post-76355729218112952312013-02-21T12:23:00.004-08:002013-02-21T12:23:44.959-08:00Deploying OpenVPNProblem: When deploying OpenVPN I can use the /S switch to silence the installer but Windows will prompt to trust the driver manufacturer when it attempts to install the TAP interface. I can use a third party tool to turn off Windows drivers signing, or just do the right way.<br />
<br />
Solution: Add the OpenVPN certificate to Trusted Publishers before installing OpenVPN.<br />
<br />
Install OpenVPN on your test box . When prompted check the box for "Always trust content from this publisher"<br />
Start the Certificate Manager snap-in and export the "OpenVPN Technologies Inc." certificate. I used the .cer format.<br />
Use certutil to install the .cer prior to installing OpenVPN.<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">certutil -addstore TrustedPublisher openvpn.cer<br />openvpn-*.*.*.exe /S</span></blockquote>
<br />
References:<br />
<br />
<ul>
<li><a href="http://en.wikipedia.org/wiki/TUN/TAP" rel="nofollow" target="_blank">TUN/TAP Wikipedia</a></li>
<li><a href="http://openvpn.net/" rel="nofollow" target="_blank">OpenVPN</a></li>
<li><a href="http://windows.microsoft.com/en-US/windows-vista/Import-or-export-certificates-and-private-keys" rel="nofollow" target="_blank">Import or export certificates and private keys</a></li>
<li><a href="https://forums.openvpn.net/topic10229.html" rel="nofollow" target="_blank">How to do Silent Installation</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/cc732443(v=ws.10).aspx" rel="nofollow" target="_blank">Certutil Manual</a></li>
</ul>
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-48513311032206269292013-02-20T15:48:00.002-08:002013-02-20T15:48:39.895-08:00Allowing Non-Admin users to add printers OS X clients<blockquote>
</blockquote>
<blockquote>
</blockquote>
<blockquote>
</blockquote>
<blockquote>
</blockquote>
<blockquote>
</blockquote>
Problem: I need to allow non-administrator users add printers to Mac OS X.<br />
<br />
Solution:<br />
<br />
Add the GeneratedUID from the everyone group (<span style="font-family: 'Courier New', Courier, monospace;">ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C)</span> to the NestedGroups attribute of the _lpadmin group.<br />
<span id="goog_211573078"></span><span id="goog_211573079"></span><a href="http://www.blogger.com/"></a><br />
<div>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">dscl . -append /Groups/_lpadmin NestedGroups ABCDEFAB-CDEF-ABCD-EFAB-CDEF0000000C</span> </blockquote>
References:<br />
<ul>
<li><pre class="manpages" style="background-color: white; color: #666666; font-family: Courier, monospace;"><tt style="font-family: Monaco, Courier, monospace; letter-spacing: -0.23px;"><a href="https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dscl.1.html" rel="nofollow" target="_blank">dscl Manual</a></tt></pre>
</li>
</ul>
<br /></div>
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-21481901131243278922013-02-20T15:37:00.003-08:002013-02-20T15:37:44.909-08:00Set Windows Compatibility Mode from the Command Line <div>
Problem: I need to set an executable to compatibility mode to Windows XP SP3.<br />
<br />
Soltuion:</div>
<div>
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">reg.exe Add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Path\To\Executable.exe" /d "WINXPSP3" /f</span></blockquote>
</div>
<div>
References:<br />
<br />
<ul>
<li><a href="http://www.verboon.info/index.php/2011/03/running-an-application-as-administrator-or-in-compatibility-mode/" rel="nofollow" target="_blank">Running an Application as Administrator or in Compatibility Mode</a></li>
</ul>
</div>
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-203313642938686452013-02-20T15:27:00.002-08:002013-02-20T15:27:26.061-08:00Allow Non-Administrator Users Add Printer Drivers Windows 7Problem: I need to Allow non-Administrator users to add print drivers to Windows 7.<br />
Many of the workstations I administrate are located in remote location and end-users or site technicians from other organizations need to install local or network printers on the workstations.<br />
<br />
Solution:<br />
<br />
1. Install Administrative Templates (ADMX) for Windows Server 2008.<br />
1. Apply this registry edit:<br />
<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">Windows Registry Editor Version 5.00</span></blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DriverInstall\Restrictions\AllowUserDeviceClasses]<br />"1"="{49ce6ac8-6f86-11d2-b1e5-0080c72e74a2}"<br />"2"="{4d36e979-e325-11ce-bfc1-08002be10318}"<br />"3"="{4658ee7e-f050-11d1-b6bd-00c04fa372a7}"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint]<br />"Restricted"=dword:00000001<br />"TrustedServers"=dword:00000000<br />"ServerList"=""<br />"InForest"=dword:00000000<br />"NoWarningNoElevationOnInstall"=dword:00000001<br />"UpdatePromptSettings"=dword:00000002</span></blockquote>
<br />
References:<br />
<br />
<ul>
<li><a href="http://technet.microsoft.com/en-us/library/cc725772.aspx" target="_blank">Configure Computer Policy to Allow Non-Administrators to Install Specific Devices</a></li>
<li><a href="http://technet.microsoft.com/en-us/library/cc753269.aspx" target="_blank">Control Printer Driver Installation Security</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ff553426%28VS.85%29.aspx" target="_blank">System-Defined Device Setup Classes Available to Vendors</a></li>
<li><a href="http://www.microsoft.com/en-us/download/details.aspx?id=14355" rel="nofollow" target="_blank">Administrative Templates (ADMX) for Windows Server 2008</a></li>
</ul>
<br />
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-81705117921971071162013-02-20T13:23:00.002-08:002013-02-20T13:24:17.093-08:00Shell Script Find Windows Version and Architecture<div class="tr_bq">
</div>
Problem: I need to find a script to find version and processor architecture windows in a windows shell script.<br />
<div>
<br /></div>
<div>
Soltuion: </div>
<div>
<br /></div>
<div>
Batch/CMD Script<br />
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">:; Find Windows Version and Architecture</span><span style="font-family: Courier New, Courier, monospace;">FOR /F "tokens=*" %%i in ('VER') do SET WinVer=%%i </span><span style="font-family: Courier New, Courier, monospace;">FOR /F "tokens=1-3 delims=]-" %%A IN ("%WinVer%" ) DO ( </span><span style="font-family: Courier New, Courier, monospace;">SET VarString=%%A </span><span style="font-family: Courier New, Courier, monospace;">)</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">FOR /F "tokens=1-9 delims=n" %%A IN ("%VarString%" ) DO ( </span><span style="font-family: Courier New, Courier, monospace;">SET WinVer=%%C</span><span style="font-family: Courier New, Courier, monospace;">)</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">FOR /F "tokens=1-8 delims=.- " %%A IN ("%WinVer%" ) DO (</span><span style="font-family: Courier New, Courier, monospace;">SET WinMajor=%%A</span><span style="font-family: Courier New, Courier, monospace;">SET WinMinor=%%B</span><span style="font-family: Courier New, Courier, monospace;">)</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">:; Set version+archicitecher string. 5.1.x86 is Windows XP x86, 6.1.x86 is Windows 7 x86, & 6.1.AMD64 is Windows 7 x64</span><span style="font-family: Courier New, Courier, monospace;">SET VerArch=%WinMajor%.%WinMinor%.%processor_architecture%</span> </blockquote>
Powershell<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;"># Find processor architecture and Windows version</span><span style="font-family: Courier New, Courier, monospace;">$processorArchitecture = (Get-ItemProperty 'HKLM:\SYSTEM\ControlSet001\Control\Session Manager\Environment').PROCESSOR_ARCHITECTURE</span><span style="font-family: Courier New, Courier, monospace;">$windowsVersion = (Get-WmiObject Win32_OperatingSystem).Version | %{$data = $_.split("."); Write-Output "$($data[0]).$($data[1])"}</span></blockquote>
<br />
<br /></div>
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-53477038700519410372013-02-19T09:31:00.006-08:002013-02-20T13:25:38.573-08:00Deploying Adobe Flash 11 Windows 7 64 bit<div class="tr_bq">
</div>
Problem:<br />
I kept getting an error when deploying Adobe Flash 11.X to my Windows 7 64 bit workstations.<br />
The error "This file does not have a program associated with it for performing this action. ..." Would pop up at the end of the installation and would cause the deployment task to hang until someone click "OK".<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-3CAWjdGqzZ0/USOvp9sB4FI/AAAAAAAAAPk/kxC4u9tRjs0/s1600/flashdeploymenterror.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="90" src="http://4.bp.blogspot.com/-3CAWjdGqzZ0/USOvp9sB4FI/AAAAAAAAAPk/kxC4u9tRjs0/s400/flashdeploymenterror.PNG" width="400" /></a></div>
<br />
Solution/Deployment Task:<br />
Set compatibility to Windows XP SP3 before installing.<br />
<br />
1. Download standalone executables from Adobe.<br />
<blockquote class="tr_bq">
http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_active_x.exe<br />
http://download.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_11_plugin.exe</blockquote>
<br />
2. Check if browsers are running.<br />
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">REM Check if browser is running Exit 1<br />tasklist|find /i "iexplore.exe"<br />IF %ERRORLEVEL%==0 EXIT 1<br />tasklist|find /i "firefox.exe"<br />IF %ERRORLEVEL%==0 EXIT 1<br />tasklist|find /i "chrome.exe"<br />IF %ERRORLEVEL%==0 EXIT 1<br />tasklist|find /i "Safari.exe"<br />IF %ERRORLEVEL%==0 EXIT 1<br />EXIT 0</span></blockquote>
3. Copy install_flash_player_11_plugin.exe, and install_flash_player_11_active_x.exe executables to "C:\Windows\Temp\".<br />
<br />
<div>
4. Set compatibility to Windows XP SP3 for the executables.<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">REM Set compatibility install_flash_player_11_plugin.exe<br />reg.exe Add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\Temp\install_flash_player_11_plugin.exe" /d "WINXPSP3" /f<br />REM Set compatibility install_flash_player_11_active_x.exe<br />reg.exe Add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Windows\Temp\install_flash_player_11_active_x.exe" /d "WINXPSP3" /f</span></blockquote>
5. Execute the installation.<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">REM Install install_flash_player_11_plugin.exe<br />C:\windows\temp\install_flash_player_11_plugin.exe /install<br />REM Install install_flash_player_11_active_x.exe<br />C:\Windows\Temp\install_flash_player_11_active_x.exe /install</span></blockquote>
6. Take out the trash.<br />
<blockquote class="tr_bq">
<span style="font-family: Courier New, Courier, monospace;">REM Delete install_flash_player_11_plugin.exe<br />DEL "C:\windows\temp\install_flash_player_11_plugin.exe"<br />REM Delete install_flash_player_11_active_x.exe<br />DEL "C:\Windows\Temp\install_flash_player_11_active_x.exe"</span> </blockquote>
<br /></div>
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-48377632717540532072009-12-17T11:43:00.001-08:002013-02-20T15:59:31.482-08:00Gmail as default mail client via Registry Edit<div class="tr_bq">
Problem: I need to set Gmail as the default mail client on a windows system without installing a third-party Program.</div>
<br />
Solution:<br />
The fallowing Regestry changes:<br />
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">Windows Registry Editor Version 5.00</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">;Use icon C:\Windows\Web\icons\mail.ico via</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">@="%SystemRoot%\\Web\\icons\\mail.ico"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">; Setup Gmail mailto client.</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\Gmail.Url.Mailto]</span><span style="font-family: Courier New, Courier, monospace;">@="URL:Mail Protocol"</span><span style="font-family: Courier New, Courier, monospace;">"FriendlyTypeName"="Gmail URL"</span><span style="font-family: Courier New, Courier, monospace;">"URL Protocol"=""</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\Gmail.Url.Mailto\DefaultIcon]</span><span style="font-family: Courier New, Courier, monospace;">@="%SystemRoot%\\Web\\icons\\mail.ico"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\Gmail.Url.Mailto\shell\open]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\Gmail.Url.Mailto\shell\open\command]</span><span style="font-family: Courier New, Courier, monospace;">@="rundll32.exe url.dll,FileProtocolHandler http://mail.google.com/a/yourdomain.com/?extsrc=mailto&url=%1"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">; Set Gmail as the default mailto client for the system.</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\mailto]</span><span style="font-family: Courier New, Courier, monospace;">"URL Protocol"=""</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\mailto\DefaultIcon]</span><span style="font-family: Courier New, Courier, monospace;">@="%SystemRoot%\\Web\\icons\\mail.ico"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\mailto\shell]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\mailto\shell\open]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_CLASSES_ROOT\mailto\shell\open\command]</span><span style="font-family: Courier New, Courier, monospace;">@="rundll32.exe url.dll,FileProtocolHandler http://mail.google.com/a/yourdomain.com/?extsrc=mailto&url=%1"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">; Set Gmail as the default mail client for the current user.</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_CURRENT_USER\Software\Clients\Mail]</span><span style="font-family: Courier New, Courier, monospace;">@="Gmail"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">; Set Gmail as the default mail client for the system.</span></blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail]</span><span style="font-family: Courier New, Courier, monospace;">@="Gmail"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">; Add Gmail to your mail client list.</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail]</span><span style="font-family: Courier New, Courier, monospace;">@="Gmail"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Capabilities]</span><span style="font-family: Courier New, Courier, monospace;">@=""</span><span style="font-family: Courier New, Courier, monospace;">"ApplicationDescription"="Gmail"</span><span style="font-family: Courier New, Courier, monospace;">"ApplicationName"="Gmail"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Capabilities\URLAssociations]</span><span style="font-family: Courier New, Courier, monospace;">"mailto"="Gmail.Url.mailto"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\DefaultIcon]</span><span style="font-family: Courier New, Courier, monospace;">@="%SystemRoot%\\Web\\icons\\mail.ico"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Protocols]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Protocols\mailto]</span><span style="font-family: Courier New, Courier, monospace;">"URL Protocol"=""</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Protocols\mailto\shell]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Protocols\mailto\shell\open]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\Protocols\mailto\shell\open\command]</span><span style="font-family: Courier New, Courier, monospace;">@="rundll32.exe url.dll,FileProtocolHandler http://mail.google.com/a/yourdomain.com/?extsrc=mailto&url=%1"</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\shell]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\shell\open]</span><span style="font-family: Courier New, Courier, monospace;"><br /></span><span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Gmail\shell\open\command]</span><span style="font-family: Courier New, Courier, monospace;">@="rundll32.exe url.dll,FileProtocolHandler http://mail.google.com/a/yourdomain.com"</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">;Add Gmail to your default programs list</span> </blockquote>
<blockquote>
<span style="font-family: Courier New, Courier, monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]</span><span style="font-family: Courier New, Courier, monospace;">"Gmail"="Software\\Clients\\Mail\\Gmail\\Capabilities"</span></blockquote>
Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-89593230936481769462008-04-10T07:09:00.000-07:002008-04-10T07:38:05.401-07:00Find the console user on OS XI do allot of OS X packaging, and I one thing that I have been looking for is a way to identify the current user logged into the console (The GUI). I found the answer in a configuration files for SleepWatcher. <a href="http://www.bernhard-baehr.de/">"SleepWatcher ...is a command line tool (daemon) for Mac OS X that monitors sleep, wakeup and idleness of a Mac."</a><br /><blockquote>echo 'show State:/Users/ConsoleUser' | scutil | awk '/kCGSSessionUserNameKey/ { print $3 }'<br /></blockquote>echo 'show State:/Users/ConsoleUser' -- Echo a command to scutil<br />scutil -- Take piped input from echo above.<br />awk '/kCGSSessionUserNameKey/ { print $3 }' -- Find the line kCGSSessionUserNameKey and print 3rd item (The Username).<br />scutil -- Manage system configuration parameters. You can find the <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/scutil.8.html">scutil man page here</a>Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-11722572940634669262008-04-01T15:58:00.000-07:002008-04-10T08:01:32.451-07:00Firefox "already running, but is not responding"Users with network home directories started complaining about Firefox saying it was already in use. I put a fix in place with LHPG.<br />The fix was to remove files named with an IP and port (127.0.0.1:4324 or 10.1.1.1:3453 etc.) as well as a symlink called .parentlock pointed at the IP address files.<br />I then touch a file called temp and created a new .parentlock symlink pointed at the file called temp.<br />Here is the code:<br /><blockquote></blockquote><blockquote>#Fix firefox already running error.<br />eval HOMEPATH=~$USER<br />PROFILES=`ls -1 "$HOMEPATH"/Library/Application\ Support/Firefox/Profiles/`<br />for PROFILENAME in $PROFILES<br />do<br />rm -rf "$HOMEPATH"/Library/Application\ Support/Firefox/Profiles/"$PROFILENAME"/.parentlock<br />rm -rf "$HOMEPATH"/Library/Application\ Support/Firefox/Profiles/"$PROFILENAME"/*.*.*.*<br />done</blockquote>Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-57014597289919302232008-03-25T17:52:00.000-07:002008-03-27T15:31:35.657-07:00PashuaI have been looking for a way to add Mac GUI elements to my shell scripts without have to learn xcode. Here it is: <a href="http://www.bluem.net/downloads/pashua_en/">"Pashua ist a tool for creating native Aqua dialog windows for...shell scripts..."</a><br /><br />Pashua is freeware, not open source, and you are limited to one of each input element. Otherwise I think it is going to serve me quite well.<br />The limitations of Pashua can be overcome by with loops and next buttons.<br />I plan to add this to the bundle of software I install with LHPG. The other two applications I install are <a href="http://web.mac.com/agerson/Site/QuotaMonitorMenu.html">Quota Menu Monitor</a> and <a href="http://www.afp548.com/article.php?story=20050306085715981">Keychain Minder</a>.Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0tag:blogger.com,1999:blog-8541646344185611308.post-86345669844355830782008-03-13T08:25:00.000-07:002008-03-13T09:12:28.026-07:00Add second shortname to OD Users<div style="text-align: left;">Micah Baker, the other day asked me about adding a secondary shortname to OD users.<br /><br />So how do you add a secondary short name? We could use WorkGroup Manger, but I like the command line and automation.<br />So I use dscl the command line directory services utility. See the dscl man page <a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/dscl.1.html">here</a><br /><blockquote>dscl -u <span style="font-style: italic;">(OD-DIR-ADMIN)</span> -P <span style="font-style: italic;">(PASSWORD)</span> /LDAPv3/<span style="font-style: italic;">(ODMASTER-DN)</span> -append Users/<span style="font-style: italic;">(SHORTNAME)</span> uid <span style="font-style: italic;">(SHORTNAME TO ADD)</span><br /><a href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/dscl.1.html"></a></blockquote>Micah had first_last as the username, and wanted to add first.last to all his users.<br />So through a script together.<br /><blockquote><br />#!/bin/bash -<br /># Eden Nelson 3/12/08<br /># add shortname<br /><br />#Please set these vars!!!<br /># OD Master DNS<br />ODMASTER=<br /># OD Dir Admin<br />ODADMIN=<br /># OD Dir Admin Pass<br />ODPASS=<br />#Temp file where usernames are kept<br />TEMPFILE=/tmp/default.tmp<br />#Sleep between operations, keep the script from hammering the ODM<br />SLEEP=3<br /><br />## ##<br /># Script Starts Here #<br />## ##<br /><br />trap "{ rm -f $TEMPFILE ;}" EXIT SIGINT SIGTERM<br /><br />dscl /LDAPv3/"$ODMASTER" -list Users > "$TEMPFILE"<br /><br />cat "$TEMPFILE" | \<br />while read USERNAME<br />do<br /><br />FIRSTNAME=`echo $USERNAME | cut -d'_' -f 1`<br />LASTNAME=`echo $USERNAME | cut -d'_' -f 2`<br /><br />dscl -u "$ODADMIN" -P "$ODPASS" /LDAPv3/"$ODMASTER" -append Users/"$USERNAME" uid "$FIRSTNAME"."$LASTNAME"<br /><br />sleep "$SLEEP"<br /><br />done<br /><br />exit 0</blockquote><br /></div>Eden Nelsonhttp://www.blogger.com/profile/16230045061182848274noreply@blogger.com0