Now I know VB6 is old, but it still works and is easy to quickly write an app, well I thought so until this morning when I needed a simple app that can verify a username and password on my domain. In PHP it is a simple ldap query and the user is verified, trying the same thing in VB6, no chance, it works fine if you are logged on to a domain machine, or there is a way if you are logged on locally to a domain machine, but if your machine is not part of the domain it is a pain in the rear.
After trying for an hour, reading many pages on the web, I finally gave up and went to do something simple (clear the filter in a projector.) Then an idea hit me which works and is very simple.
It goes as follows:
1) find the address of any share on the domain which all users have read access to.
2) In VB6 map the share using supplied credentials.
3) If successful, Congrats the user is verified! unmap the share.
4) If not successful deal with the error.
Finished.
Code as follows:
Dim objnetwork As Object
Set objnetwork = CreateObject("WScript.Network")
On Error Resume Next
objnetwork.MapNetworkDrive "H:", "\\server\share", "false", username.text, password.text
objnetwork.RemoveNetworkDrive "H:"
If Err <> 0 Then
msgbox = "Invalid Username or Password"
Else
'code here for successful logon
End If
End of Code
That is it, no extra declarations no modules, no ldap naming convention, just simple code easy to use with 2 text boxes and a command button.
If you find anything in my blog useful or interesting please just drop me a comment.
Thursday, January 26, 2012
Monday, December 05, 2011
Roland PC 300 on Windows 7
Recently a friend got his hands on a Roland PC 300 midi keyboard, when trying to install it he found no support for windows vista or 7. All support forums seem to suggest it does not work, this is not true.
1) Download the windows XP drivers here.
2) Run the downloaded file, when it prompts for install directory type in c:\tmp you may receive an error saying this program did not install correctly, if so just click cancel.
3) Plug in and turn on the keyboard. Windows should fail to install the drivers please wait for this to happen.
4) Go to your start menu, and right click on Computer then select manage, then click on Device Manager. Right click on the Unknown Device and click Update Driver Software.
5) Select Browse my computer for driver software.
6) Click Let me pick from a list of device drivers on my computer.
7) Make sure Show All Devices is selected and click Next.
8) Click Have Disk....
9) Click Browse, then navigate to c:\tmp\PC300_WinXPDrv201 select RDIF1008.inf and click open then OK.
10) Wait! this took a couple of minutes on my friends machine, but with any luck that's it.
Now go off and right some great music because all this x factor crap in the charts sucks.
1) Download the windows XP drivers here.
2) Run the downloaded file, when it prompts for install directory type in c:\tmp you may receive an error saying this program did not install correctly, if so just click cancel.
3) Plug in and turn on the keyboard. Windows should fail to install the drivers please wait for this to happen.
4) Go to your start menu, and right click on Computer then select manage, then click on Device Manager. Right click on the Unknown Device and click Update Driver Software.
5) Select Browse my computer for driver software.
6) Click Let me pick from a list of device drivers on my computer.
7) Make sure Show All Devices is selected and click Next.
8) Click Have Disk....
9) Click Browse, then navigate to c:\tmp\PC300_WinXPDrv201 select RDIF1008.inf and click open then OK.
10) Wait! this took a couple of minutes on my friends machine, but with any luck that's it.
Now go off and right some great music because all this x factor crap in the charts sucks.
Friday, November 04, 2011
Adobe CS3 Web Standard deployment
Recently I was required to re image our main IT suit, needless to say the images I had were no good so had to build a new one. Image built deployed to 34 machines to discover afterwards that I forgot to put Adobe Web Standard CS3 on the image. Instead of installing it on each machine individually or rebuilding the entire suit again I thought I would just deploy it.
Aim:
Simple, deploy Adobe CS3 with no user interaction.
This seemed so simple to start with, hundreds of guides out there and out of all of them not one worked, got close but always reached the point where I would click on any application and it would request the CD Key.
Final solution:
Decided the best option was to deploy it using our fog server.
Step 1:
Running a virtual machine took a snapshot before the install.
Step 2:
Copied the entire contents of the install DVD into a shared folder.
Step 3:
From the command prompt run setup.exe --record=1, this will allow you to select the applications you want in your install, once it is complete it will output two xml files.
Step 4:
Copy the two created files into the same directory as the setup.exe, (in my case z:\packages\CS3AdobeWS\Adobe CS3\). Rename the files to install.xml and uninstall.xml.
Step 5:
Create the override file (I dont think this is actually doing any thing in my case). Open your favourite txt editer and copy and paste the following:
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Payload>
<Data Key="Serial" protected="0">1234567890123455678901234</Data>
<Data Key="Registration">Suppress</Data>
<Data Key="EULA">Suppress</Data>
<Data Key="Updates">Suppress</Data>
</Payload>
</Configuration>
Change the Serial to your serial number, then save the file into your main payload folder as application.xml.override make sure there is no extention after override.(my main payload folder is z:\packages\CS3AdobeWS\Adobe CS3\payloads\AdobeWebSuiteStandarden_US_Volume\.)
Step 6:
Test the silent install. From thecommand line navigate to the folder containing setup.exe then run setup.exe --mode=silent --deploymentFile="install.xml" (this is case sensative).
Step 7:
Assuming the setup complets with an error 0 everything has gone ok.
In my case this worked but when running any of the apps it prompts for the serial number, to get over this I entered my serial number, skipped the registration and set it to never registe, then the application opened. Close the application then navigate to the folder c:\program files\common files\adobe\adobe pcd\cache then copy the cache.db file into the same directory as setup.exe.
Step 8:
Back in the folder containing setup.exe create a batch file called install.bat and copy and paste the following into it:
setup.exe --mode=silent --deploymentFile="install.xml"
copy cache.db "c:\Program Files\Common Files\Adobe\Adobe PCD\cache\"
Step 9:
This is where I love snapshots, restore your virtual machine back to it was prior to the install (or uninstall the software), then run the install.bat. If al goes well after setup is complete you should be able to run the app with out needing to re enter the serial number (there will be no confirmations of setup finishing you just have to wait or check task manager).
Step 10:
Prepare to deploy via fog or any app that can deploy and run exe files.
I used a free application called SFXMaker available from http://www.isoft-online.com/, once installed run the application and select the Directory tab. In the Directory Path select the directory containg setup.exe. In the File to Run box select the install.bat. In the SFX Path select where you would like to save the new installer. Click Create and wait.
Finish:
Now I have a single exe file i can add as a snappin in fog, then assign to machine or machine group, then under advanced deployment click deploy snappins.
This works for me, hope it might help someone else one day, but as stated before this is mainly the aid my memory.
Aim:
Simple, deploy Adobe CS3 with no user interaction.
This seemed so simple to start with, hundreds of guides out there and out of all of them not one worked, got close but always reached the point where I would click on any application and it would request the CD Key.
Final solution:
Decided the best option was to deploy it using our fog server.
Step 1:
Running a virtual machine took a snapshot before the install.
Step 2:
Copied the entire contents of the install DVD into a shared folder.
Step 3:
From the command prompt run setup.exe --record=1, this will allow you to select the applications you want in your install, once it is complete it will output two xml files.
Step 4:
Copy the two created files into the same directory as the setup.exe, (in my case z:\packages\CS3AdobeWS\Adobe CS3\). Rename the files to install.xml and uninstall.xml.
Step 5:
Create the override file (I dont think this is actually doing any thing in my case). Open your favourite txt editer and copy and paste the following:
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
<Payload>
<Data Key="Serial" protected="0">1234567890123455678901234</Data>
<Data Key="Registration">Suppress</Data>
<Data Key="EULA">Suppress</Data>
<Data Key="Updates">Suppress</Data>
</Payload>
</Configuration>
Change the Serial to your serial number, then save the file into your main payload folder as application.xml.override make sure there is no extention after override.(my main payload folder is z:\packages\CS3AdobeWS\Adobe CS3\payloads\AdobeWebSuiteStandarden_US_Volume\.)
Step 6:
Test the silent install. From thecommand line navigate to the folder containing setup.exe then run setup.exe --mode=silent --deploymentFile="install.xml" (this is case sensative).
Step 7:
Assuming the setup complets with an error 0 everything has gone ok.
In my case this worked but when running any of the apps it prompts for the serial number, to get over this I entered my serial number, skipped the registration and set it to never registe, then the application opened. Close the application then navigate to the folder c:\program files\common files\adobe\adobe pcd\cache then copy the cache.db file into the same directory as setup.exe.
Step 8:
Back in the folder containing setup.exe create a batch file called install.bat and copy and paste the following into it:
setup.exe --mode=silent --deploymentFile="install.xml"
copy cache.db "c:\Program Files\Common Files\Adobe\Adobe PCD\cache\"
Step 9:
This is where I love snapshots, restore your virtual machine back to it was prior to the install (or uninstall the software), then run the install.bat. If al goes well after setup is complete you should be able to run the app with out needing to re enter the serial number (there will be no confirmations of setup finishing you just have to wait or check task manager).
Step 10:
Prepare to deploy via fog or any app that can deploy and run exe files.
I used a free application called SFXMaker available from http://www.isoft-online.com/, once installed run the application and select the Directory tab. In the Directory Path select the directory containg setup.exe. In the File to Run box select the install.bat. In the SFX Path select where you would like to save the new installer. Click Create and wait.
Finish:
Now I have a single exe file i can add as a snappin in fog, then assign to machine or machine group, then under advanced deployment click deploy snappins.
This works for me, hope it might help someone else one day, but as stated before this is mainly the aid my memory.
Wednesday, June 08, 2011
Disable Windows 7 Ease of access via GPO
Tried to find this online but seemed dificult so thought i would paste my way here.
1) Open Group Policy Manager
2) Creat a new Gpo on the Windows 7 machines OU
3) Edit the GPO, Computer Configuration -- Policies -- Windows Settings -- Security Settings.
4) Right click on 'File System' select 'Add File'.
5) Browse to 'c:\windows\system32\Utilman.exe' Click 'OK'
6) In the security tab select 'Administrators' and click 'deny' under full control, the do the same for users.
7) Click OK
8) Your done!
1) Open Group Policy Manager
2) Creat a new Gpo on the Windows 7 machines OU
3) Edit the GPO, Computer Configuration -- Policies -- Windows Settings -- Security Settings.
4) Right click on 'File System' select 'Add File'.
5) Browse to 'c:\windows\system32\Utilman.exe' Click 'OK'
6) In the security tab select 'Administrators' and click 'deny' under full control, the do the same for users.
7) Click OK
8) Your done!
Friday, May 06, 2011
Dell Inspiron 6000 windows 7 upgrade
Anouther staff laptop bought to me today with 'Windows Home Security' reporting viruses all over the place and asking for a credit card number to remove them.
Wipe clean and re install windows I think, currently running XP going to try an upgrade to windows 7.
Dell Inspiron 6000:
more than 4 years old i think.
40 gig ata HDD
Intet Pentium M 1.6 cpu
768mg ram.
Install from DVD with no problems, but when reaching windows found a few devices not install:
Sound Card
Simply downloaded the drivers for XP from dell and installed. Tested OK
Wireless Card:
Right clicked in device manager and told it to update drivers from the internet, took a min but worked fine. Tested OK
Video card:
Intel installed by running windows update. Tested No aero but seems ok.
Windows 7 System rating:
Processor = 3
Memory = 3.9
Graphics = 1.9
Gaming Graphics = 1
Primary Hard Drive = 4.2
Conclusion:
It is possible to Put Windows 7 on a Dell inspiron 6000.
Wipe clean and re install windows I think, currently running XP going to try an upgrade to windows 7.
Dell Inspiron 6000:
more than 4 years old i think.
40 gig ata HDD
Intet Pentium M 1.6 cpu
768mg ram.
Install from DVD with no problems, but when reaching windows found a few devices not install:
Sound Card
Simply downloaded the drivers for XP from dell and installed. Tested OK
Wireless Card:
Right clicked in device manager and told it to update drivers from the internet, took a min but worked fine. Tested OK
Video card:
Intel installed by running windows update. Tested No aero but seems ok.
Windows 7 System rating:
Processor = 3
Memory = 3.9
Graphics = 1.9
Gaming Graphics = 1
Primary Hard Drive = 4.2
Conclusion:
It is possible to Put Windows 7 on a Dell inspiron 6000.
Friday, November 13, 2009
Deploying Windows 7 to a domain
Been a while but thought i would add this to my blog.
Preparing Windows 7 to be imaged out the our vanilla domain. For imaging we are currently using Free Open Ghost which is proving to be a very nice imaging suit, but the AD integration has never worked for us so we have always relied on sysprep which under XP was very simple, and would present us with a nice easy setup screen to change workstation name and then add the machine to the domain. With Win 7 sysprep can do the same process but only seems to be able to add the workstation to the domain with a nearly random machine name which is not very helpful so we have come up with a more creative way which seems to work.
Step 1:
Install Windows 7, install drivers, updates and all packages that are required in the image.
Packages we put in as default: Flash, Shockwave, reader, java, realplayer, office, quicktime, photoshop(site licence), openoffice, and VLC.
Disable the UAC in the user control panel.
Step 2:
Create our setup folder structure.
On a networkshare or memory stick create a folder called "c_drive".
Under "c_dirve" create folders "ProgramData" and "Windows".
Under "c_drive\ProgramData" create "Microsoft".
Under "c_drive\ProgramData\Microsoft" create "Windows".
Under "c_drive\ProgramData\Microsoft\Windows" create "Start Menu".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu" create "Programs".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs" create "Startup".
Under "C_drive\Windows" create "System32".
Under "C_drive\Windows\System32" create "Sysprep".
Now we have our folder structure we start to populate it with the files required.
Step 3:
Prepare a unattend.xml.
This file is used by sysprep to minimize the amount of information that needs to be setup after imaging, such as region, timezone, agrement.
To create this file we have used a free microsoft product called "Microsoft Windows AIK" installed on our Win 7 machine.
Insert a windows 7 DVD then run "Windows System Image Manager".
In the "Windows Image" right click and select new image, browse to DVD:\sources and select "install_Windows7 PROFESSIONAL.clg".
In the "Answer File" section right click and create a new answer file.
In the "Windows Image" section under the components find x86_Microsoft-Windows-Inernational-Core(version)_neutral and right click add to oobeSystem.
Under the components find x86_Microsoft-Windows-Shell-Setup_(version)_neutral and right click add to oobeSystem.
Back into the "Answer File" location expand components - oobeSystem, and select x86_Microsoft-Windows-International-Core.
Set everything under the settings on the right to "en-UK".
Select x86_Microsoft-Windows-Shell-Setup in the Answer file. expand to AutoLogon and set Enabled to true, LogonCount to 1, and username to administrator.
expand password and set value to the local administrators password.
Below AutoLogon select OOBE and set HideEULAPage to true, HideWirelessSetup to true, NetworkLocation to Work, and ProtectYourPC to 1.
Below OOBE select UserAccounts and Set the AdministratorsPassword to the same as above.
We now need to create a local user to stop the menu showing during setup, this user will not be required for any other purpose so the password can be set to a long complicated password which we will never need to use.
Right click on LocalAccounts and insert new local account, give the new account a description, display name, group = administrators, any name you like that does not already exists on the machine. Expand the local account and select password and set it to a long random string of chars/numbers/upper and lower-case characters.
Click File - Save Answer File as.... and save it in the previously created folder structure as: C_drive\Windows\System32\Sysprep\unattend.xml
Step 4:
Crate a new file in our file structure C_drive\Windows\System32\Sysprep\addtdom.ps1
Edit the file and add the following on one line changing the domain name to your domain name, and add2dom to the account you use to add machines to the domain, and password to the password of that account.
$credential = New-Object System.Management.Automation.PsCredential("DomainName\add2dom", (ConvertTo-SecureString "password" -AsPlainText -Force))
Then add the line replacing DomainName.local to your domain name:
Add-Computer -DomainName "DomainName.local" -Credential $credential
Save and exit.
Step 5:
Crate a new file in our file structure C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat
Edit the file and add the following lines:
powershell Set-ExecutionPolicy unrestricted
powershell c:\windows\system32\sysprep\addtdom.ps1
shutdown -r -t 30
del "c:\setup.bat"
del "c:\Windows\System32\sysprep\unattend.xml"
del "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat"
Save and exit the file.
Step 6:
Create a new file in our file structure c_drive\setup.bat
and add the line:
c:\windows\system32\sysprep\sysprep.exe /oobe /shutdown /unattend:c:\windows\system32\sysprep\unattend.xml
Save and exit.
Step 7:
You now have all the necessary files in place and are ready for gathering the image.
Copy the contents of you created file structure onto the root of c:\ then run c:\setup.bat
Your machine will now sysprep then shutdown, Now is the time to gather the image.
When your workstation next boots all it will prompt you for is a machine name then it will add itself to the domain reset a few times then be ready to use.
End
Just to remind you I mainly only write this for my own memory but welcome any use and comments.
Preparing Windows 7 to be imaged out the our vanilla domain. For imaging we are currently using Free Open Ghost which is proving to be a very nice imaging suit, but the AD integration has never worked for us so we have always relied on sysprep which under XP was very simple, and would present us with a nice easy setup screen to change workstation name and then add the machine to the domain. With Win 7 sysprep can do the same process but only seems to be able to add the workstation to the domain with a nearly random machine name which is not very helpful so we have come up with a more creative way which seems to work.
Step 1:
Install Windows 7, install drivers, updates and all packages that are required in the image.
Packages we put in as default: Flash, Shockwave, reader, java, realplayer, office, quicktime, photoshop(site licence), openoffice, and VLC.
Disable the UAC in the user control panel.
Step 2:
Create our setup folder structure.
On a networkshare or memory stick create a folder called "c_drive".
Under "c_dirve" create folders "ProgramData" and "Windows".
Under "c_drive\ProgramData" create "Microsoft".
Under "c_drive\ProgramData\Microsoft" create "Windows".
Under "c_drive\ProgramData\Microsoft\Windows" create "Start Menu".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu" create "Programs".
Under "C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs" create "Startup".
Under "C_drive\Windows" create "System32".
Under "C_drive\Windows\System32" create "Sysprep".
Now we have our folder structure we start to populate it with the files required.
Step 3:
Prepare a unattend.xml.
This file is used by sysprep to minimize the amount of information that needs to be setup after imaging, such as region, timezone, agrement.
To create this file we have used a free microsoft product called "Microsoft Windows AIK" installed on our Win 7 machine.
Insert a windows 7 DVD then run "Windows System Image Manager".
In the "Windows Image" right click and select new image, browse to DVD:\sources and select "install_Windows7 PROFESSIONAL.clg".
In the "Answer File" section right click and create a new answer file.
In the "Windows Image" section under the components find x86_Microsoft-Windows-Inernational-Core(version)_neutral and right click add to oobeSystem.
Under the components find x86_Microsoft-Windows-Shell-Setup_(version)_neutral and right click add to oobeSystem.
Back into the "Answer File" location expand components - oobeSystem, and select x86_Microsoft-Windows-International-Core.
Set everything under the settings on the right to "en-UK".
Select x86_Microsoft-Windows-Shell-Setup in the Answer file. expand to AutoLogon and set Enabled to true, LogonCount to 1, and username to administrator.
expand password and set value to the local administrators password.
Below AutoLogon select OOBE and set HideEULAPage to true, HideWirelessSetup to true, NetworkLocation to Work, and ProtectYourPC to 1.
Below OOBE select UserAccounts and Set the AdministratorsPassword to the same as above.
We now need to create a local user to stop the menu showing during setup, this user will not be required for any other purpose so the password can be set to a long complicated password which we will never need to use.
Right click on LocalAccounts and insert new local account, give the new account a description, display name, group = administrators, any name you like that does not already exists on the machine. Expand the local account and select password and set it to a long random string of chars/numbers/upper and lower-case characters.
Click File - Save Answer File as.... and save it in the previously created folder structure as: C_drive\Windows\System32\Sysprep\unattend.xml
Step 4:
Crate a new file in our file structure C_drive\Windows\System32\Sysprep\addtdom.ps1
Edit the file and add the following on one line changing the domain name to your domain name, and add2dom to the account you use to add machines to the domain, and password to the password of that account.
$credential = New-Object System.Management.Automation.PsCredential("DomainName\add2dom", (ConvertTo-SecureString "password" -AsPlainText -Force))
Then add the line replacing DomainName.local to your domain name:
Add-Computer -DomainName "DomainName.local" -Credential $credential
Save and exit.
Step 5:
Crate a new file in our file structure C_drive\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat
Edit the file and add the following lines:
powershell Set-ExecutionPolicy unrestricted
powershell c:\windows\system32\sysprep\addtdom.ps1
shutdown -r -t 30
del "c:\setup.bat"
del "c:\Windows\System32\sysprep\unattend.xml"
del "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\runonce.bat"
Save and exit the file.
Step 6:
Create a new file in our file structure c_drive\setup.bat
and add the line:
c:\windows\system32\sysprep\sysprep.exe /oobe /shutdown /unattend:c:\windows\system32\sysprep\unattend.xml
Save and exit.
Step 7:
You now have all the necessary files in place and are ready for gathering the image.
Copy the contents of you created file structure onto the root of c:\ then run c:\setup.bat
Your machine will now sysprep then shutdown, Now is the time to gather the image.
When your workstation next boots all it will prompt you for is a machine name then it will add itself to the domain reset a few times then be ready to use.
End
Just to remind you I mainly only write this for my own memory but welcome any use and comments.
Friday, March 06, 2009
DanceEjay For Schools Network Edition
Ok, Done this before but since the update to server 2008 my old way failed, so i have deleted the blog and started again.
1) Run a wininstall scan on clean workstation.
2) Perform Full install of Dance EJ, and allow it to run.
3) Run after scan from wininstall.
Right got the MSI to install it now, but still fully aware that is i deploy this MSI and get a user to run it without 'Admin rights', they will recieve a Currupt instalation message.
After running the good old classic tool filemon (updated a lot since i last used it), Noticed the only error seemed to be when a program called reg_start tried to created a TMP file in the windows directory.
I have now enabled write access to the top level windows directory, (no sub directorys) and tested the software again, and it worked.
4) Moved built MSI to Applications share on server.
5) Created a New GPO in Active Directory called 'Software-EjayFS-Music'.
6) In the GPO under 'Computer Configuration - Policies - Software Settings - Software installation' selected 'New Package' and selected the MSI using the full unc path (eg \\server-name\application-share\music\ejay\ejay.msi).
7) In the Same GPO under 'Computer Configuration - Policies - Windows Settings - Security Settings - File System' right click and add file. select the 'c:\windows' directory click 'ok'.
8) Give users 'Write' access, (should now have read and execute, list folder contents, read, and write). Click OK
9) Next make sure 'Configure this file or folder then' is selected and 'Propagate inheritable permissions to all subfolders and files' is selected then click 'ok'.
10) Now simply close the gpo and deploy it to your test workstation and hopefully all should work.
A word of causion THIS PROCCESS DOES GIVE STANDARD USERS WRITE ACCESS TO THE ROOT OF C:\WINDOWS, This is not something i want to give users but until a better solution comes about it is all i have got.
1) Run a wininstall scan on clean workstation.
2) Perform Full install of Dance EJ, and allow it to run.
3) Run after scan from wininstall.
Right got the MSI to install it now, but still fully aware that is i deploy this MSI and get a user to run it without 'Admin rights', they will recieve a Currupt instalation message.
After running the good old classic tool filemon (updated a lot since i last used it), Noticed the only error seemed to be when a program called reg_start tried to created a TMP file in the windows directory.
I have now enabled write access to the top level windows directory, (no sub directorys) and tested the software again, and it worked.
4) Moved built MSI to Applications share on server.
5) Created a New GPO in Active Directory called 'Software-EjayFS-Music'.
6) In the GPO under 'Computer Configuration - Policies - Software Settings - Software installation' selected 'New Package' and selected the MSI using the full unc path (eg \\server-name\application-share\music\ejay\ejay.msi).
7) In the Same GPO under 'Computer Configuration - Policies - Windows Settings - Security Settings - File System' right click and add file. select the 'c:\windows' directory click 'ok'.
8) Give users 'Write' access, (should now have read and execute, list folder contents, read, and write). Click OK
9) Next make sure 'Configure this file or folder then' is selected and 'Propagate inheritable permissions to all subfolders and files' is selected then click 'ok'.
10) Now simply close the gpo and deploy it to your test workstation and hopefully all should work.
A word of causion THIS PROCCESS DOES GIVE STANDARD USERS WRITE ACCESS TO THE ROOT OF C:\WINDOWS, This is not something i want to give users but until a better solution comes about it is all i have got.
Tuesday, March 25, 2008
Mounting network shares from a web browser.
Continuing my project of a php network file manager.
First problem i have come across is simply that you need to have super user rights to mount network shares.
The solution,
1) try and find out the username the web service uses when sending commands, this is managed by using the command:
?php system("whoami"); ?
this simply outputted the username "www-data" to the web browser.
2)allow user "www-data" to use the mount and umount command without prompting for a password.
This is done by making changes to the sudoers file. (WARNING FIRST TIME I DID THIS I MADE A MISTAKE AND SCREWED MY LINUX INSTALL)
- from the terminal run "sudo visudo -f /etc/sudoers" (you must use visudo to edit)
- under the user section add these lines:
"www-data ALL=NOPASSWD: /bin/mount"
"www-data ALL=NOPASSWD: /bin/umount"
- to save hold Ctrl and tap o, then make sure it saves as just "sudoers" Ctrl x to exit.
3) adding the mount command to the php page
(FOR MOUNT TO WORK YOU NEED TO INSTALL SMBFS "sudo apt-get install smbfs")
?php
system("sudo mount -t smbfs //server/share /folder-to-mount-to -o username=username,password=password"); ?
4) running the page will now mount the share to the folder, this is very basic, but a good place to start, i will move on now to replacing this string with variables, and run with the idea of putting this command in the header and putting a umount in the footer.
First problem i have come across is simply that you need to have super user rights to mount network shares.
The solution,
1) try and find out the username the web service uses when sending commands, this is managed by using the command:
?php system("whoami"); ?
this simply outputted the username "www-data" to the web browser.
2)allow user "www-data" to use the mount and umount command without prompting for a password.
This is done by making changes to the sudoers file. (WARNING FIRST TIME I DID THIS I MADE A MISTAKE AND SCREWED MY LINUX INSTALL)
- from the terminal run "sudo visudo -f /etc/sudoers" (you must use visudo to edit)
- under the user section add these lines:
"www-data ALL=NOPASSWD: /bin/mount"
"www-data ALL=NOPASSWD: /bin/umount"
- to save hold Ctrl and tap o, then make sure it saves as just "sudoers" Ctrl x to exit.
3) adding the mount command to the php page
(FOR MOUNT TO WORK YOU NEED TO INSTALL SMBFS "sudo apt-get install smbfs")
?php
system("sudo mount -t smbfs //server/share /folder-to-mount-to -o username=username,password=password"); ?
4) running the page will now mount the share to the folder, this is very basic, but a good place to start, i will move on now to replacing this string with variables, and run with the idea of putting this command in the header and putting a umount in the footer.
I'm Back
Been a while since i posted anything, not because i forgot about this blog but mainly because i have been doing nothing interesting for a long time. Time to change!!!!
Friday, October 05, 2007
HP Compaq nx7300
Had my replacment laptop today!
Now running a HP Cmpaq nx7300, 1 gig of ram, 80 gig hdd, Celeron CPU 1.86 g, shipped with Vista Basic.
First things first GOOD BYE VISTA, hello Ubuntu.
Machine runs nice and fast, but did have a problem getting wireless to work straight away, but after finding/downloading the following files into /lib/firmware/, then restarting all worked ok
Now running a HP Cmpaq nx7300, 1 gig of ram, 80 gig hdd, Celeron CPU 1.86 g, shipped with Vista Basic.
First things first GOOD BYE VISTA, hello Ubuntu.
Machine runs nice and fast, but did have a problem getting wireless to work straight away, but after finding/downloading the following files into /lib/firmware/, then restarting all worked ok
- bcm43xx_initval05.fw
- bcm43xx_initval06.fw
- bcm43xx_initval07.fw
- bcm43xx_initval08.fw
- bcm43xx_initval09.fw
- bcm43xx_initval10.fw
- bcm43xx_microcode5.fw
- bcm43xx_pcm5.fw
will update here if i have any other probs.
Sunday, August 19, 2007
KWorld VS-DVBT 355U-G Ubuntu
Having installed ubuntu i would like to try out the media side of things so i thought i would just connect my freeview dvb stick, this did nothing, so after a while searching the net i think i have managed to put together the solution.
1) Run the terminal (Applications, Accessories, Terminal)
2) Type 'sudo apt-get install mercurial linux-headers-$(uname -r) build-essential' press enter
3) Type 'hg clone http://mcentral.de/hg/~mrec/v4l-dvb' press enter
4) Type 'cd v4l-dvb' press enter
5) Type 'make' press enter
6) Type 'sudo make install' press enter
7) Reset the machine
Now just the testing phase!
1) Run the terminal (Applications, Accessories, Terminal)
2) Type 'sudo apt-get install mercurial linux-headers-$(uname -r) build-essential' press enter
3) Type 'hg clone http://mcentral.de/hg/~mrec/v4l-dvb' press enter
4) Type 'cd v4l-dvb' press enter
5) Type 'make' press enter
6) Type 'sudo make install' press enter
7) Reset the machine
Now just the testing phase!
Saturday, August 18, 2007
Thursday, July 06, 2006
Exchange Week lost count
Server hardware has been here for about a week now, i have already setit up as a domain controller with exchange installed on it with no problems.
After a little discusion with my assistant have decided it would be a good idea to take this opertunaty to rebuild the entire network again, so have set the new server up as the PDC with the same name as the exsisting PDC.
After a little discusion with my assistant have decided it would be a good idea to take this opertunaty to rebuild the entire network again, so have set the new server up as the PDC with the same name as the exsisting PDC.
Wednesday, June 07, 2006
Exchange week 5.2
He Shoots He Scores
Meeting was a success everyone gave me the go ahead to order hardware and get the proccess started. Looking at quotes now for hardware, Server + Switch + UPS + Backup.
For backup i have decieded to look at network storage sata hdds, they look pretty good.
Meeting was a success everyone gave me the go ahead to order hardware and get the proccess started. Looking at quotes now for hardware, Server + Switch + UPS + Backup.
For backup i have decieded to look at network storage sata hdds, they look pretty good.
Tuesday, June 06, 2006
Exchange Week 5.1
Time has come. 1 hour left before i have to go and sell the product to the leadership team. If all goes well we should get the go ahead and the money to order our new server plus some extra backup devices.
Thursday, May 25, 2006
Exchange 4.1
The time has been set, Tuesday 6th June at 3:30, need to sell exchange to the entire leadership team.
Great will need to iron my shirt for a change, and possibly put a tie on instead of leaving it on my desk every day.
Have decieded to cut down on the need of an extra workstation by installing a virtual workstation onto the server, encouted errors due to no network connection but a quick google search on the images told me how to create a loop back cable.
Setup four users using "random" names: Bart, Lisa, Homer, and Marge each with there own mail box.
Ran a test sending tasks to different users: successful
Looking at ways of sharing a calandar. seems to be two different ways either share a calander of a user, so for a whole school calandar create a user called whole school calandar. This would mean that someone would have to keep checking a different mail box.
The other way is to create a public folder and create a calandar in there. this seems to be the best way, will look into this more.
Great will need to iron my shirt for a change, and possibly put a tie on instead of leaving it on my desk every day.
Have decieded to cut down on the need of an extra workstation by installing a virtual workstation onto the server, encouted errors due to no network connection but a quick google search on the images told me how to create a loop back cable.
Setup four users using "random" names: Bart, Lisa, Homer, and Marge each with there own mail box.
Ran a test sending tasks to different users: successful
Looking at ways of sharing a calandar. seems to be two different ways either share a calander of a user, so for a whole school calandar create a user called whole school calandar. This would mean that someone would have to keep checking a different mail box.
The other way is to create a public folder and create a calandar in there. this seems to be the best way, will look into this more.
Wednesday, May 10, 2006
Exchange 3.3
The Verdict
Mandatory profiles do not work with Outlook.
Looking at the facts moving the application data to the home dir speeds up the logon procces a bit but not needing to be copied to the local drive at logon, so possibly if i switch everybody back to roaming profiles it would work, but printers will become an issue again.
So....
attempt to rewrite my printer program to remove network printers at start up then install chosen printers.
Mandatory profiles do not work with Outlook.
Looking at the facts moving the application data to the home dir speeds up the logon procces a bit but not needing to be copied to the local drive at logon, so possibly if i switch everybody back to roaming profiles it would work, but printers will become an issue again.
So....
attempt to rewrite my printer program to remove network printers at start up then install chosen printers.
Tuesday, May 09, 2006
Exchange 3.1
Had anouther look at the profile problem this morning.
Started by removing everything to do with profiles so far.
Redirected the application data folder to the home directory, now this sounds simple but just try it. To start with enter the gpo then goto User Config - Windows Settings - Application Data and bring up the properties, and change the first setting to 'Basic' then in the target folder location you have to use 'Create a folder for each user under the root path' if you do not it just changes back after you click 'OK', in the root path enter the unc path.
Started by removing everything to do with profiles so far.
Redirected the application data folder to the home directory, now this sounds simple but just try it. To start with enter the gpo then goto User Config - Windows Settings - Application Data and bring up the properties, and change the first setting to 'Basic' then in the target folder location you have to use 'Create a folder for each user under the root path' if you do not it just changes back after you click 'OK', in the root path enter the unc path.
Monday, May 08, 2006
Exchange Week 3
Not a lot done on exchange over the last few days, still having problems using mandatory profiles, but simply alowing admin users to use it in outlook and students to use it in explorer may bypass this problem.
Tuesday, May 02, 2006
Exchange week 2.2
Converted my users to mandatory profiles today to discover that this just screws everything up.
Have looked at a couple of web sites that claim to have this working but it is still causeing me problems. i will let you know when i have an answer.
Teaching myself outlook: It all looks very basic, there are a few sections that just seem to be pointless and some that look very complicated, i can see that restricting students may be a problem.
Have looked at a couple of web sites that claim to have this working but it is still causeing me problems. i will let you know when i have an answer.
Teaching myself outlook: It all looks very basic, there are a few sections that just seem to be pointless and some that look very complicated, i can see that restricting students may be a problem.
Subscribe to:
Posts (Atom)