Skip to main content

Posts

Showing posts from March, 2014

Debian automated installation equivalent to kickstart on CentOS

In the RedHat world and its derivative, after installing a system you usually get a file named “/root/install.ks”. This is not the case in the Debian world, but I think I found a way to get a “dump” of the answaers I provided in the installation process: ### Preseeding other packages # Depending on what software you choose to install, or if things go wrong # during the installation process, it's possible that other questions may # be asked. You can preseed those too, of course. To get a list of every # possible question that could be asked during an install, do an # installation, and then run these commands: # debconf-get-selections --installer > file # debconf-get-selections >> file  I took that from https://www.debian.org/releases/stable/i386/apbs03.html.en https://wiki.debian.org/DebianInstaller/Preseed

Batch editing LDAP passwords

I need to implement a groupware for my organisation. In order to achieve this, I need to test each user login, and make some interaction tests, espacially for free/busy features of the calendar. The authencation is against an LDAP server. I need to copy the LDAP server and batch modify the passwords to be all the same in my test environment. In order to achieve this, I need to list all “dn” and modify the “userPassword” value. This is done in two steps: ldapsearch -w 'admin-password' \ -x -D 'cn=admin,dc=rktmb,dc=org' \ -b 'ou=Users,dc=rktmb,dc=org' \ -s one \ -H ldap://localhost dn To list the users   ldapsearch -w 'admin-password' \ -x -D 'cn=admin,dc=rktmb,dc=org' \ -b 'ou=Users,dc=rktmb,dc=org' \ -s one \ -H ldap://localhost dn \ | awk '/^dn: /{print $0"\nchangetype: modify