SBS 2003: Mapping network drives for users at logon
Sunday, February 7th, 2010Some time ago I installed an SBS 2003 server to act as Domain Controller/Exchange server/File and Print Server etc. The main aim was to centralise all the different locations of my data and printing needs into one manageable system. Although I am more than capable of mapping a drive manually and navigating to shared folders, I wanted a solution that did it all when I log onto my computers at home. Here is brief overview of what logon scripts do and how to get them working for you.
Everytime a user logs onto a windows domain a batch file is run from the NETLOGON folder on the domain controller, in this case, Windows Small Business Server 2003. The primary function of this file is to install any application that has been pushed to the client workstations. I wanted to amend this so that printers and shares were automatically allocated depending on the user who logs in.
For this example our server is called SBS, the user will be “ANother” and the folder we want to share is “Applications”. The first thing you need to do is find the logon script: it will be located here – “C:\WINDOWS\SYSVOL\sysvol\<domain name>\scripts\SBS_LOGIN_SCRIPT.bat”
The logon script will contain the line needed to add applications to users computers instead of manually installing them. For the sake of my setup I deleted this line as I do not need it but the line looks like this: “\\sbs\clients\setup\setup.exe /s sbs“. Please leave this line in if you plan to deploy software to workstations from the server.
Open up the SBS_LOGIN_SCRIPT.bat file (right click and select “edit”). What we are going to do is create a shortcut in this file to a file that matches the username of the logged on user. So add this line to the login script batch file, save it and close it. “\\sbs\netlogon\%username%.bat“
What this line does is look within the scripts folder for any batch files matching the username of the logged on user. So if Tom was to log on with his name “another” the login script will look for another.bat.
Now we can create out user files so we can map drives and printers specifically for them. I will cover printers in another post. Create a new file in the scripts folder and call it “another.bat” and open this up ready to edit. We need to add the applications share to Toms logon script.
In Toms file add the line: NET USE F \\sbs\applications
Save and close this file.
Now whenever Tom logs onto his computer the applications share will automatically be added as a network drive. All he has to do is go to “My Computer” and it will be listed for him to access. Of course we can go further than this and add shortcuts to the desktop and other mapped drives as well as printers and installs. I will not cover those here but check back for my update on adding default printers to a users account.
Everytime you add a new user to your domain, don’t forget to add a new batch file for that user and add in all the drives you want to map for them.
If you have any questions, comments and any other info just let me know.
Sharepoint Services not configured for use with ASP.NET 2.xxxxx
Thursday, November 26th, 2009As I use my sharepoint system very rarely I had not noticed that there was an error when trying to access http://companyweb. I have an SBS 2003 server that deals with all my mail etc and recent updates seem to have killed off the sharepoint service.
This is the full error that I get
This Windows SharePoint Services virtual server has not been configured for use with ASP.NET 2.0.50727.3603. For more information, please refer to Knowledge Base article 894903 at http://go.microsoft.com/fwlink/?LinkId=42660.
The article the link refers to is a good starting point, but it fails to actually tell you where the stsadm file is, and running the command as microsoft have put it will just result in a file not found error. I had to go hunting for the file myself, and as the search function failed it was a manual hunt.
I finally found the file, so here is the command that actually works
“c:\Program Files\Common Files\Microsoft Shared\web server extensions\60\BIN\stsadm” -o upgrade -forceupgrade -url http://companyweb
That command obviously depends on the virtual sharepoint site actually being called companyweb. If you have changed it you will need to amend the end of the command.
Once it finished running I was asked to login to the sharepoint service on the server itself. After trying multiple combinations of usernames/domains and passwords it failed. I jumped onto my desktop and logged into sharepoint without issue and all is now working again. My guess (as I have not fully investigated it and won’t be on my home system as it’s not really needed) is that the DNS is either out or logging into sharepoint on the server itself is just not cricket.
Customising Firefox 3
Tuesday, May 13th, 2008If, like me you have recently upgraded to Firefox 3 and you have spent years using Tabbed Browser Preferences to manage your tabs position in the window, colour, order etc etc, then you, like me, are quite disappointed with the lack of configuration the tab bar has within Firefox 3.
Developer Comments: This extension is an enhancement for the basic tab controls provided in Firefox 1.0. It replaces the existing user interface with a new, more visible user interface, and also includes UI for other hidden features that are part of the browser, as well as features provided explicitly by the extension.
Tabbrowser Prefs is not currently available for Firefox 3 on Windows or Linux, which left me feeling frustrated. I would love to have felt annoyed, but can you really be annoyed when the info to build your very own plugin is out there?
I decided I had to do something. I had to have my tab bar on the bottom of the window at least. So, I went off and researched it.
After about 5 minutes I found out that the main interface to Firefox is controlled entirely by CSS. This is perfect. I located the CSS style sheet, googl’d some more and found the CSS variables needed to modify the interface settings. So now I am going to share it with everyone of you.
Ubuntu Hardy Heron Version
Open up nautilus and show hidden files. then navigate to:
- /home/.mozilla/firefox/your.profile/chrome
By default userChrome.css fie does not exist, so you need to create it before you can start adding your preferences. There’s actually an example file that exists by default, called userChrome-example.css. You can just rename that file by removing the -example part. Then open this file in leaf/mouse pad or any other text editor and add the following code and save it.
- /* Display the tabbar at the bottom */ #content > tabbox { -moz-box-direction: reverse; }
Windows XP/Vista Versions
Open up My Computer or File Explorer and show hidden files. then navigate to:
- C:\Documents andSettings\[UserName]\ApplicationData\Mozilla\Firefox\Profiles\your.proifile\chrome
By default userChrome.css fie does not exist, so you need to create it before you can start adding your preferences. There’s actually an example file that exists by default, called userChrome-example.css. You can just rename that file by removing the -example part. Then open this file in notepad or any other text editor and add the following code and save it.
- /* Display the tabbar at the bottom */ #content > tabbox { -moz-box-direction: reverse; }
How to: Install Ubuntu packages with HTML link
Saturday, March 15th, 2008Apturl allows you to install Ubuntu packages from a website using the following syntax: apt:packagename (where packagename is the name of the package you wish to install
For example, I wanted to install a new pixel ruler (link courtesy of Borntwisted) called KRuler. If I was to install this directly from my web browser I would need to write the link in my HTML like so:
- <a href=”apt:kruler”>Click here to install Kruler</a>
This would then give me the following link:
If you click the link (providing you are using Ubuntu as your Operating System) you will get the follwoing:
Once you click ok, and type in your admin password you will get the download screen as it downloads the package ready for installation
And then the obligatory install screen will be shown:
This is a perfect tool for bloggers, how to’ers and manual writers writing for Ubuntu installs etc. I know I will be using it in all my future blogs and how to’s in the future.
Go ahead, give it a shot
How to: Increase ext3 and reiserfs performance
Tuesday, March 11th, 2008NOTE: This How To: is for Ubuntu Linux (all versions) but should work on any version of Linux that supports the ext3 filesystem and reiserfs filesystem. This How To: is offered as is and I cannot take responsibility for any problems you suffer as a result of modifying yoru core system files.
ext3 Filesystem
The ext3 or third extended filesystem is a journalled file system that is commonly used by the Linux operating system. It is the default file system for many popular Linux distributions
Features of ext3 File System
The ext3 file system is essentially an enhanced version of the ext2 file system. These improvements provide the following advantages
Availability
After an unexpected power failure or system crash, each mounted ext2 file system on the machine must be checked for consistency by the e2fsck program. This is a time-consuming process that can delay system boot time significantly, especially with large volumes containing a large number of files. During this time, any data on the volumes is unreachable.
The journaling provided by the ext3 file system means that this sort of file system check is no longer necessary after an unclean system shutdown. The only time a consistency check occurs using ext3 is in certain rare hardware failure cases, such as hard drive failures. The time to recover an ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the journal used to maintain consistency. The default journal size takes about a second to recover, depending on the speed of the hardware.
Data Integrity
The ext3 file system provides stronger data integrity in the event that an unclean system shutdown occurs. The ext3 file system allows you to choose the type and level of protection that your data receives. By default, Most Linux Distributions configures ext3 volumes to keep a high level of data consistency with regard to the state of the file system.
Speed
Despite writing some data more than once, ext3 has a higher throughput in most cases than ext2 because ext3’s journaling optimizes hard drive head motion. You can choose from three journaling modes to optimize speed, but doing so means trade offs in regards to data integrity.
Easy Transition
It is easy to change from ext2 to ext3 and gain the benefits of a robust journaling file system without reformatting.
ReiserFS
ReiserFS is a general-purpose, journaled computer file system designed and implemented by a team at Namesys led by Hans Reiser.ReiserFS is currently supported on Linux and may be included in other operating systems in the future. Introduced in version 2.4.1 of the Linux kernel, it was the first journaling file system to be included in the standard kernel.
ReiserFS Features
ReiserFS has fast journaling, which means that you don’t spend your life waiting for fsck every time your laptop battery dies, or the UPS for your mission critical server gets its batteries disconnected accidentally by the UPS company’s service crew, or your kernel was not as ready for prime time as you hoped, or the silly thing decides you mounted it too many times today.
ReiserFS is based on fast balanced trees. Balanced trees are more robust in their performance, and are a more sophisticated algorithmic foundation for a file system. When we started our project, there was a consensus in the industry that balanced trees were too slow for file system usage patterns. We proved that if you just do them right they are better–take a look at the benchmarks. We have fewer worst case performance scenarios than other file systems and generally better overall performance. If you put 100,000 files in one directory, we think its fine; many other file systems try to tell you that you are wrong to want to do it.
ReiserFS is more space efficient. If you write 100 byte files, we pack many of them into one block. Other file systems put each of them into their own block. We don’t have fixed space allocation for inodes. That saves 6% of your disk.
Ext3 & ReiserFS has three kinds of journaling methods
1) Journal Data Writeback
2) Journal Data Ordered
3) Journal Data
By default the the 2nd method is used.To speed things up we will make it use method 1. The price to pay is that it may allow old data to appear in files after a crash and journal recovery.
How to make ext3 or reiserfs use journal data writeback
First you need to take a back up of the fstab file using the following command
- sudo cp /etc/fstab /etc/fstab.orig
Edit the /etc/fstab file using the following command
- sudo gedit /etc/fstab
Add the thing marked in bold to your fstab root mount line.
- /dev/hda1 / ext3 defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1
Save that file and exit
You need to take a Grubmenu file backup using the following command
- sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.orig
Now you need to edit the grub menu list file using the following command
- sudo vi /boot/grub/menu.lst
look for the following two lines
- # defoptions=quiet splash
- # altoptions=(recovery mode) single
change to
- # defoptions=quiet splash rootflags=data=writeback
- # altoptions=(recovery mode) single rootflags=data=writeback
Save that file and exit
Now you need to update the grub using the following command
- sudo update-grub
the added flags will automatically be added to the kernel line and stay there in case of kernel update
Changes to Ext3 FileSystem Only
Note:- tune2fs only works for ext3. Reiserfs can’t change the journal method
Before rebooting change the filesystem manually to writeback using the following command
- sudo tune2fs -o journal_data_writeback /dev/hda1
Check that it is running or not using the following command
- sudo tune2fs -l /dev/hda1
Remove update of access time for files
Having the modified time change you can understand but having the system updating the access time every time a file is accessed is not to my liking. According to the manual the only thing that might happen if you turn this off is that when compiling certain things the make might need that info.
To change this do the following
- sudo vi /etc/fstab
add the following marked in bold
- /dev/hda1 / ext3 defaults,errors=remount-ro,noatime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1
Now reboot and enjoy a much faster system
Search
Previous Posts
- Ubuntu Install Screenshots Posted by Soddengecko February 7, 2010
- HOW TO: Move Ubuntu Home folder to another drive Posted by Soddengecko February 7, 2010
- HOW TO: Random password generator on Ubuntu and other Linux systems Posted by Soddengecko February 7, 2010
- HOW TO: Perform system backup in Ubuntu – Part 2 – Restore Posted by Soddengecko February 7, 2010
- HOW TO: Perform system backup in Ubuntu – Part 1 – Backup Posted by Soddengecko February 7, 2010
- SBS 2003: Mapping network drives for users at logon Posted by Soddengecko February 7, 2010
- Sharepoint Services not configured for use with ASP.NET 2.xxxxx Posted by Soddengecko November 26, 2009
- Customising Firefox 3 Posted by Soddengecko May 13, 2008
- How to: Install Ubuntu packages with HTML link Posted by Soddengecko March 15, 2008
- Mount network shares at boot. (Ubuntu) Posted by Soddengecko March 10, 2008
Recently Updated
Archives
People
Linkies
- Matthew Moore This blog belongs to an associate of mine. He likes to jibber jabber on a bit, and he has decided to document his exercising habits lately, but look back and check out some of the good stuff. Added on March 22nd, 2008 @ 12:08
- Fight for Kisses Probably the best shaving advert I have seen. Not much by the way of pretentious bullshit and it actually has a couple of funny moments. Worth a watch. Added on October 25th, 2007 @ 09:52
- Speedtest.net Speedtest.net is a broadband connection analysis tool with a huge selection of geographically dispersed testing servers. Ookla provides this service free to hundreds of thousands of people every day. If you are experiencing slowness with your Internet connection or are simply interested in testing your speed, Speedtest.net is for you. Added on October 15th, 2007 @ 22:09
- Sadikhov Forums A forum of like minded people helping others achieve the coveted CCNA qualification. The site is aimed at helping those understand the complex issues presented in the exams and making sure you understand them before wasting your money. Added on October 15th, 2007 @ 22:09
- RouterSim.com RouterSim has been the leader in IT simulation training since 1999. RouterSim’s Industry expert Todd Lammle offers you the best learning tools available. We have expanded our offerings to match your budget and needs. RouterSim offers simulators, computer-based training videos, online CCNA simulation testing, and exam preparation software. Added on October 15th, 2007 @ 22:08
- Generic Linux rules of thumb for security The only secure box is turned off and locked in the back room — but it’s also not much use to anyone Added on October 15th, 2007 @ 22:06




by @ 20:07