Marcel's tec Blog IT , Mac OS X, Linux, OpenSource, Security…

16Sep/110

“Network accounts are unavailable” when logging into OS X Lion

Posted by marcel

Apple released 10.7.1 yesterday, so I'm curious to see if it resolves these issues with network accounts. I'll have a chance to test it next week and will update this with what I find. If you're ready this and already tried it please leave a comment as to whether or not it works for you

Original Post

If you use Active Directory user accounts with your Macs, you may run into this issue after upgrading or introducing OS X Lion. Hopefully Apple comes out with an update to fix it soon, but in the meantime there is a workaround. You can add a custom search path to the Authentication tab and that seems to work. Here's a walkthrough:

1. Open System Preferences
2. Go to User & Groups
3. Click Login Options in the lower left. You may have to authenticate first by clicking the lock icon in the lower left.
4. Under Network Account Server, click Edit
5. Select your domain, then click Open Directory Utility
6. At the top, select Search Policy
7. Under the Authentication tab you should see two paths: /Local/Default, and /Active Directory/YourDomain/All Domains, where YourDomain is a placeholder for the name of your domain name. Click the + to add another
8. You should see /Active Directory/YourDomain listed as an additional option. Select it and click Add
9. Move /Active Directory/YourDomain above /Active Directory/YourDomain/All Domains so it has a higher priority
10. Click Apply
11. Reboot and log in

Filed under: Mac OS X No Comments
2Aug/111

Just installed Sparkleshare on my Windows 7 x64 machine

Posted by marcel

Just installed Sparkleshare on my Windows 7 x64 machine it is very experimental but I wanted to see and try the Windows Version...
I followed this wiki:
https://github.com/wimh/SparkleShare/wiki
But I had some troubles to start SparkleShare see this posts:
https://github.com/wimh/SparkleShare/issues/3#issuecomment-1488983

But here some Screenshots of Sparkleshare Windows Version:

But I couldn't connect to my githup repo so far because Sparkleshare ignores the username. But Gitorious is working great....

FIXED thx @wimh now github an also the sync with my own server works !!!

 

Filed under: SparkleShare 1 Comment
24May/110

xrdp Ubuntu 11.04

Posted by marcel

xrdp is an open source remote desktop protocol(rdp) server, so it’s able to serve a desktop to any Microsoft terminal server client. (that includes any recent Windows, Linux via rdesktop, or many portable devices with RDP clients.

sudo apt-get install tightvncserver
sudo apt-get install xrdp

Problem
While connecting over Xrdp, hitting the "D" key alone hides all my windows and shows the desktop. This is problematic since I often wish to type words containing at least one "D" in it. In case anyone else is having this problem, I've wrestled through it and offer this help.

I'm using Ubuntu 10.10 Maverick Meercat and connecting via Xrdp. I only have this problem when connecting remotely.

Apparent Cause
I don't pretend to know for sure, but the problem appears to be that the remote connection is flubbing Metacity's "<Super>d" binding for the "show desktop" command. More precisely, the string "<Super>" doesn't appear to be functioning for me. If I change <Super> to <Ctrl>, I can use Ctrl + D to show desktop, and I can then type the letter D without it hiding every window from me.

Further evidence <Super> isn't working for me, if I change Metacity's "panel_run_dialog" global key binding from "<Alt>F2" to "<Super>F2" I bring up the run dialog by hitting F2 alone.

Workarround
Now in order to get the proper keyboard map and theme in GNOME, you need to make a modification:
Open gconf-editor either by typing that in a console, or in the Alt+F2 window.
Inside gconf-editor, navigate to /apps/gnome_settings_daemon/plugins/keyboard and set “active” to false.

or do the following steps

gconf-editor ->app->metacity->global_keybindings
Change the assigned keystroke for show_desktop from "<Super>d" to "<Ctrl>d" or "<Ctrl><Alt>d" or "disabled"

But this changes are only for the active user.
To set this option for all Users do the following:
Right click on "show_desktop" and choose  set Mandatory or set it as default. You can check this option if you choose File --> New Mandatory Window. See also this page for more informations.

 

Filed under: Ubuntu No Comments
24May/110

Likewies-Open AD Domain Join

Posted by marcel

There are two ways to use Likewise Open, likewise-open the command line utility and likewise-open-gui.
This section focuses on the command line utility.

I used Ubuntu 11.04 and Windows 2008 R2 as DC.

To install the likewise-open package, open a terminal prompt and enter:

sudo apt-get install likewise-open
sudo domainjoin-cli join example.com Administrator
sudo /etc/init.d/likewise-open restart

For more information when joining a domain, use the --loglevel verbose or --advanced option of the domainjoin-cli utility:

sudo domainjoin-cli --loglevel verbose join example.com Administrator

My domain uses .local and it was not able to join the Domain. And I got erros like tis

Error: DNS_ERROR_BAD_PACKET [code 0x0000251e]

A bad packet was received from a DNS server. Potentially the requested address
does not exist.

or

Error: Lsass Error [code 0x00000043]
Network name not found.. Failure to lookup a domain name ending in ".local" may
be the result of configuring the local system's hostname resolution (or
equivalent) to use Multi-cast DNS. Please refer to the Likewise manual at

