Software: Apache/2.0.54 (Fedora). PHP/5.0.4 uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/share/doc/samba-3.0.23a/LDAP/smbldap-tools-0.9.2/doc/html/ drwxr-xr-x |
Viewing file: Select action/file-type: ![]() ![]() ![]() 4 Using the scripts4.1 Initial directory's populationYou can initialize the LDAP directory using the smbldap-populate script. To do that, the account defined in the /etc/opt/IDEALX/smbldap-tools/smbldap_bind.conf to access the master directory must must be the manager account defined in the directory configuration. On RedHat system, this file is /etc/openldap/slapd.conf and the account is defined withrootdn "cn=Manager,dc=idealx,dc=com" rootpw secretThe smbldap_bind.conf file must then be configured so that the parameters to connect to the master LDAP server match the previous ones: masterDN="cn=Manager,dc=idealx,dc=com" masterPw="secret"Available options for this script are summarized in the table 1: In the more general case, to set up your directory, simply use the following command: [root@etoile root]# smbldap-populate Using builtin directory structure adding new entry: dc=idealx,dc=com adding new entry: ou=Users,dc=idealx,dc=com adding new entry: ou=Groups,dc=idealx,dc=com adding new entry: ou=Computers,dc=idealx,dc=com adding new entry: ou=Idmap,dc=idealx,dc=org adding new entry: cn=NextFreeUnixId,dc=idealx,dc=org adding new entry: uid=Administrator,ou=Users,dc=idealx,dc=com adding new entry: uid=nobody,ou=Users,dc=idealx,dc=com adding new entry: cn=Domain Admins,ou=Groups,dc=idealx,dc=com adding new entry: cn=Domain Users,ou=Groups,dc=idealx,dc=com adding new entry: cn=Domain Guests,ou=Groups,dc=idealx,dc=com adding new entry: cn=Print Operators,ou=Groups,dc=idealx,dc=com adding new entry: cn=Backup Operators,ou=Groups,dc=idealx,dc=com adding new entry: cn=Replicator,ou=Groups,dc=idealx,dc=com adding new entry: cn=Domain Computers,ou=Groups,dc=idealx,dc=comAfter this step, if you don't want to use the cn=Manager,dc=idealx,dc=com account anymore, you can create a dedicated account for Samba and the smbldap-tools. See section 8.2 for more details. The cn=NextFreeUnixId,dc=idealx,dc=org entry is only used to defined the next uidNumber and gidNumber available for creating new users and groups. The default values for those numbers are 1000. You can change it with the -u and -g option. For example, if you want the first available value for uidNumber and gidNumber to be set to 1500, you can use the following command : smbldap-populate -u 1550 -g 1500 4.2 User management4.2.1 Adding a userTo add a user, use the smbldap-useradd script. Available options are summarized in the table 2. If applicable, default values are mentionned in the third column. Any string beginning with a $ symbol refers to a parameter defined in the /etc/opt/IDEALX/smbldap-tools/smbldap.conf configuration file.For example, if you want to add a user named user_admin and who :
smbldap-useradd -a -G 512 -m -s /bin/false -d /dev/null -F "" -P user_admin 4.2.2 Removing a userTo remove a user account, use the smbldap-userdel script. Available options areFor example, if you want to remove the user1 account from the LDAP directory, and if you also want to delete his home directory, use the following command : smbldap-userdel -r user1Note: '-r' is dangerous as it may delete precious and unbackuped data, please be careful. 4.2.3 Modifying a userTo modify a user account, use the smbldap-usermod script. Availables options are listed in the table 4.You can also use the smbldap-userinfo script to update user's information. This script can also be used by users themselves to update their own informations listed in the tables 5 (adequats ACL must be set in the directory server). Available options are :
4.3 Group management4.3.1 Adding a groupTo add a new group in the LDAP directory, use the smbldap-groupadd script. Available options are listed in the table 6.
4.3.2 Removing a groupTo remove the group named group1, just use the following command :smbldap-userdel group1 4.4 Adding a interdomain trust accountTo add an interdomain trust account to the primary controller trust-pdc, use the -i option of smbldap-useradd as follows :[root@etoile root]# smbldap-useradd -i trust-pdc New password : ******* Retype new password : *******The script will terminate asking for a password for this trust account. The account will be created in the directory branch where all computer accounts are stored (ou=Computers by default). The only two particularities of this account are that you are setting a password for this account, and the flags of this account are [I ]. ![]() ![]() ![]() |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0036 ]-- |