Automating slapconfig


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automating slapconfig
# 1  
Old 11-14-2008
Automating slapconfig

I'm a New Media student working at a small media/tech company that's part of the New Media department at my school. I'm working on a MySQL/LDAP-based system for keeping track of users of our Mac file server. I'm trying to write a script that backs up our LDAP database using the slapconfig command with the -backupdb flag. When I run it, it prompts me for a password for the archive that it's going to create. I need this to run in an automated script, so it can't have user input. How can I send the password directly to slapconfig? I've tried using expect but I don't think it's the right tool for the job. The man page for slapconfig doesn't have anything.

My shell experience is pretty much limited to this project. I had someone who was mentoring me and helping out, but he's at a different campus this year and I can't get in touch with him. Any ideas?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automating Linux Script

I want to automate the creation or processing of the following: Directory and subdirectory creation for your scenario company Files in each of the directories Symbolic links from 2 subdirectories to their parent directories Setting appropriate file permissions for the directories and... (1 Reply)
Discussion started by: ekglag2
1 Replies

2. UNIX for Dummies Questions & Answers

Automating the FTP get

Hi , I want to pull files from ftp monthly once . The files in ftp has a something like 292_fileto_pull and next month it will be 293_fileto_pull for each month the number keeps increasing. i thought in my script if i can use date and increment the number by it mget *_292_fileto_pull i... (2 Replies)
Discussion started by: vikatakavi
2 Replies

3. Shell Programming and Scripting

Automating

Hi All, I have a shell script that is integrated with a fault management system. It periodically monitors the system and raises an alarm. This script has different functions and it accepts input from us on the console. Is there any way to invoke it using a shell script ? Please advise. ... (2 Replies)
Discussion started by: praviper
2 Replies

4. UNIX for Dummies Questions & Answers

Automating a process

Could any one tell me , how to start a thread here, i just searching for so long. sorry to post in irrelavent here ---------- Post updated at 08:19 AM ---------- Previous update was at 08:00 AM ---------- Hi, I got a requirement to automate the process. We have SLA files, there are... (1 Reply)
Discussion started by: afahmed
1 Replies

5. Shell Programming and Scripting

Automating The process

Hi Guru's, I am trying to write a scripts that will automate my image provisoining process. Scenario: I have Linux Image Hosted on cloud which needs to be provisoned before it can be used. Currently we log onto the image through the putty on windows and connect to linux instance. I... (3 Replies)
Discussion started by: taqvia
3 Replies

6. Shell Programming and Scripting

Automating scsudo

Solaris... I need to automate running of scsudo from another script. However, I've determined that scsudo reads the password from /dev/tty rather than STDIN when the Password prompt appears. I don't have 'expect' or equivalents available - can I automate sending the correct password when... (1 Reply)
Discussion started by: JerryHone
1 Replies

7. UNIX for Advanced & Expert Users

Automating Autosys

Can multiple Autosys jobs be changed with the same parameter at the same time? what scripting do I need? (0 Replies)
Discussion started by: LilyClaro
0 Replies

8. Shell Programming and Scripting

Automating sendmail

Hi there, I am trying to send emails from within a shell script, and I need help. Also I am trying to send attachments from within a shell script. I am using sendmail. Regards (3 Replies)
Discussion started by: JimJim
3 Replies

9. Shell Programming and Scripting

automating password ?

Hi all, I want to write a script which logs into a database (DB2). To do this i need to have a password. This will be done lots and lots of times, so i need to modify the script to automate the response to the password request. How do i this, because at present i do the following: db2 connect... (3 Replies)
Discussion started by: Liamo
3 Replies
Login or Register to Ask a Question
slapconfig(8)						    BSD System Manager's Manual 					     slapconfig(8)

