Category Archives: Uncategorized

Samba domain migration (to a new machine)

samba

This project involved migrating a samba domain from an old server to a new server (different machine, different hardware), versions below

RedHat ES 3 –old server
Ubuntu 11.04 –new server

Samba 3.0.9 –old version
Samba 3.5.8 –new version

Mostly I used these instructions:
http://www.samba.org/samba/docs/man/Samba-Guide/upgrades.html#id2600749
See the –“Replacing a Domain Controller”–

Get the SID: (security identifier for the domain)

Get the SID from the old machine:
net getlocalsid > /etc/samba/my-local-SID

The contents of the file will look like this
S-1-5-21-726309263-4128913605-1168186429

Restore the SID to the new machine:
net setlocalsid S-1-5-21-726309263-4128913605-1168186429

Files copied over from the old machine:
/etc/passwd
/etc/shadow
in the password and shadow make sure to get the user accounts and machine accounts, the machine accounts end with a $ e.g. “computername$”
/etc/group –I don’t think this this was necessary, but there may be groups you want to move

It isn’t necessary to use the entire files;
I copied the lines for users and machine accounts from old shadow and passwd and put them into the existing file on the new server. You may have to go to each workstation on the domain to get the machine names.

Make sure the hostname of the new machine matches the old one and there is a mapping in /etc/hosts for it if you start getting weird errors after you change the hostname.

IP address doesn’t matter, it can be different.

Samba files that need to be copied over;
smb.conf –main samba config file
secrets.tdb –stores machine account passwords
smbpasswd –stores user account and passwords, needs to be converted to tdbsam format “passdb.tdb”

I used pdbedit to convert the smbpasswd to passdb.tdb adjust your directories as needed;

pdbedit -i smbpasswd:/var/lib/samba/smbpasswd -e tdbsam:/var/lib/samba/passdb.tdb

To view what users and machine accounts made it to the new passdb.tdb file you can run the command. (The file is database file and cannot be viewed directly)
pdbedit -L

Errors you may get:

If you get these errors below:

idmap will be unable to map foreign SIDs: NT_STATUS_UNSUCCESSFUL

or

winbindd/idmap_tdb.c:341(idmap_tdb_alloc_init)
idmap will be unable to map foreign SIDs: NT_STATUS_UNSUCCESSFUL
winbindd/idmap.c:599(idmap_alloc_init)
ERROR: Initialization failed for alloc backend, deferred!
winbindd/idmap.c:201(smb_register_idmap_alloc)
idmap_alloc module tdb already registered!
winbindd/idmap.c:149(smb_register_idmap)
Idmap module passdb already registered!
winbindd/idmap.c:149(smb_register_idmap)
Idmap module nss already registered!
winbindd/idmap_tdb.c:214(idmap_tdb_load_ranges)
idmap uid missing

add;

idmap uid = 10000-15000
idmap gid = 10000-15000

to your smb.conf file and restart samba

I believe this sets the user and group Id mapping for machine ID’s

A problem I ran into:
The problem I ran into was finding the correct samba files to move over, for some reason there was a couple locations where the secrets.tdb and other files were, and I moved over the wrong files.

Problems after iOS update 4.3

A friend of mine started having weird issues with his iPhone 4 after updating to 4.3. Touch screen lags, freeze ups, home button would cause apps to start shaking, and screen became unresponsive. Also, when clicking on the keyboard, sometimes the alternate letters would come up. He tried restoring the phone several times but still the problem remained. We stumbled onto a solution late into the 3rd hour.

Goto, Settings > General > Reset > (touch) Reset All Settings.

This leaves your data intact but resets the phone to defauts. Ringtones, email, sms preferences. etc..

Hope this saves you some time.

Looking for a good app to store passwords on your iphone?

I was.. and looked into several apps, here’s the roundup;

Private Info
My Eyes Only
Data Vault Password Manager
iAccounts
mSecure
Strip

Criteria:
I wanted to find an app that had not just itunes backup capabilities, but a way to backup data to the desktop. Some of the apps offered free Computer software, for others it was a separate purchase. I think the coolest were the apps that have a built in web server, and didn’t need a computer counterpart software in order to get a backup. Also a way to export data as a .csv file.

Private info:
This is a really cool app, not only does it store usernames and passwords but, it stores photos and videos. This seems like the most fun app to use. The color scheme is black, it may be a little hard on the eyes.

My Eyes Only:
Interesting app, with good reviews. It saves each entry as the visual item that it is. For example if you have a checking account; that entry will look like a check, or for a credit card it will look like credit card. Neat idea, but for me I find it too visually distracting. I just want to see my data. It doesn’t need to look like the card it’s printed on.

Data Vault Password Manager:
Another app with good reviews. This app puts a very washed out image as the background behind the entries. I find this visually distracting and simply because of this would not select the app. It also has a confusing looking folder structure, sort of a, outline format to it.

iAccounts:
I almost purchased this app, it’s very clean, well laid out and easy to use. Problem for me was that the structure of the “notes” was bad, and editing a note was confusing and it wouldn’t save the edit without going through a slight dance.

mSecure:
In my opinion a great app at a reasonable price. I’m still trying to find a reason not to get this app. What I’m not sure about is the way it displays the list of records. It gives you a little snapshot of each record. Maybe the developer is thinking this could save time. I think in some cases this would be useful, but mostly I think it will be hard to spot records while scrolling.

Strip:
A great app with a really bad name.. If you look up the app in the app store you will get some racy stuff. Don’t let that stop you. Strip stands for “Secure Tool for Recalling Important Passwords”. This is the app I think I’ll purchase. Clean design, very easy to navigate, easily make folders for records. Great notes section with full screen view and easy editing. They also offer a free desktop application to backup data. .csv data export is also supported.