Finding your WiFi/Airport connection broken after your machine wakes from sleep?
It appears that, with some non-Apple base stations where the Mac is using DHCP, it can forget its IP address during sleep, but does not request a new one. The best solution is to switch to using a fixed IP address, as even turning AirPort off then reconnecting to the network has little effect.
I use the following AppleScript to share my broadband internet connection with my USB-attached irDA adapter. This allows my Palm to use my network connection so I can sync AvantGo (modem sync) and download emails direct from my POP account on the net.
First you need to share your ethernet connection (don't know about modem dial-up) by pressing Start in the Internet tab of the Sharing control panel. Then edit the script below and insert the following details (all are needed):
Your Mac OS X password (you must be an administrator)
The name of your IrDA device. In a terminal window type ls /dev/tty*. Copy the one that starts tty.IrDA.
The IP address of your primary DNS server (for your internet connection)
The IP address of your Mac
An invented IP address for your remote device (e.g. Palm) that is not being used by anything else. Often just take your Mac IP Address and add 1 to the last number.
I have set up a G4 with OS X to serve as a file server in a mixed environment. For PCs with Win98, XP and NT to access the server, I had quite some config work to do with the Samba setup. Everything was smooth, but some PC users could still not authenticate with the OS X Samba server. While investigating the problem, I discovered some discrepancies with the generic Samba docs and the OS X Samba version with respect to password handling. Effectively, I had three options to change passwords for users on the OS X server:
Directly change the Unix password from a telnet session with asswd
Using the samba tool smbpasswd
Using an external Mac(!) with AppleShare and using the "change password" dialog there.
It turns out that the smbpasswd command had no effect at all, even if a /var -> db -> samba -> smbpasswd was there, it was ignored.
The method via AppleShare changed the Unix password and the Samba password stored as a hash code in /var -> db -> samba -> hash -> Username. It is this hash-file (and not the smbpasswd file) which controls the access to the server. The command smbpasswd however, does not change this hash file, only the AppleShare dialog was successful.
[robg adds: I haven't tested Samba connectivity from anything other than Win2K and WindowsXP boxes, so I can't verify these claims, but thought they might be useful to someone.]
I was looking at some of the previous hints and did not find anything useful as far as printing to a shared printer (CUPS) in Linux. I have an old Pentium that is set up as my Samba / share / printer / etc. Currently, Windows can print to it fine via Samba (check the docs - with newer Samba versions, it requires adding two lines to the smb.conf file). As far as adding the printer to your Mac (OS X 10.2.6), it's really easy (after you figure it out). Start by going to http://localhost:631/ with your favorite browser. Go to the Administration section and click on Add Printer. On the first screen with Name, Location, and Description, most of this is irrelevant. Pick a name, enter some descriptive info, and click Continue.
On the next screen, click the Device pop-up menu and select "Internet printing protocol (http)" and click continue. On the next screen, for the Device URI, enter http://192.168.1.1:631/printers/deskjet. Of course, you'll need to change the IP and name of the printer (mine is deskjet) to match your setup.
Then, make sure you select a driver that matches up with your printer, so you can change some of the printing options. I'm using a DeskJet 3420. Really inexpensive and works great.
I have a need to telnet into my OS X 10.2.8 machine from a Cisco router. I enabled telnet support in inetd.conf, and tests from other OS X and FreeBSD machines worked fine. However, trying to login from the Cisco (IOS 12.3.1) didn't work; as soon as I entered a username, the session hung.
The fix proved to be adding the -k option to the telnetd invocation:
-k This option is only useful if telnetd has been compiled with
both linemode and kludge linemode support. If the -k option
is specified, then if the remote client does not support the
LINEMODE option, then telnetd will operate in character at a
time mode. It will still support kludge linemode, but will
only go into kludge linemode if the remote client requests
it. (This is done by by the client sending DONT
SUPPRESS-GO-AHEAD and DONT ECHO.) The -k option is most
useful when there are remote clients that do not support
kludge linemode, but pass the heuristic (if they respond
with WILL TIMING-MARK in response to a DO TIMING-MARK) for
kludge linemode support.
By the way, the man page for telnetd doesn't appear to be correct - it covers some different options than telnetd accepts or lists if you run telnetd from the command line.
After installing a Windows 2003 Server and trying to mount a share in Mac OS X, everything was fine in Workgroup mode. However, after putting the Windows server 2003 in Domain Controler mode, I started to have get -5000 errors coming from SMB. The Macintosh File Server is installed.
After some searching, I found that after promoting a Windows Server 2003 to a Domain Controller, you must check the Domain Security Policy and de-activate the "Always secured connection" policy. I don't understand why, but after changing that setting, it works fine.
I picked up a new Netgear MR814v2 wireless router this weekend and an Airport Extreme card for the iMac. I set the router up with 128 bit WEP and my PC had no problem, but the iMac refused to connect, no matter how I configured the WEP key. It even failed with WEP disabled entirely.
After fighting it for a few hours I found the fix -- upgrade the router to version 5.0.1, and the Airport card will sync up happily with or without WEP.
I just worked my way through an interesting ordeal involving Windows file sharing and SMB. I was trying to select 'Windows File Sharing' in the Sharing system pref, but it wouldn't activate. I quickly checked Apple's support page on the issue and found I had already tried all the resolves (reconnecting to network, logging out, restart). I read a recent post on this site about checking the console to catch incoming errors. What I found was the following:
Starting SMB server
No such file or directory
So, after a futile Finder search, I used a utility to show hidden files and went hunting for the missing file. What I found where the file was supposed to be was a broken alias to the actual file. I hadn't hunted this deeply into the system before, so I didn't know yet that the actual file was supposed to be here. Well, after doing some research on the internet, I found that this indeed should be here. I'm stumped as to how the actual file was replaced with just an alias.
My first and simplest solution worked just fine: I have OS X installed on my FireWire drive, so I just changed my permissions for the etc folder on the affected volume, moved the clean file from the FireWire drive to the etc folder, and changed the permissions back (note the 'wheel' group). Now everything works fine again, and I even got a confidence boost thrown in.
I run a development Web server on my Powerbook and frequently test content on Windows browsers via Virtual PC.
When I'm not connected to a network (as is often the case for PowerBook users), I don't have an IP address (except 127.0.0.1), so VPC has no address it can use to connect to my local server.
Create an alias of your network IP address to the loopback interface (127.0.0.1). In the Terminal, type:
sudo ifconfig lo0 inet 192.168.0.1 netmask 255.255.255.0 alias
IP addresses have been changed to protect the innocent; replace 192.168.0.1 and 255.255.255.0 with your actual network IP address and subnet mask. VPC (or anything else on your computer) should now be able to connect sans network, but using your network IP address (192.168.0.1 in our example). To remove the alias, type:
NOTE: For any of the above to work properly, you will need to fix a now infamous VPC network bug. If you haven't done so already, enable the Scripts menu in VPC preferences and run the "Set Networking Type" script, and change the network type to Shared Sockets.