NAME
slapconfig -- tool to configure slapd and related daemons SYNOPSIS
slapconfig command [command-options] [-q] DESCRIPTION
slapconfig is a utility for configuring slapd. It must be run by root. USAGE
-q suppress prompts. Queries -defaultsuffix Returns the default suffix which is based on the machine's DNS name, or hostname if DNS is not available. -getclientconfig Returns whether this machine is an LDAP client, not a client, or advanced. -getldapconfig Returns the LDAP server settings. -getmacosxodpolicy Returns a property list containing the directory binding settings. -getmasterconfig Returns the list of replicas and replication interval. -getpasswordserveraddress Returns the IP address of the default password server. -getreplicaconfig Returns the master address and last update date. -getstyle Returns whether configuration is master, replica, client, or standalone. -help Print usage information. -ver Displays version information. Setup -addreplica [--serverID num] [--guid D1C9C376-D940-404D-9941-7AD24E6A37DA] <replica-address> Adds a replication link with the specified server. The serverID and GUID of the remote machine you'd like to replicate with. The serverID and GUID can be viewed in the target machine's computer record. Replication links are unidirectional, the corresponding command should be run on the target server as well to get full replication working. Caution should be exercised with this command, it is best to avoid repli- cation loops. -changeip <old-ip> <new-ip> [<old-host> <new-host>] Updates configuration records and files to contain the new host information. It does not change the IP address in Network preferences. -createldapmasterandadmin [--allow_local_realm] [--certAuthName <Cert Auth Name>] [--certAdminEmail <Cert Admin Email>] [--certOrgName <Cert Org Name>] <new-admin> <new-fullname> <new-uid> [<search base suffix> [<realm>]] Creates a new master LDAP server. Copies the root account to the new master domain. Creates a new directory node administrator. -createreplica [--certAdminEmail <Cert Admin Email>] <master IP or name> <admin user> Create a new replica from an existing LDAP master. -createrootcertauthority <Certificate Authority Name> <Certificate Authority Admin Email> <Certificate Authority Organization Name> Create a CA on the OD master. -destroyldapserver [diradmin] Turns off the LDAP server and deletes its database. The optional argument of the diradmin account name will then prompt for the diradmin password and will inform all replication peers of the server's destruction. -promotereplica <admin-user> <archive-path> Converts an existing replica into a master using the current database. Path to an archive from the master can given in order to add the root CA's keys to the promoted master. -removereplica [--guid D1C9C376-D940-404D-9941-7AD24E6A37DA] -<replica-address> Removes a replication link with the specified server. The GUID of the remote server being removed should be passed in with the --guid option. Replication links are unidirectional, so the corresponding command should be run on the target server to remove the other half of an existing replication link. -setclient Configures the machine to bind using DHCP if it is not already a client. -setldapconfig [-maxresults <maximum search results>] [-searchtimeout timeout] [-ssl on|off] [-sslidentity <identity name>] [-sslserialnumber <certificate serial number>] [-sslsha1fingerprint <certificate sha1 fingerprint as a hex encoded colon separated string>] Applies the specified settings and restarts slapd. Settings not specified are unchanged. -setstandalone Configures the machine to only use the local directory. -setmacosxodpolicy [-binding [disabled|enabled|required]] [-cleartext [blocked|allowed]] [-encrypt [yes|no]] [-sign [yes|no]] [-clientcaching [yes|no]] [-man-in-middle [blocked|allowed]] Sets directory binding options. -startldapserver Configures launchd to run slapd. -stopldapserver Configures launchd not to run slapd. -updateaddresses Merges new interfaces into the list of LDAP replicas. Password Server -startpasswordserver Sets up a launchd plist file and starts the password server. -stoppasswordserver Sets the launchd plist file to be disabled and stops the password server. Runtime -enableslapdlog Turns on the LDAP server logging to /var/log/slapd.log. -setfullsyncmode [yes | no] The LDAP server defaults to running in a "full sync mode" to ensure database transactions are fully flushed to disk. This improves data integrity in the event of a power loss, but can result in slower performance when importing large datasets. Setting this option to no disables this functionality temporarily in order to speed up large imports. After the import has been completed, this option should be set back to yes for normal operation. Backup and Restore -backupdb <archive-path> Creates an archive containing the LDAP, Password Server and Kerberos databases. It also contains Certificate Authority related data. -restoredb <archive-path> Restores a directory to the backed-up state. ENVIRONMENT
The environment variable SSOUtilDebugLevel can be set to change the verbosity of the log. Valid values are [0-9]. The default value is 1. FILES
/usr/sbin/slapconfig SEE ALSO
DirectoryService(1), slapd(8) MacOSX June 1, 2019 MacOSX