Mac OS X Printing via the Windows Print Server

Mac OS X Printing via the Windows Print Server

Mac OS X Printing via the Windows Print Server

Introduction
With the number of Macs growing, especially in the academic and consumer fields the need to support them has become a must have for many existing Windows environments.
The question becomes, “How does the competent Windows IT professional open up their print server to their Mac clients?”
Methods Available:There are a several methods of allowing the use of your networked printers to Mac OSX clients. Below is summary of each method and a brief of the pros and cons.
Printing Via LPD (Line Printer Daemon) – (Preferred):This is the easiest to install, and often the most reliable method of printing from Mac OSX to a printer queue installed on a Windows Server.
Primary Advantages / Disadvantages:
Job is submitted within Windows as the logged in user. This is especially useful when using Active Directory services for Mac.
Full document title information as set by the printing application is received by server.
Does not encounter common Kerberos authentication issues such as the popular NT_STATUS_ACCESS_DENIED error for no apparent reason.
Uses a separate port (515), from Windows File and Print Sharing (445).This allows for advanced security options via the Windows firewall to help allow fine tuning which systems or subnets can print via your servers LPD printers.
Requires installation of the Line Printer Daemon printing services, also known as Print Services for Unix on your Windows Print Servers.
Not all Macintosh printer drivers support this method of printing.
Printing Via Windows Print Sharing – (Popular):This option has become greatly popular, especially in the more recent releases of Mac OSX Leopard, Snow Leopard and Lion). In many environments this option can seamlessly integrate printing with a few clicks, and no additional configuration on your print server.
Primary Advantages / Disadvantages:
Job is often submitted as the user who installed the printer, rather than the user logged in. (See more details in the “Install a Printer via Windows Print Sharing” section)
Full Document Title information is not available on the print server. The queue will show “Remote Downlevel Document” in lieu of a usable title such as “A Good Presentation.pdf”
Connects to existing Windows shares, does not requires additional server configuration if printers are already shared to Windows users.
Can be difficult to troubleshoot some authentication issues.
Supported by nearly all Mac printer drivers.
Printing Via Windows Print Services for Macintosh (using AppleTalk) – (Deprecated):This legacy technology is no longer supported by Apple on their newer Operating System releases. While it can still be found in use within older networks, it is considered retired and will not be covered within this article.
Direct Printing (Printing directly via the IP address of the printer) – (Last Resort):This option should only be used as a last resort, as it makes any management or control of printing resources very difficult at best and should be avoided. Installing printers in this manner will not be covered in this article.
Disadvantages:
Little or no control or tracking of printer and associated printer costs.
Little or no security options for printing.
Typically supported by all Mac drivers.
Printing via LPD (Line Printer Daemon) – (Preferred):This section covers setting up this service, and installing and using a printer on Mac OSX. The first step in allowing printing is to enable the LPD service within Windows. This varies slightly between operating system. The below steps specifically apply to various server operating systems.
Configuring your Windows Server to provide LPD Printing Services (Windows 2000 / 2003 / XP):
1. Open Add/Remove Windows Components within Add/Remove Programs. Within this location Other network File and Print Services.
2. Click on the [Details] button and within details check Print Services for Unix and click OK and then [Next] to install these components.
3. Afterwards Windows will install this service. You may be prompted for your Windows Installation Media.
Configuring your Windows Server to provide LPD Printing Services (Windows 2008 / 2008 R2):
1. Run Server Manager and within Roles locate the Print and Document Services role.
2. Within that Role, click the Add Role Services. Here you can add the LPD Service.
3. Once the role has been installed, you are ready to install printers onto your Workstations.
Configuring your Windows Server to provide LPD Printing Services (Windows Vista / 7):
1. Open Control Panel > Programs and Features. Within this dialog, click the [Turn Windows Features on or off] on the left hand side.
2. The Windows Features dialog will open. Locate Print and Document Services and enable the item named LPD Print Server and then click [OK].
Installing the LPD printer on your Mac OS X systems:The next step is to install the printer onto your Mac OS X system using the following steps. 
1. Open Print & Fax within the System Preferences of your operating system.
2. Click the [+] button towards the bottom right to install your first printer. The add printer dialog will appear. From here click on the [IP] button at the top of the dialog and then choose Line Printer Daemon – LPD within the Protocol drop down list.
3. Once selected a variety of fields need to be filled in to reference your printer on your print server. The below should guide you to each one.
4. Once all is configured, clicking Add should finalize the installation of the printer.
Printing Via Windows Sharing – (Popular):The next step is to install the printer onto your Mac OS X system using the following steps.
Installing a Printer via Windows Printer Sharing:
Open Print & Fax within the System Preferences of your operating system.
Click the [+] button towards the bottom right to install your first printer. The add printer dialog will appear. From here click on the [Windows] button.
After clicking the [Windows] button, the browse dialog may appear black for several minutes. The system is actually busy locating the available Windows networks, but does not have any indication of this.
Once the networks have loaded, you can click each network to list the servers within the network. Clicking on the server, will attempt to load the printer shares on that server. Again each click of network or server may take several minutes to load without any indication that it is busy.
Depending on if you are authenticated, you may next get prompted for a username and password to view the shares on the server. You will need to enter your domain credentials.
After this you will see the list of shared printers.
The printer will not be installed and usable.
Securing and Restricting Mac OS X PrintingA common issue that comes up when using either of these forms of printing, are ensuring the user printing from Mac is the correct user so their printing can be managed and tracked properly. Consider these two scenarios.
Situation A: Using LPR Printing, without Active Directory Login Services enabled on MacIn this case, the user logged in may not exist in Active Directory and may be a local user that does not reference or match any AD user printing account for quotas and restrictions.
Situation B: Using Printing Via Windows Shares, but a user has saved their passwordIn this case, all print jobs are sent as the first user who happened to click Save my password. In a print tracking scenario, this would show a false statistic regarding who is actually printing each job.
The Solution:The solution to these issues, is Print Manager Plus with the Client Billing & Authentication add-on option. This add-on option requires explicit authentication on each print job by interacting with the Authentication Module running on each Mac.
This will provide the following functionality, on top of all of the tracking and control functionality included with Print Manager Plus.
  • All jobs will be tracked under the user actually printing it
  • Prevents unauthorized printing
  • Allows quota and restrictions by Active Directory user, group and OU to extend to Mac users
  • Can require users to verify each job before it prints to ensure they need it
