Tuesday, April 3, 2012
Monday, March 23, 2009
OSX hangs on login when bound to Active directory
OSX hangs on login when bound to Active directory
Solution is to remove it from the AD.
ssh username@machineip
$ sudo dsconfigad -r -u username
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
Network Password:
Computer removed from Active Directory
$ reboot
The computer should login properly now.
Solution is to remove it from the AD.
ssh username@machineip
$ sudo dsconfigad -r -u username
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
Network Password:
Computer removed from Active Directory
$ reboot
The computer should login properly now.
Labels:
Active Directory,
leopard,
Macintosh,
OSX
Start VNC from command line and connect to Mac from Windows VNC client
Here is how to start VNC from command line on your macintosh (say, via ssh) and then connect to your Macintosh from a Windows VNC client
Server side (SSH to your mac):
Step 1: -- set privs
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
Step 2: -- Allow VNC clients
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes
Starting...
Set the client options.
Done.
Step 3: -- Set VNC password (change it at the end of the line (i.e. don't use supersecret))
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw supersecret
Starting...
Set the client options.
Done.
Step 4: -- Restart service
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -console
Starting...
Stopped ARD Agent.
Stopped VNC Privilege Proxy
Stopped RFB Register MDNS
Done.
Badabing:~ rob$
Step 5: -- Client side config
Windows (Client Side)
I installed the tightVNC viewer.
Enter IP address in the VNC Server field. Click "Options" Change Encoding to Hextile. Click ok.
Click Connect.
Enjoy.
Server side (SSH to your mac):
Step 1: -- set privs
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -allowAccessFor -allUsers -privs -all
Starting...
Setting allow all users to YES.
Setting all users privileges to 1073742079.
Done.
Step 2: -- Allow VNC clients
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvnclegacy -vnclegacy yes
Starting...
Set the client options.
Done.
Step 3: -- Set VNC password (change it at the end of the line (i.e. don't use supersecret))
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -clientopts -setvncpw -vncpw supersecret
Starting...
Set the client options.
Done.
Step 4: -- Restart service
Badabing:~ rob$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent -console
Starting...
Stopped ARD Agent.
Stopped VNC Privilege Proxy
Stopped RFB Register MDNS
Done.
Badabing:~ rob$
Step 5: -- Client side config
Windows (Client Side)
I installed the tightVNC viewer.
Enter IP address in the VNC Server field. Click "Options" Change Encoding to Hextile. Click ok.
Click Connect.
Enjoy.
Create ISO CD/DVD image using OSX
Create ISO CD/DVD image (.iso) with Mac OS X
1. Insert CD/DVD source
2. Fire up a Terminal, you can then determine the device that is you CD/DVD drive using the following command:
$ drutil status
Vendor Product Rev
MATSHITA DVD-R UJ-835E GAND
Type: DVD-ROM Name: /dev/disk1
Cur Write: 8x DVD Sessions: 1
Max Write: 8x DVD Tracks: 1
Overwritable: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Free: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Used: 364:08:27 blocks: 1638627 / 3.36GB / 3.13GiB
Writability:
Book Type: DVD-ROM
3. Umount the disk with the following command:
$ diskutil unmountDisk /dev/disk1
Disk /dev/disk1 unmounted
4. Create the ISO file with the dd utility (may take some time):
$ dd if=/dev/disk1 of=file.iso bs=2048
5. Test the ISO image by mounting the new file (or open with Finder):
$ hdid file.iso
6. The ISO image can then be burnt to a blank CD/DVD.
1. Insert CD/DVD source
2. Fire up a Terminal, you can then determine the device that is you CD/DVD drive using the following command:
$ drutil status
Vendor Product Rev
MATSHITA DVD-R UJ-835E GAND
Type: DVD-ROM Name: /dev/disk1
Cur Write: 8x DVD Sessions: 1
Max Write: 8x DVD Tracks: 1
Overwritable: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Free: 00:00:00 blocks: 0 / 0.00MB / 0.00MiB
Space Used: 364:08:27 blocks: 1638627 / 3.36GB / 3.13GiB
Writability:
Book Type: DVD-ROM
3. Umount the disk with the following command:
$ diskutil unmountDisk /dev/disk1
Disk /dev/disk1 unmounted
4. Create the ISO file with the dd utility (may take some time):
$ dd if=/dev/disk1 of=file.iso bs=2048
5. Test the ISO image by mounting the new file (or open with Finder):
$ hdid file.iso
6. The ISO image can then be burnt to a blank CD/DVD.
Cisco VPN Error 51 workaround
Cisco VPN Error 51 workaround
Macintosh OSX
Have you have ever encountered the following error when launching the Cisco VPN Client on your mac:
Error 51: Unable to communicate with the VPN subsystem.
Please make sure that you have at least one network interface that is currently active and has an IP address and start this application again.
The problem stems from another network interface (like firewire or a third party network interface such as VMware or Hamachi) stepping on the cisco VPN interface.
Over the years, I have worked around this problem in several ways... all of which are not as graceful as:
sudo SystemStarter restart CiscoVPN
Anyway, just wanted to save you reboots and or frustration should it ever come up for you...
You could even make an alias out of it by add the following line to your .bash_profile
alias resetcisco='sudo SystemStarter restart CiscoVPN'
then (on next login) you could just type "resetcisco".
Macintosh OSX
Have you have ever encountered the following error when launching the Cisco VPN Client on your mac:
Error 51: Unable to communicate with the VPN subsystem.
Please make sure that you have at least one network interface that is currently active and has an IP address and start this application again.
The problem stems from another network interface (like firewire or a third party network interface such as VMware or Hamachi) stepping on the cisco VPN interface.
Over the years, I have worked around this problem in several ways... all of which are not as graceful as:
sudo SystemStarter restart CiscoVPN
Anyway, just wanted to save you reboots and or frustration should it ever come up for you...
You could even make an alias out of it by add the following line to your .bash_profile
alias resetcisco='sudo SystemStarter restart CiscoVPN'
then (on next login) you could just type "resetcisco".
Put two IP addresses on one NIC
Here is how to have two IPs using one network card in linux.
In the directory /etc/sysconfig/networking/devices
Create the following new file by typing "vi ifcfg-eth0:0"
DEVICE=eth0:0
BOOTPROTO=none
IPADDR=192.168.1.23 # your second IP
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
ONPARENT=yes
Next, in the directory /etc/sysconfig/networking/profiles/default
create the same file again by typing "vi ifcfg-eth0:0"
DEVICE=eth0:0
BOOTPROTO=none
IPADDR=192.168.1.14 # your second IP
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
ONPARENT=yes
now, bounce networking with "service networking restart" and use ifconfig to see if the net interface shows up...
[root@mail default]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:72:52:3A:2C
inet addr:192.168.1.23 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:211994158 errors:2 dropped:0 overruns:0 frame:1
TX packets:1031665949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:898868933 (857.2 MiB) TX bytes:245145424 (233.7 MiB)
Base address:0xecc0 Memory:fe6e0000-fe700000
eth0:0 Link encap:Ethernet HWaddr 00:13:72:52:3A:2C
inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0xecc0 Memory:fe6e0000-fe700000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:45061099 errors:0 dropped:0 overruns:0 frame:0
TX packets:45061099 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3353720043 (3.1 GiB) TX bytes:3353720043 (3.1 GiB)
In the directory /etc/sysconfig/networking/devices
Create the following new file by typing "vi ifcfg-eth0:0"
DEVICE=eth0:0
BOOTPROTO=none
IPADDR=192.168.1.23 # your second IP
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
ONPARENT=yes
Next, in the directory /etc/sysconfig/networking/profiles/default
create the same file again by typing "vi ifcfg-eth0:0"
DEVICE=eth0:0
BOOTPROTO=none
IPADDR=192.168.1.14 # your second IP
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
ONPARENT=yes
now, bounce networking with "service networking restart" and use ifconfig to see if the net interface shows up...
[root@mail default]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:72:52:3A:2C
inet addr:192.168.1.23 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:211994158 errors:2 dropped:0 overruns:0 frame:1
TX packets:1031665949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:898868933 (857.2 MiB) TX bytes:245145424 (233.7 MiB)
Base address:0xecc0 Memory:fe6e0000-fe700000
eth0:0 Link encap:Ethernet HWaddr 00:13:72:52:3A:2C
inet addr:192.168.1.14 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0xecc0 Memory:fe6e0000-fe700000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:45061099 errors:0 dropped:0 overruns:0 frame:0
TX packets:45061099 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3353720043 (3.1 GiB) TX bytes:3353720043 (3.1 GiB)
Labels:
configuration,
linux,
two ips on one network card
Xbox360 ushare
Here's how to get ushare to work with your xbox360:
This will allow you to stream video (movies) form your ubuntu box to your xbox360.
sudo apt-get ushare
sudo gedit /etc/ushare.conf
Verify (or change 3 things):
(your interface)
USHARE_IFACE=eth0
(the directory with your media)
USHARE_DIR=/home/user/media
(enable xbox support)
USHARE_ENABLE_XBOX=yes
Save the file...
We need to add -x to the ushare daemon when it is launched...
so edit:
sudo gedit /etc/rc3.d/s20ushare
Near the top, add the following line:
USHARE_OPTIONS=-x
save the file...
then bounce the service.
sudo invoke-rc.d ushare stop
sudo invoke-rc.d ushare start
(in my experience, if your use sudo invoke-rc.d ushare restart, it will respawn too quickly... you can add a sleep statement in the restart script... or just to what I did above)
Restart your xbox360... enjoy.
This will allow you to stream video (movies) form your ubuntu box to your xbox360.
sudo apt-get ushare
sudo gedit /etc/ushare.conf
Verify (or change 3 things):
(your interface)
USHARE_IFACE=eth0
(the directory with your media)
USHARE_DIR=/home/user/media
(enable xbox support)
USHARE_ENABLE_XBOX=yes
Save the file...
We need to add -x to the ushare daemon when it is launched...
so edit:
sudo gedit /etc/rc3.d/s20ushare
Near the top, add the following line:
USHARE_OPTIONS=-x
save the file...
then bounce the service.
sudo invoke-rc.d ushare stop
sudo invoke-rc.d ushare start
(in my experience, if your use sudo invoke-rc.d ushare restart, it will respawn too quickly... you can add a sleep statement in the restart script... or just to what I did above)
Restart your xbox360... enjoy.
Wednesday, April 2, 2008
OSX Leopard hamachi auto start
For those of you waiting to have a Leopard compatible gui for hamachi... This should help for now. This will get you up and running with the command line.
The following should start tuncfg on boot (as root) and then hamachi will start up on login.
First install the leopard tun/tap drivers.
You need to make sure that Xcode tools are installed (you can install them from your leopard disc -- find them under optional installs) or them from Apple's Developer connection. If this is not installed you will get an error when attempting to use "make".
You will them be able to install hamachi.
After you get hamachi working properly from the command line.... use the follow (very rough) steps to get it to auto-start for you.
Here's what I did:
created directory:
sudo mkdir /Library/BootScripts
created file:
sudo vi /Library/BootScripts/loadtuncfg.sh
filecontents of loadtuncf.sh
----- snip -----
#!/bin/bash
sleep 30
/usr/sbin/tuncfg
------- end of snip ------
sudo chmod 755 /Library/BootScripts/loadtuncfg.sh
(file is owned by root:admin on my machine)
created file:
sudo vi /Library/LaunchDaemons/com.loadtuncfg.launchd.loadtuncfg.plist
file contents of com.loadtuncfg.launchd.loadtuncfg.plist:
-------snip---------
----------end of snip -----
All of the above should start tuncfg on boot (after 30 sec delay).
Now to start hamachi after local user login...
Make sure to change "yourusername" to the user that you use. Even in the .plist file below.
created directory: (notice not using sudo)
mkdir /Users/yourusername/Library/LoginScripts/
created file: (notice not using sudo)
vi /Users/yourusername/Library/LoginScripts/loadhamachi.sh
file contents of loadhamachi.sh:
-------- snip --------
#!/bin/bash
sleep 40
hamachi start
hamachi login
hamachi go-online yournetworkname
---- end of snip -----
chmod 755 /Users/yourusername/Library/LoginScripts/loadhamachi.sh
(file is owned by yourusername:yourusername)
created directory: (notice not using sudo and directory may already exist)
mkdir /Users/yourusername/Library/LaunchAgents
created file: (notice not using sudo)
vi /Users/yourusername/Library/LaunchAgents/com.loadhamachi.launchd.loadhamachi.plist
file contents of com.loadhamachi.launchd.loadhamachi.plist:
--- snip ----
------ end of snip ------
file is 644 (as created and owned by youusername)
Now reboot...
tuncfg will load in 30 seconds after boot up..
hamachi will load 40 seconds after login.. (delayed longer to ensure that tuncfg loaded)..
(Credit: Most of this was from GirthP post at http://forums.macrumors.com/showthread.php?t=458736)
I hope this helps.
The following should start tuncfg on boot (as root) and then hamachi will start up on login.
First install the leopard tun/tap drivers.
You need to make sure that Xcode tools are installed (you can install them from your leopard disc -- find them under optional installs) or them from Apple's Developer connection. If this is not installed you will get an error when attempting to use "make".
You will them be able to install hamachi.
After you get hamachi working properly from the command line.... use the follow (very rough) steps to get it to auto-start for you.
Here's what I did:
created directory:
sudo mkdir /Library/BootScripts
created file:
sudo vi /Library/BootScripts/loadtuncfg.sh
filecontents of loadtuncf.sh
----- snip -----
#!/bin/bash
sleep 30
/usr/sbin/tuncfg
------- end of snip ------
sudo chmod 755 /Library/BootScripts/loadtuncfg.sh
(file is owned by root:admin on my machine)
created file:
sudo vi /Library/LaunchDaemons/com.loadtuncfg.launchd.loadtuncfg.plist
file contents of com.loadtuncfg.launchd.loadtuncfg.plist:
-------snip---------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.loadtuncfg.launchd.loadtuncfg</string>
<key>KeepAlive</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Library/BootScripts/loadtuncfg.sh</string>
<string>run</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
----------end of snip -----
All of the above should start tuncfg on boot (after 30 sec delay).
Now to start hamachi after local user login...
Make sure to change "yourusername" to the user that you use. Even in the .plist file below.
created directory: (notice not using sudo)
mkdir /Users/yourusername/Library/LoginScripts/
created file: (notice not using sudo)
vi /Users/yourusername/Library/LoginScripts/loadhamachi.sh
file contents of loadhamachi.sh:
-------- snip --------
#!/bin/bash
sleep 40
hamachi start
hamachi login
hamachi go-online yournetworkname
---- end of snip -----
chmod 755 /Users/yourusername/Library/LoginScripts/loadhamachi.sh
(file is owned by yourusername:yourusername)
created directory: (notice not using sudo and directory may already exist)
mkdir /Users/yourusername/Library/LaunchAgents
created file: (notice not using sudo)
vi /Users/yourusername/Library/LaunchAgents/com.loadhamachi.launchd.loadhamachi.plist
file contents of com.loadhamachi.launchd.loadhamachi.plist:
--- snip ----
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.loadhamachi.launchd.loadhamachi</string>
<key>KeepAlive</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/yourusername/Library/LoginScripts/loadhamachi.sh</string>
<string>run</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
------ end of snip ------
file is 644 (as created and owned by youusername)
Now reboot...
tuncfg will load in 30 seconds after boot up..
hamachi will load 40 seconds after login.. (delayed longer to ensure that tuncfg loaded)..
(Credit: Most of this was from GirthP post at http://forums.macrumors.com/showthread.php?t=458736)
I hope this helps.
Thursday, January 17, 2008
Dreambox tricks
For a dreambox 500 et al:
Setup the dreambox CDK environment with these steps. I used RHEL 5 but I am sure the fedora or others would work fine. Prerequisites here can be found here: cvs.tuxbox.org/cgi-bin/viewcvs.cgi/tuxbox/cdk/doc/INSTALL.en?rev=HEAD
export CVS_RSH=ssh
cvs -d anoncvs@cvs.tuxbox.org:/cvs/tuxbox -z3 co -P -rdreambox .
cd cdk
chmod 755 prepare
./prepare dm500
make checkout
make core
(when it bombed on nptl-0.60.tar.bz2)
cd Archive
wget http://ftp.devil-linux.org/pub/devel/sources/1.2/nptl-0.60.tar.bz2
cd ..
make core
Setup the dreambox CDK environment with these steps. I used RHEL 5 but I am sure the fedora or others would work fine. Prerequisites here can be found here: cvs.tuxbox.org/cgi-bin/viewcvs.cgi/tuxbox/cdk/doc/INSTALL.en?rev=HEAD
export CVS_RSH=ssh
cvs -d anoncvs@cvs.tuxbox.org:/cvs/tuxbox -z3 co -P -rdreambox .
cd cdk
chmod 755 prepare
./prepare dm500
make checkout
make core
(when it bombed on nptl-0.60.tar.bz2)
cd Archive
wget http://ftp.devil-linux.org/pub/devel/sources/1.2/nptl-0.60.tar.bz2
cd ..
make core
Subscribe to:
Posts (Atom)