MOSS 2007 Access Denied When Accessing SSP Admin Site

Problem

Browsing to some of the SSP Admin pages yields:

401 UNAUTHORIZED
or ACCESS DENIED
or prompts continuously for a user name

I first came across this problem after restoring an SSP from a backup.

Solution

The SSP service account needs to be granted permissions in the following places:

Central Admin -> Application Management -> Site Collection Administrators

SSP Admin -> Personalization Service Permissions (All)

Central Admin -> Application Management -> Policy for Web Application (Full)

MOSS 2007 Move SSP to another farm

Move An SSP To Another Farm

Use the Technet article Microsoft Technet – Move an SSP to another farm.

The five basic steps are:

Back up the original SSP
Restore the SSP to a new farm
Restore SSP associations and configure the SSP
OPTIONAL – Configure the restored SSP on the new farm to be the default
OPTIONAL – Delete the original SSP

Backup the SSP

Follow the Microsoft instructions.

Also see ../BackupSsp

Restore the SSP to a new farm

Follow the Microsoft instructions.

‘YOU ARE HERE’

Errata

5b – New Configuration!
5c – Use new database names to avoid overwriting existing

Additional

The restore will hang at 90% with lots of errors in the event log
Don’t worry – it has restored the databases and that’s all we need
Cancel the restore.
Delete the restored SSP (not the databases)

See ../UnableToDeleteSsp

Delete the restored SSP Web Application from Central Admin -> Delete Web Application

Restore SSP associations and configure the SSP

Follow the Microsoft instructions.

Additional

Access Denied when accessing SSP Admin site

Set SSP as default on the new farm

Follow the Microsoft instructions.

Delete the original SSP

Follow the Microsoft instructions.

Additional

Unable to delete SSP
Delete the Web Application for the SSP

MOSS 2007

MOSS 2007

/Devel

Procedures

Move an SSP to another farm

Problems (and Solutions)

Access Denied when accessing SSP Admin Site

Access Denied! Only site admin can access Data Source object from user profile DB

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID

Unable to Delete Shared Services

foo

Mysite is unavailable – 404 error

stsadm -o backup gives error 5

stsadm -o restore gives The server principal x is not able to access the database x under the current security context

PDF Icon is Missing

Interesting Articles

Configure Mysites to appear under http://portal/personal/

Filename Restrictions

Sharepoint does not like filenames to contain certain characters:

Joel is a reputable source, with an exhaustive review:

http://blogs.msdn.com/joelo/archive/2007/06/27/file-name-length-size-and-invalid-character-restrictions-and-recommendations.aspx

The official microsoft reference is:

http://support.microsoft.com/default.aspx?scid=kb;en-us;905231

User Profiles

LDAP Filter for user profile import

Official Resources

http://blogs.msdn.com/sharepoint/

http://suguk.org/

The marketing site – http://sharepoint.microsoft.com

Disaster Recovery

Restoring SSP using stsadm -o restore

The server principal x is not able to access the database x under the current security context.

Solution: The user who is performing the restore (i.e. who is logged into the desktop) needs to be a member of the sysadmin role on the sql server.

Best Practice on Backups

http://blogs.msdn.com/joelo/archive/2007/07/09/best-practice-on-backups.aspx

Export User Profiles

This one only works if you have a fully working Shared Services Provider

http://userprofileimport.codeplex.com/

Export Audiences

http://stsadm.blogspot.com/2009/04/exporting-audiences-using-stsadm.html

http://stsadm.blogspot.com/2009/04/importing-audiences-using-stsadm.html

stsadm -o deletesite gives (Exception from HRESULT: 0x80070003)

So someone accidentally deleted a site collection (/sites/banana). I attempted to stsadm -o restore but got scared and cancelled it with Ctrl+C. Bizarrely, the site collection (/sites/banana) is still shown in the Central Administration Site Collection List, but without any information in the right hand panel.Presumably the database is corrupt in some way.

I want to delete the site collection so stsadm -o deletesite -url http://intranet/sites/banana but it says Exception from HRESULT: 0x80070003)

A quick google for Exception from HRESULT: 0x80070003) gives:

http://geekswithblogs.net/naijacoder/archive/2008/05/20/122283.aspx

The Technet reference for databaserepair: http://technet.microsoft.com/en-us/library/cc288636.aspx

So lets see what sites are orphaned: stsadm -o databaserepair -url http://intranet/sites/banana -databasename wss_content_banana

Lets delete the orphaned sites: stsadm -o databaserepair -url http://intranet/sites/banana -databasename wss_content_banana -deletecorruption

But that doesn’t work.

Lets try detaching and reattaching the content database.

This strategy is backed up by:

https://blogs.msdn.com/subhajitc/archive/2008/09/14/how-to-delete-corruption-orphaned-records-from-the-content-databases.aspx

http://blogs.technet.com/corybu/archive/2007/05/31/sharepoint-orphans-explained.aspx

stsadm -o preparetomove -contentdb wss_content_banana -site http://intranet/sites/banana

And remove database from farm:

stsadm -o deletecontentdb -url http://intranet/sites/banana -databaseserver wss_content_banana -databasename wss_content_banana

When you’re ready to reattach your database to the farm follow this only step:

stsadm -o addcontentdb -url http://intranet/sites/banana -databaseserver sqlserver1 -databasename wss_content_banana

Move a Sharepoint Site

http://office.microsoft.com/en-us/sharepointdesigner/ha100699391033.aspx

Move a Sharepoint Document Library and Preserve Metadata

There are two inferior methods for copying data between document libraries or lists:

Using the explorer view to copy items from one tother
Creating list or library templates

These methods are inferior as they do not preserve the ‘Created By’, ‘Last Modified By’, etc. metadata.

Here is a method for moving the data whilst preserving its metadata:

Create a blank list or library as the destination
Goto the ‘Site Content and Structure’ page
Navigate to the source list or library
Select every item in the source list or library

Actions -> Move
Select your destination list or library
OK

Henry also uses this technique:

http://blog.henryong.com/2008/01/21/how-to-movemigrate-sharepoint-list-itemsdocuments-and-preserve-metadata-properties-at-the-same-time/

stsadm -o backup gives Error 5

http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a-6fa9-4130-bcab-baeb97ccc4ff&ID=34

Your UNC backup folder needs to be SHARED and sharepoint service, central admin apid, sql server service need to have read/write on that share.

Microsoft Word Mail Merge SQL Server

Sub ConfigureMailMerge(clientId As Long, dsnFile As String, viewName As String)

Debug.Print “Call ConfigureMailMerge(” & Str(clientId) & “, ” & dsnFile & “, ” & viewName & “)”


Dim sql As String
‘sql = “SELECT * FROM ” & viewName & ” WHERE clientid=” & Trim(Str(clientId)) & “”
sql = “SELECT * FROM “”” & viewName & “”” WHERE clientid=” & Trim(Str(clientId)) & “”
‘sql = “SELECT * FROM ” & MYVIEW & ” WHERE clientid='” & Trim(Str(clientId)) & “‘”
Debug.Print sql

Dim sConn As String
sConn = “FILEDSN=” & dsnFile & “;”

ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource _
Name:=dsnFile, _
SQLStatement:=sql

Debug.Print “Datasource Record Count = ” & ActiveDocument.MailMerge.DataSource.RecordCount

Debug.Print “Return ConfigureMailMerge”

End Sub

Cups Printing

RTFM

http://www.cups.org/doc-1.1/sam.html

Check Settings

gs -h | grep cups should reveal the ghostscript cups device.

CUPS Backends

The last part of any CUPS filtering chain is a backend. Backends are special programs that send the print-ready file to the final device.

AppSocket/HP JetDirect

This backend sends print files to AppSocket (a.k.a., HP JetDirect) connected network printers. An example for the CUPS device-URI to use is socket://10.11.12.13:9100.

smb

This backend sends print files to printers shared by a Windows host. Examples of CUPS device-URIs that may be used includes:

smb://workgroup/server/printersharename
smb://server/printersharename
smb://username:password@workgroup/server/printersharename
smb://username:password@server/printersharename

The smb:// backend is a symlink to the Samba utility smbspool (does not ship with CUPS). If the symlink is not present in your CUPS backend directory, have your root user create it: ln -s `which smbspool’ /usr/lib/cups/backend/smb.

To list all available backends installed on the system, use lpinfo -v

Troubleshooting

Supply also config files like /etc/cups/printers.conf, /etc/cups/cupsd.conf, /etc/cups/ppd/*.ppd, /etc/samba/smb.conf, …

Strip away the comments and blank lines in the config files when posting them, for example with a command like cat /etc/cups/cupsd.conf|grep -v ^#|grep [:alnum:] > cupsd.conf-stripped

Check the integrity of manufacturer-supplied PostScript PPD files with the cupstestppd utility. Often the output helps you fixing small flaws by editing the PPD file. CUPS only accept PPD files which pass the test. Unfortunately often printer manufacturers do not comply well with Adobe’s standards.

Send print jobs with CUPS in debug mode. Edit /etc/cups/cupsd.conf switching the “LogLevel” to “debug”. Kick the CUPS daemon with killall -HUP cupsd and send a print job. Then have a look into /var/log/cups/error_log and look for error messages, GhostScript command lines, option settings. Post relevant parts of the file if you didn’t find a solution for your problem.

Create your own raster driver

http://www.cups.org/documentation.php/raster-driver.html

Xerox 7345

joem-xerox7345.drv

jm7345.ppd

cups-overview.pdf

Try the ljet4 driver from http://www.linuxprinting.org/show_printer.cgi?recnum=Xerox-WorkCentre_7345

Linux Convert .m4a to .mp3

A handy bash script for converting all m4a (iTunes) files in the current directory to mp3.

#!/bin/bash

for i in *.m4a; do
echo “Converting $i to wav…”
wavname=”$i.wav”
faad -o $wavname $i
echo “Converting $wavname to mp3…”
mp3name=”$i.mp3″
lame -h -b 192 $wavname $mp3name
echo “Cleaning up wav…”
rm $wavname
echo “Done. Output is $mp3name”
done

Paste the above into a file named m4a2mp3.sh and then chmod +x m4a2mp3.sh

cd into the directory containing your m4a files and then ./m41a2mp3.sh