Obtaining Mac DriversThis final section includes some tips for obtaining Mac versions of drivers for the various models of printers that exist. Below are three most common means of finding and selecting a driver.
Source A: The Print Manufacturer – (Preferred)The most popular source of drivers is through your printer manufacturers website. Most modern printers are well supported under Intel based Mac OSX 10.5 and later systems.  Browsing their support.
Known Issues:In rare situations, a manufacturer will not provide any Mac drivers for their device.
In rare situations, the driver they provide may support the LPD method of printing described above.
Source B: Third Party Drivers such as Gutenprint – (Alternative)If you are having trouble obtaining drivers for your printer, or are having trouble getting them to work via the LPD print server, you may want to consider third party drivers. Gutenprint, also known as Gimp-Print is an open source community project designed to provide fully functional drivers for a large variety of print devices.
Known Issues:The list is vast, but does not support all printers.
May not provide all of the advanced printing options your device is capable of.
Source C: Generic Drivers – (Alternative)The final step is to use generic drivers using either the Postscript (PS) printing language, or the Print Control Language (PCL). These are available directly when installing the printer.
Known Issues:Requires a device that supports native Postscript or PCL printer commands
Provides a limited set of basic printer features only. Will not support any advanced features your device may support. 
Show or Hide HDD icon on desktop of mac

Show or Hide HDD icon on desktop of mac

Show or Hide HDD icon on desktop of mac

Finder

You can easily hide or show the “Macintosh HD” main hard drive from the desktop of OS X, along with any other internal volumes and removable drives by adjusting some Finder options.

[ad id=”13280″]

If you like to keep your disk drives available on the desktop for easy access like this, here’s what you can do to be sure they’re always visible on the Mac desktop:

How to Show (or Hide) Hard Drives, Disks, and Volumes on the Mac OS X Desktop

This feature is available in all versions of OS X:

  1. Go to the desktop of the Mac if you haven’t yet
  2. Launch the Finder Preferences from the “Finder” menu, or hit Command+,
  3. Under the ‘General’ tab, check or uncheck items you either want shown or hidden, respectively
  4. Close Finder preferences

The settings look like the following:

show or hide hard drive on mac desktop

These changes take effect immediately. Through these preferences you can adjust the visibility of Macintosh HD and other internal hard disks, external drives, CD’s, DVD’s, iPods, and even connected servers.

Macintosh HD is categorized under ‘Hard disks’ so if you leave it checked it will remain visible.

Each drive will have a unique icon visible on the desktop.

Hard drive icon

If you’re a minimalist or you just don’t like the desktop icons and the clutter they can cause, you can always hide all desktop icons in Mac OS X with a simple Terminal command as well.

Create a usb bootable Kali from mac