http://www.likewise.com/resources/documentation_library/manuals/open/likewise-op

en-guide.html#ConfigNsswitch for more information.

Then I found this:

When joining an Ubuntu Desktop workstation to a domain, you may need to edit /etc/nsswitch.conf if your AD domain uses the .local syntax. In order to join the domain the "mdns4" entry should be removed from the hosts option. For example:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

Change the above to:

hosts: files dns [NOTFOUND=return]

Then restart networking by entering:

sudo /etc/init.d/networking restart

You should now be able to join the Active Directory domain.

The domainjoin-cli utility can also be used to leave the domain. From a terminal:

sudo domainjoin-cli leave

To give Domain Admins sudo rights add this line into /etc/sudoers:

$ sudo nano /etc/sudoers
%YOURDOMAINNAME\\domain^admins ALL=(ALL) ALL

Then all domain admins that log into the Ubuntu machine will have sudo priveledges.
Of course you could use any group from your domain, not just the domain admins.
But pay attention to include the double "\\" after your domain
name and be sure to use the "^" to signify spaces in the group name.

There is also a youtube video which gives you a step by step guide to join an AD Domain with likewise open:

Likewise Open AD Join

 

Filed under: Ubuntu No Comments
2Apr/110

MacBook USB to serial adapter

Posted by marcel

I bought  a USB to Serial adapter which supports Mac OS X and Windows. It works perfect so I recommend this adapter for everyone who needs a serial port on his Mac.

DIGITUS USB to serial adapter, USB 2.0

Just download the driver from the DIGITUS Website and install it.

After a reboot you see the USB Serial device.

$ ls -la /dev/tty.usb*
crw-rw-rw-  1 root  wheel   10,   0  2 Apr 16:56 /dev/tty.usbserial-A800dJtP

To start the terminal with 19200 speed for example execute the following command:

$ screen /dev/tty.usbserial-A800dJtP 19200
Filed under: Uncategorized No Comments
28Mar/110

CPU and RAM info Linux

Posted by marcel

How do I check RAM speed and type  without opening my computer? I need to purchase RAM and I need to know the exact speed and type installed. How do I find out ram information from a shell prompt?

You need to use biosdecode command line utility. Dmidecode is a tool or dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. The output contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. This command works under Linux, UNIX and BSD computers.
Open a shell prompt and type the following command:

# sudo dmidecode --type 17 | more
dmidecode 2.7
SMBIOS 2.4 present.
Handle 0x0037, DMI type 17, 27 bytes.
Memory Device
Array Handle: 0x0035
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: None
Locator: XMM1
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: JEDEC ID:AD 00 00 00 00 00 00 00
Serial Number: 94120000
Asset Tag: Not Specified
Part Number: HYMP512U64CP8-Y5

And if you want to get informations about CPU and system architecture type the following command:

# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 15
model name    : Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz
stepping    : 6
cpu MHz        : 2400.163
cache size    : 4096 KB
fpu        : yes
fpu_exception    : yes
cpuid level    : 10
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips    : 4800.32
clflush size    : 64
cache_alignment    : 64
address sizes    : 36 bits physical, 48 bits virtual
power management:
Filed under: Uncategorized No Comments
25Mar/110

SparkleShare GitHub

Posted by marcel