1.download Kali Linux iso images from http://www.kali.org/downloads/
2. Format the usb stick in disk utility as msdos
3. Open Terminal Window and run the following

Code:

diskutil list

The result is

Code:

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 250.1 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *8.0 GB disk1
1: EFI 209.7 MB disk1s1
2: Microsoft Basic Data KALILINUX 7.7 GB disk1s2

4. my USB device is /dev/disk1, Then unmount disk by diskutil command

Code:

 diskutil umountDisk /dev/disk1

The result is

Code:

Unmount of all volumes on disk1 was successful

5. You may have to run this as sudo

Code:

sudo dd if=kalilinux.iso of=/dev/disk1 bs=512 conv=noerror,sync

Waiting for complete
When It success

Code:

4288416+0 records in
4288416+0 records out
2195668992 bytes transferred in 1763.590690 secs (1244999 bytes/sec)

Vi Commands

To create a shell script:

  1. Use a text editor such as vi. Write required Linux commands and logic in the file.
  2. Save and close the file (exit from vi).
  3. Make the script executable.
  4. You should then of course test the script, and once satisfied with the output, move it to the production environment.
  5. The simplest program in Bash consists of a line that tells the computer a command. Start up your favorite text editor (such as vi):

vi hello.sh

Essential Vi Commands

  • Open a file:

vi filename

  • To go into edit mode:

press ESC and type I

  • To go into command mode:

press ESC

  • To save a file

press ESC and type :w fileName

  • To save a file and quit:

press ESC and type :wq

OR

press ESC and type :x

  • To jump to a line:

press ESC and type :the line number

  • To Search for a string:

Press ESC and type /wordToSearch

  • To quit vi:

Press ESC and type :q

Save the following into a file called hello.sh:

#!/bin/bash
echo "Hello, World!"
echo "Knowledge is power."

Save and close the file. You can run the script as follows:

 ./hello.sh

Sample outputs:

bash: ./hello.sh: Permission denied

Saving and Running Your Script

The command ./hello.sh displayed an error message on the screen. It will not run script since you’ve not set execute permission for your script hello.sh. To execute this program, type the following command:

chmod +x hello.sh
./hello.sh

Sample Outputs:

Hello, World!
Knowledge is power.

connect through SSH and SFTP in mac

connect through SSH and SFTP in mac

Using SSH and SFTP in Mac OS X

SSH and SFTP are command line applications available from the Terminal (located at /Applications/Utilities/Terminal).

SSH

SSH client is a program for logging into a remote machine and for executing commands on a remote machine.

Connecting

To connect using ssh type at the terminal:

ssh username@host_server

Username is your network account username and host_server is the remote server to which you’re connecting.

SFTP

SFTP is an interactive file transfer program, similar to ftp, which performs all operations over an encrypted ssh transport.

Connecting

To connect using sftp type at the terminal:

sftp username@host_server

Username is your network account username and host_server is the remote server to which you’re connecting.

Commands

The commands available in SFTP are:

Command Description

pwd

Print working directory of remote host

lpwd

Print working directory of local client

cd

Change directory on the remote host

lcd

Change directory on the local client

ls

List director on the remote host

lls

List directory on the local client

mkdir

Make directory on remote host

lmkdir

Make directory on local client

get

Receive file from remote host to local client

put

Send file from local client to remote host

help

Display help text

Simultaneously edit a document with other authors

Simultaneously edit a document with other authors

Simultaneously edit a document with other authors

Source

When you collaborate with other authors to create a document, you can save time by simultaneously editing the document, instead of doing this separately. To edit the document at the same time, each author opens the file from a common location on a server.

IMPORTANT   You can simultaneously edit documents in the .docx file format that are located on Windows Live OneDrive or a server that has Microsoft SharePoint Server 2010 installed. To work with SharePoint in Office for Mac, you have to have Microsoft Office for Mac Home and Business 2011, Microsoft Office for Mac Academic 2011, or Microsoft Office for Mac Standard 2011.

With the document open on your computer, you can see who else is editing the document, who is editing a specific paragraph, and when updates from other authors are available on the server.

Simultaneously edit a document

Callout 1 Other author currently editing the document

Callout 2 All authors currently editing the document

Callout 3  Changes from other authors available on the server

When you save your changes to the server, any updates from other authors are automatically refreshed in the document. Updates from other authors are refreshed automatically only if they don’t conflict with changes that you made. If you and another author both change the same item, then a conflict may occur. If a conflict occurs when you save the document, you are prompted to review the conflict and accept or reject the change.

Do any of the following:

Save a document to a SharePoint site

When you save a document in a library on your organization’s SharePoint site, you and your colleagues have a central location for accessing the document. You can send a link instead of sending an attachment. In this manner, you maintain just a single copy of the document. If people make revisions, they do so in the same copy. You do not have to reconcile multiple versions and copies of the document.

  1. On the File menu, point to Share, and then click Save to SharePoint.
  2. To add a SharePoint site, click Add a location  Add a location, enter the URL to the SharePoint library, and then clickAdd.NOTE   By default, many SharePoint sites have a Shared Documents library. An example of a URL that links to this library is http://fabrikam/shared%documents.
  3. In the Save As box, enter the name of your document.
  4. Under Recent Locations or Saved Locations, click the SharePoint library where you want to save the document, and then click Save.TIP   The last several documents that you have opened from a SharePoint site, either through Office for Mac, Document Connection for Mac, or your browser, are listed under Recent Locations.

Save a document to a Windows Live OneDrive

When you save a document to OneDrive, the document is stored in a central location that you can access from almost anywhere. Even if you’re away from your computer, you can work on your document whenever you have a connection to the Web. Saving a document to OneDrive also makes it easy to share the document with other people. You can send a link instead of sending an attachment. In this manner, you maintain just a single copy of the document. If people make revisions, they do so in the same copy. You do not have to reconcile multiple versions and copies of the document.

  1. On the File menu, point to Share, and then click Save to OneDrive.
  2. If this is the first time that you have tried to access OneDrive, enter your Window Live ID and Password, and then click Sign In.If you use Hotmail, Messenger, or Xbox Live, you already have a Windows Live ID. If you don’t have one, clickGet a Live ID to create a new Windows Live ID.
  3. In the Save As box, enter the name of your document.
  4. Under Personal Folders or Shared Folders, click the folder where you want to save the document, and then click Save.

Open a document that is located on a SharePoint site

  1. On the File menu, click Open URL.
  2. In the URL box, type the URL for the document that is located on SharePoint, such as http://fabrikam/shared%20documents/DocumentName.docx.NOTE   You have to use a URL for a document in a SharePoint library. You cannot use a URL for other areas of a SharePoint site, such as a SharePoint list or top-level sites.
  3. Click Open.NOTES

    • You can also open a document that is located on SharePoint from your browser. To open the document in Word, click Open in Word.
    • If you prefer to edit the file separately instead of at the same time as other authors, you can check out the file from the SharePoint site. When you check out a file, the other authors are “locked out” and can only read the file.

Open a document that is located on a Windows Live OneDrive

  1. Open your browser and sign in to Windows Live OneDrive.
  2. Find and click the document, and then click Open in Word.

See who else is editing a document

  1. On the View menu, click Print Layout.
  2. Do one of the following:

To Do this
See who is editing anywhere in the document On the status bar at the bottom of the window, click the numbered icon  Collaboration Bar presence icon.

To send a communication to someone, click his or her name, and then click a communication method – for example, send an instant message.

See who is editing a specific paragraph In the document, click the icon next to the paragraph.

Presense icon

To send a communication to someone, click his or her name, and then click a communication method – for example, send an instant message.

Save and refresh a document that has updates

When you save your changes to the server, any other authors who are editing the document are notified that updates are available. Any updates from other authors are automatically refreshed in the document at that time if they don’t conflict with your changes. You can see when other authors save changes to the server because a message that indicates that updates are available appears on the status bar at the bottom of the window.

  1. On the status bar at the bottom of the window, click Updates Available  Updates available to refresh the document with updates.
  2. On the This document was refreshed with updates by other authors dialog box, click OK.Your changes are saved to the server, and updates that were made by the other authors appear in your document as tracked changes.

    NOTES

    • Updates that were made by other authors are refreshed automatically only if they don’t conflict with your changes. If any updates conflict with your changes, you will be able to review the conflicting changes before they are saved and decide which changes to accept or reject.
    • You can also click Save  Save and refresh button  on the Standard toolbar to refresh the document with updates that were made by other authors.

Review and accept changes from other authors

If you want to track the changes made by other authors, turn on Track Changes and save the document to the server. When you are ready to review the updates from other authors, you can see what has been added to or removed from the document. By using Track Changes, you can decide whether you want to accept or reject those changes.

CAUTION   Before you can accept or reject another author’s changes in a blocked area, you must remove that author’s block. You should only remove a block when you know that all other authors are finished editing the document. Otherwise, you run the risk of creating conflicts. Using Undo  Undo button does not restore a block.

  1. Click any areas that are blocked by other authors and then click Unblock.
  2. Accept or reject changes as you would in any other document. For more information, see Use tracked changes.
  3. When you finish accepting changes, save this version of the document on the server.