Create a GitHub account (it's free!).

Create a repository at GitHub: click "Dashboard", then click "New Repository". Your repository name will later be referred to as your folder in Sparkleshare.

Start Sparkleshare, enter your name and e-Mail (if not already done) and click next. Then stop (do not go to the next step)!

hostname:~ username$ cd .ssh/
hostname:.ssh username$ cat id_rsa.pub

On the GitHub site go to Account Settings > SSH Public keys, click on "Add another public key" and copy the output of cat_id_ras.pub

Now you can go back to your SparkleShare Client and add the folder.

The folder Name is your GitHubUsername/Repositoriename

You can see your Repositeries on the GitHub website in the Dashboard Section.


Filed under: SparkleShare No Comments
25Mar/111

SparkleShare Mac OS X Client

Posted by marcel

Download and Install GIT for Mac OS X

Here you can download the latest version of GIT.

Download and install SparkleShare for Mac OS X

Here you finde the latest Version of SparkleShare. I used SparkleShare 0.2 RC1.

Symbolic link to git in /usr/bin/git.
$ which git /usr/local/bin/git $ sudo ln -s /usr/local/bin/git /usr/bin/git
Create SSH key and copy it to your Server
$ ssh-keygen -t rsa Generating public/private rsa key pair.
$ cd /Users/ladmin/.config/sparkleshare
$ cat sparkleshare.ladmin\@gmail.com.key.pub
$ ssh ladmin@192.168.1.22 ladmin@SparkleShare:~/.ssh
ladmin@SparkleShare:~$ cd /home/ladmin/.ssh ladmin@SparkleShare:~/.ssh
ladmin@SparkleShare:~/.ssh$ nano authorized_keys
Add Remote Folder

start your SparkleShare Client and add the Remote Folder:

Address: ssh://user@servername/
Folder Name: home/user/FolderName

The Folder Name is the path form the root directory of the Server.

25Mar/110

Install SparkleShare Client and Server on Ubuntu 10.10

Posted by marcel

 

SparkleShare is a syncing tool similar to Dropbox but SparkleShare allows you to use your own server to host your files (or some already existing servers). It uses GIT so if you delete/modify some files by accident, you can easily revert the changes.

SparkleShare has quite a few interesting features. Obviously the most important one is that you can use it with your own server. Also, it will be available for Linux, Windows and Mac OS X.

If you don't want to set up your own server, SparkleShare can be used with Github and Gitorious. These are project hosting solutions that provide free space if you work on Free and Open Source Software projects. Note that using these 2 services, all your synced files will be public!

Download SparkleShare

Download the last SparkleShare release here. I used SparkleShare 0.2 RC1.

Install the dependencies required to compile and run SparkleShare.
ladmin@client:~$ sudo apt-get install gtk-sharp2 mono-runtime mono-devel monodevelop libndesk-dbus1.0-cil-dev nant libnotify-cil-dev libgtk2.0-cil-dev libwebkit-cil-dev intltool libtool python-nautilus libndesk-dbus-glib1.0-cil-dev
Now we compile and install SparkleShare
ladmin@client:~$ cd Downloads/
ladmin@client:~/Downloads$ gunzip sparkleshare-0.2-rc1.tar.gz
ladmin@client:~/Downloads$ tar xfv sparkleshare-0.2-rc1.tar
ladmin@client:~/Downloads$ cd sparkleshare-0.2-rc1/
ladmin@client:~/Downloads/sparkleshare-0.2-rc1$ ./configure
ladmin@client:~/Downloads/sparkleshare-0.2-rc1$ sudo make
ladmin@client:~/Downloads/sparkleshare-0.2-rc1$ ./configure --prefix=/usr
ladmin@client:~/Downloads/sparkleshare-0.2-rc1$ sudo make install
Install GIT on the Client
ladmin@client:~/SparkleShare$ sudo apt-get install git
Start SparkleShare Client

Start your SparkleShare Client and Enter your Name and your e-Mail address:

Stop sparkleshare and add SSH key

Firstly install openssh-client on your computer nd create a SSH key. Do not enter a password for the key (just press Enter key).

ladmin@client:~$ sparkleshare stop
SparkleShare is not running.
ladmin@client:~$ sudo apt-get install openssh-client
ladmin@client:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ladmin/.ssh/id_rsa):
Created directory '/home/ladmin/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Copy the key to the server

ladmin@client:~$ ssh-copy-id ladmin@192.168.1.22
Now try logging into the machine, with "ssh 'ladmin@192.168.1.22'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.

Connect to the server, install GIT and set up the Sparkleshare GIT folder
ladmin@client:~$ ssh ladmin@192.168.1.22
ladmin@SparkleShare:~$ sudo apt-get install git-core ladmin@SparkleShare:~$ git init --bare SyncFolder.git
Initialized empty Git repository in /home/ladmin/SyncFolder.git/
Add Remote Folder on your Client

Filed under: SparkleShare No Comments
25Mar/110

Tunnel Web and DNS Traffic Over SSH

Posted by marcel

Here I describe a way to tunnel all of my web traffic over an encrypted SSH connection. If you travel a lot and use untrusted, insecure networks. This is a way to secure your  connection.

Creating the Tunnel

Creating this private connection you’ll need a remote SSH server to connect to. I connect to this tunnel using:

ssh -D 8080 -fN user@server

This creates a SOCKS compatible proxy, which is a requirement of the DNS forwarding. Other methods on the interwebs suggest using ssh -L or similar, which are not SOCKS compatible proxies.

Forwarding DNS

If you’d like to also forward your DNS requests, you’ll need to change a setting in Firefox. This can be done by accessing the address about:config, and entering this string into the configuration:

network.proxy.socks_remote_dns

Change this value to “true”.

Using the Tunnel

The last step is to configure your browser to use these new settings. In Firefox,  you can activate/toggle these settings via:

Edit > Preferences > Advanced > Network > Settings

Select “Manual Proxy Configuration” and add localhost to the “SOCKS Host:” field, followed by port 8080 (assuming you’ve used the port in the example above).

This will then forward your web traffic through the SSH tunnel and DNS requests will also be forwarded.

To deactivate the tunneling and use the local DNS again simply revert Step 3 back to “Direct Connection to the Internet”. And set your Proxy settings back to default.

Filed under: Tunneling No Comments