tag:blogger.com,1999:blog-75628505506123054272009-07-02T13:09:47.770+02:00Bricks of the knowledge wallTips for Unix/Linux administrators.
Here I publish short guides on frequent sysadmin's tasks, benchmarks ...nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.comBlogger42125tag:blogger.com,1999:blog-7562850550612305427.post-58169049259836370512009-07-02T13:08:00.002+02:002009-07-02T13:09:47.777+02:00Ssh and nscdStrange behavior of sshd on Solaris 10:<br /><br />If you use ldap as name service on Solaris 10 then you have use nscd daemon, ssh won't permit you log into without it.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-5816904925983637051?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-68652793243079969202009-06-30T10:02:00.004+02:002009-06-30T11:26:07.821+02:00How to examine content of certificates database<span style="font-size:100%;"><span style="font-family: arial;font-size:100%;" >/usr/sfw/bin/certutil -L -d /var/ldap/ - lists certificates in Solaris ldap client database</span><br /></span><pre class="jive-pre"><code class="jive-code jive-java"><span style="font-family: arial;font-size:100%;" >certutil -L -d /var/ldap/ -n certname -shows information about a certificate</span><br /></code></pre><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-6865279324307996920?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-44136416690788938422009-06-29T14:21:00.004+02:002009-06-29T14:32:36.281+02:00Sun Directory Server backup scriptsSun Directory Server has quite good tools for backups. But if you want them to perform automaticaly you will have to create some cron scripts:<br /><br /><span style="font-weight: bold;">$cat backup.sh</span><br /><br /><span style="font-style: italic;">#!/usr/bin/bash</span><br /><span style="font-style: italic;">DSADM=/opt/SUNWdsee/ds6/bin/dsadm</span><br /><span style="font-style: italic;">INSTANCE_NAME=instancename</span><br /><span style="font-style: italic;">INSTANCE_HOME=/var/spool/ldap_instances</span><br /><span style="font-style: italic;">INSTANCE_PATH=$INSTANCE_HOME/$INSTANCE_NAME</span><br /><span style="font-style: italic;">BACKUP_TIMESTAMP=`/usr/bin/date '+%H:%M:%S_%d:%m:%y'`</span><br /><span style="font-style: italic;">BACKUP_DIR=/var/backup/$INSTANCE_NAME/$BACKUP_TIMESTAMP</span><br /><span style="font-style: italic;">BACKUP_DIR_BINARY_DATA=/var/backup/$INSTANCE_NAME/$BACKUP_TIMESTAMP/binary</span><br /><br /><span style="font-style: italic;">mkdir $BACKUP_DIR&&echo "*BACKUP DIRECTORY CREATED"</span><br /><span style="font-style: italic;">$DSADM stop $INSTANCE_PATH&&echo "*LDAP instance $INSTANCE_NAME - stopped"</span><br /><span style="font-style: italic;">$DSADM backup $INSTANCE_PATH $BACKUP_DIR_BINARY_DATA 2>&1 >/dev/null&&echo "*Binary data - backuped"</span><br /><span style="font-style: italic;">cp -r $INSTANCE_PATH/config $BACKUP_DIR&&echo "* Configuration data 1/2 copied"</span><br /><span style="font-style: italic;">cp -r $INSTANCE_PATH/alias $BACKUP_DIR/config&&echo "* Configuration data 2/2 copied"</span><br /><span style="font-style: italic;">$DSADM start $INSTANCE_PATH&&echo "*LDAP instance $INSTANCE_NAME - started"</span><br /><span style="font-style: italic;">echo "Saved data is under $BACKUP_DIR"</span><br /><br /><span style="font-weight: bold;">$cat restore.sh</span>(don't put into crontab :)):<br /><br /><span style="font-style: italic;">#!/usr/bin/bash</span><br /><br /><span style="font-style: italic;">DSADM=/opt/SUNWdsee/ds6/bin/dsadm</span><br /><span style="font-style: italic;">SOURCE=$1</span><br /><span style="font-style: italic;">TARGET=$2</span><br /><br /><span style="font-style: italic;">$DSADM stop $TARGET&& echo "Instance $TARGET stopped"</span><br /><span style="font-style: italic;">cp -r $SOURCE/config/alias/ $TARGET/config/&&echo "Config Data 1/2 restored"</span><br /><span style="font-style: italic;">cp -r $SOURCE/config/ $TARGET&& echo "Config Data 2/2 restored"</span><br /><span style="font-style: italic;">$DSADM restore $TARGET $SOURCE/binary/ && echo "Binary data restored"</span><br /><span style="font-style: italic;">$DSADM start $TARGET&& echo "Instance $TARGET started"</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-4413641669078893842?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-47323407796067547782009-06-23T14:54:00.001+02:002009-06-23T14:56:45.599+02:00Solaris native LDAP client(Password policies)1. Password policies in Sun Directory Server are applied automaticaly (Default global password policy ) <br />2. It's easy to create custom policies and apply them to different ldap trees(passwordpolicysubentry: cn=PolicyName,dc=test,dc=com)<br />3. In other words passwords policies works fine through LDAP, but user will see onle one reason of declining his password operation - "permission denied".<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-4732340779606754778?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-41929551919372817052009-06-23T14:49:00.003+02:002009-06-23T14:57:43.033+02:00Solaris native LDAP client(using netgroups)If you want to define list of users and groups which are permited to use your exact host you need "netgroup" feature.<br /><br />To use it in Solaris 10 it is necessary to:<br />1. Use "compat" in /etc/nsswitch.conf <br /><br /><span style="font-style: italic;">#passwd: files ldap </span><br /><span style="font-style: italic;">#group: files ldap </span><br /><span style="font-style: italic;"> </span><br /><span style="font-style: italic;">passwd: compat </span><br /><span style="font-style: italic;">passwd_compat: ldap </span><br /><span style="font-style: italic;"> </span><br /><span style="font-style: italic;">group: compat </span><br /><span style="font-style: italic;">group_compat: ldap </span><br /><span style="font-style: italic;"> </span><br /><span style="font-style: italic;">2. Have installed proper pam modules (out of box on Solaris 10) and proper pam.conf </span><br /><span style="font-style: italic;"> </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># Authentication management </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># login service (explicit because of pam_dial_auth) </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">login auth requisite pam_authtok_get.so.1 </span><br /><span style="font-style: italic;">login auth required pam_dhkeys.so.1 </span><br /><span style="font-style: italic;">login auth required pam_unix_cred.so.1 </span><br /><span style="font-style: italic;">login auth required pam_dial_auth.so.1 </span><br /><span style="font-style: italic;">login auth binding pam_unix_auth.so.1 server_policy </span><br /><span style="font-style: italic;">login auth required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># rlogin service (explicit because of pam_rhost_auth) </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># rlogin auth sufficient pam_rhosts_auth.so.1 </span><br /><span style="font-style: italic;">rlogin auth requisite pam_authtok_get.so.1 </span><br /><span style="font-style: italic;">rlogin auth required pam_dhkeys.so.1 </span><br /><span style="font-style: italic;">rlogin auth required pam_unix_cred.so.1 </span><br /><span style="font-style: italic;">rlogin auth binding pam_unix_auth.so.1 server_policy </span><br /><span style="font-style: italic;">rlogin auth required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># rsh service (explicit because of pam_rhost_auth, </span><br /><span style="font-style: italic;"># and pam_unix_auth for meaningful pam_setcred) </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># rsh auth sufficient pam_rhosts_auth.so.1 </span><br /><span style="font-style: italic;">rsh auth required pam_unix_cred.so.1 </span><br /><span style="font-style: italic;">rsh auth binding pam_unix_auth.so.1 server_policy </span><br /><span style="font-style: italic;">rsh auth required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># PPP service (explicit because of pam_dial_auth) </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">ppp auth requisite pam_authtok_get.so.1 </span><br /><span style="font-style: italic;">ppp auth required pam_dhkeys.so.1 </span><br /><span style="font-style: italic;">ppp auth required pam_dial_auth.so.1 </span><br /><span style="font-style: italic;">ppp auth binding pam_unix_auth.so.1 server_policy </span><br /><span style="font-style: italic;">ppp auth required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># Default definitions for Authentication management </span><br /><span style="font-style: italic;"># Used when service name is not explicitly mentioned for authentication </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">other auth requisite pam_authtok_get.so.1 </span><br /><span style="font-style: italic;">other auth required pam_dhkeys.so.1 </span><br /><span style="font-style: italic;">other auth required pam_unix_cred.so.1 </span><br /><span style="font-style: italic;">other auth binding pam_unix_auth.so.1 server_policy </span><br /><span style="font-style: italic;">other auth required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># passwd command (explicit because of a different authentication module) </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">passwd auth binding pam_passwd_auth.so.1 server_policy </span><br /><span style="font-style: italic;">passwd auth required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># cron service (explicit because of non-usage of pam_roles.so.1) </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">cron account required pam_unix_account.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># Default definition for Account management </span><br /><span style="font-style: italic;"># Used when service name is not explicitly mentioned for account management </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">other account requisite pam_roles.so.1 </span><br /><span style="font-style: italic;">other account binding pam_unix_account.so.1 </span><br /><span style="font-style: italic;">other account required pam_ldap.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># Default definition for Session management </span><br /><span style="font-style: italic;"># Used when service name is not explicitly mentioned for session management </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">other session required pam_unix_session.so.1 </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># Default definition for Password management </span><br /><span style="font-style: italic;"># Used when service name is not explicitly mentioned for password management </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;">other password required pam_dhkeys.so.1 </span><br /><span style="font-style: italic;">other password requisite pam_authtok_get.so.1 </span><br /><span style="font-style: italic;">other password requisite pam_authtok_check.so.1 </span><br /><span style="font-style: italic;">other password required pam_authtok_store.so.1 server_policy </span><br /><span style="font-style: italic;"># </span><br /><span style="font-style: italic;"># Support for Kerberos V5 authentication and example configurations can </span><br /><span style="font-style: italic;"># be found in the pam_krb5(5) man page under the "EXAMPLES" section. </span><br /><span style="font-style: italic;"># </span><br /><br />3. Proper content in LDAP<br /><span style="font-weight: bold;">ldapaddent -a simple -D "cn=Directory Manager" -f /etc/netgroup netgroup </span><br /><br />4. You have to attach groupname to the end of your passwd and shadow files:<br /><span style="font-weight: bold;">Echo "+@groupname:x:::::" >>/etc/passwd</span><br /><span style="font-weight: bold;">pwconv</span><br /><br />5. Test if your netgroups and users works properly:<br /><span style="font-weight: bold;">getent passwd </span><br /><span style="font-weight: bold;">getent shadow </span><br /><span style="font-weight: bold;"> </span><br />6. You will not be able to use "compat" if havn't defined groups, if don't need them use simple "ldap" declaration in nsswitch.conf!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-4192955191937281705?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-75142179608043710642009-06-17T14:41:00.000+02:002009-06-17T14:42:21.448+02:00Less known Solaris featuresA great <a href="http://www.c0t0d0s0.org/lksfbook/lksfbook_13062009.pdf">book</a> about less known Solaris features<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-7514217960804371064?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-80198671743554315212009-06-17T13:58:00.002+02:002009-06-17T14:01:51.783+02:00Some tips using ssl with Sun Directory Server 6.3.1To make native ldap client using ssl with directory server perform following steps:<br /><br />1. On directory server create/add own selfsigned/CAsigned certificates.<br />Don't use default ones(which are created during install), they are created with not FQDN.<br /><br />2. Configure directory server(s) use them by default.<br /><br />3. Export certificates in "der" format from each node you plan connect to(name them equal to domain names of servers):<br /><span style="font-weight: bold;">/opt/SUNWdsee/ds6/bin/dsadm show-cert -F der -o CertName ldap_instance_name/logs/access "CertName"</span><br /><br />4. Copy exported certificates to one place where you will import them into Solaris ldapclient's certificate database (in our case it's "cert_database").<br /><br />5. Create certificate database:<br /><span style="font-weight: bold;">/usr/sfw/bin/certutil -N -d ./cert_database</span><br /><br />6. Import certificate(s):<br /><span style="font-weight: bold;">/usr/sfw/bin/certutil -A -i ./CertName -n CertName -t CT -d ./cert_database</span><br /><br />7. Distribute this database among all Solaris hosts which will use ldap, put it at /var/ldap directory.<br /><br />8. Use ldapclient init ..... on each host.<br /><br />9. Check everything works fine(on server):<br /><span style="font-weight: bold;">tail -f ldap_instance_name/logs/access</span><br /><br /><br />That's all!<br /><br />P.S: If you want secure communication in Directory Server replications, exchange certificates among each node also!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-8019867174355431521?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-37110339309686728452009-06-16T13:38:00.002+02:002009-06-16T13:38:33.923+02:00Webconsole on all interfacesOf cource, it's not a good idea to do it on production(for security reasons ;)),<br />but for testing purposes<br />#svccfg -s svc:/system/webconsole setprop options/tcp_listen = true<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-3711033930968672845?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-82695559116420528952009-06-11T11:00:00.002+02:002009-06-12T13:24:23.519+02:00Export of rbac databases to ldapBeter use<br /><span style="font-weight: bold;"><br />#/usr/sadm/bin/smattrpop -c -f -v -s file:/servername -t ldap:/servername/dc=example,dc=com all</span><br /><br />to export RBAC files to LDAP server.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-8269555911642052895?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-6760889312619369882009-06-05T10:13:00.002+02:002009-06-05T10:14:13.861+02:00Importing Projects database to LDAP<h4 id="title-ID0E2SAG" class="docSection2Title"><tt>projects</tt> Database</h4> <p class="docText">The default projects defined in <tt>/etc/project</tt> can be expressed in LDIF like this:</p> <div class="docText"><pre>dn: solarisprojectname=system,ou=projects,dc=example,dc=com<br />objectClass: top<br />objectClass: solarisproject<br />SolarisProjectID: 0<br />SolarisProjectName: system<br /><br />dn: solarisprojectname=user.root,ou=projects,dc=example,dc=com<br />objectClass: top<br />objectClass: solarisproject<br />SolarisProjectID: 1<br />SolarisProjectName: user.root<br /><br />dn: solarisprojectname=noproject,ou=projects,dc=example,dc=com<br />objectClass: top<br />objectClass: solarisproject<br />SolarisProjectID: 2<br />SolarisProjectName: noproject<br /><br />dn: solarisprojectname=default,ou=projects,dc=example,dc=com<br />objectClass: top<br />objectClass: solarisproject<br />SolarisProjectID: 3<br />SolarisProjectName: default<br /></pre></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-676088931261936988?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-3740042931631335712009-06-05T09:48:00.001+02:002009-06-05T09:50:12.495+02:00Files you have to import to LDAP for Solaris client proper workldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/aliases aliases<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/hosts ipnodes<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/rpc rpc<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/hosts hosts<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/protocols protocols<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/networks networks<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/services services<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/group group<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/netmasks netmasks<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/publickey publickey<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/aliases aliases<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/auto_home auto_home<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/auto_master auto_master<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/security/tsol/tnrhdb tnrhdb<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/security/tsol/tnrhtp tnrhtp<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/security/audit_user audit_user<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/security/auth_attr auth_attr<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/security/exec_attr exec_attr<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/security/prof_attr prof_attr<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/user_attr user_attr<br /> ldapaddent -D "cn=Directory Manager" -w your_pass -f /etc/netmasks netmasks<br /> ldapaddent -p -D "cn=Directory Manager" -w your_pass -f /etc/passwd passwd<br /> ldapaddent -p -D "cn=Directory Manager" -w your_pass -f /etc/shadow shadow<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-374004293163133571?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-92184864703229173412009-06-04T13:49:00.002+02:002009-06-04T13:50:56.495+02:00Solaris LDAP client setup. part 2(management interface)Now we have an environment which uses LDAP as Name Service.<br />And the question of proper data management in LDAP arises.<br />We can use: <ol type="1"> <li value="1" type="1">Sun Directory Server Webconsole Interface which is delivered with Directory server (which is a bad idea, you'll have to edit raw data) . </li><li value="2" type="1">Use SMC (Solaris Management Interface) related tools. (<a href="http://docs.sun.com/app/docs/doc/819-7309/confsys-10?l=ru&a=view&q=smc+ldap">Howto</a>) </li></ol><br />Problems which took a lot of time:<br />When run: <ul> <li><b>#/usr/sadm/bin/smrole list -D ldap:/solaris10core.example.test/</b><b><u>dc=example,dc=test</u></b> -- Use LDAP form of domain declaration(dc=,dc=), there are no word in manuals about it. </li><li><b>#/usr/sadm/bin/dtsetup scopes</b> - be careful with domain name resolving for all domains this command shows. </li><li>Better run SMC in environment with END user cluster. </li></ul><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-9218486470322917341?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-69959290050156801312009-05-28T16:49:00.004+02:002009-06-04T13:30:37.161+02:00Solaris LDAP client setup. part 1Very simplified you can setup Solaris ldap user authentication in such steps.<br /><br />On server side:<br /><b><a href="http://docs.sun.com/app/docs/doc/816-4556/sundssetup-13?l=ru&a=view">#/usr/lib/ldap/idsconfig</a></b><br />This tool inserts a lot of stuff in LDAP server(schemas, creates items tree, access creds, indexes search atributes etc.)<br /><br />On client:<br /><b>#ldapclient init -a profileName=prfilename server_ip_address</b><br /><b>#ldapaddent -a simple -p -D "cn=Directory Manager" -f /etc/passwd passwd</b><br /><b>#ldapaddent -a simple -p -D "cn=Directory Manager" -f /etc/group group</b><br />etc. more information in ldapaddent documentation<br />............<br /><br />Everything goes fine, but passwords are not imported to ldap, to fix it you have manualy change password through Directory Server Control Console for each user. It actually can be coused by the fact my test environment used unencrypted communication between ldap server and client!<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-6995929005015680131?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-57879593609325680652009-05-28T08:31:00.001+02:002009-05-28T16:50:27.795+02:00Postinstall configuration of Solaris zoneWhen you have just installed a Solaris zone, you have to configure it to start working.<BR> You can do it with <B>zlogin -C</B> command . The one of the first questions it asks is about terminal type you are using.<BR> And here is some trick. Even if you do this from ssh session and $TERM variable is <B>xterm </B>you have to choose VT100 terminal.<BR> In other case it hangs! <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-5787959360932568065?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-88856955260768184192009-05-27T16:43:00.002+02:002009-05-29T15:24:18.235+02:00First steps to have Sun One Directory Server up and runningTo have DS up and running you have to go through several steps.<br />You are able to control directory server through command line tools(dsadm,dsconf) and by Java Web Console.<br />To use the second one you have :<br />1. Register Directory Service Control Center in Java Web Console<br /><b>#/opt/SUNWdsee/dscc6/bin/dsccsetup ads-create</b><br /><b>#/opt/SUNWdsee/dscc6/bin/dsccsetup status</b><br /><span style="font-weight: bold;">#/opt/SUNWdsee/ds6/bin/dsadm start /var/opt/SUNWdsee/dscc6/dcc/ads</span><br /><span style="font-weight: bold;">#cacaoadm start</span><br />2.Start Java Web Console if necessary with the <tt>smcwebserver</tt> command<br /><b># /usr/sbin/smcwebserver start</b><br />3.Log into Directory Service Control Center with system user.<br /><a href="https://192.168.45.100:6789/">https://hostname:6789/</a><br />4. Create directory server instance.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-8885695526076818419?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-23341747862422558462009-05-27T14:14:00.000+02:002009-05-28T16:51:01.935+02:00Sun One Directory Server installationThis directory server is included in product called <B>Sun Java Enterprise System.</B><BR> To install it on basic system it's necessary to install some extra packages.<BR> For text based installation:<BR> <TT>SUNWadmc,SUNWpl5u,SUNWadmfr,SUNWxcu4,SUNWadmfw,SUNWxcu6.</TT><BR> For GUI:<BR> <TT>SUNWctpls,SUNWxwplr,SUNWmfrun,SUNWxwplt,SUNWxwfnt,SUNWxwrtl,SUNWxwice.</TT><BR> <BR> To begin installation unzip<B> java_es-5-identsuite-ga-solaris-x86.zip </B>and run <BR> <B>#./installer</B><BR> <BR> During installation process you will be asked what components to install and proposed to configure them.<BR> Installation log can be found in /var/sadm/install/logs/<BR> and configuration report /var/sadm/install/logs/Java_Enterprise_System_Identity_Management_Suite_Summary_Report_install(Some number) <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-2334174786242255846?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-49170890643848254792009-05-26T10:11:00.000+02:002009-05-28T16:50:27.807+02:00Installing zone support on basic Solaris 10 systemThis tip is about how to install zones(containers) support on Solaris 10<br>system(of course if you don't like to use full installations of Solaris)<p>To do it , install these packages regardless dependency warnings: <br>SUNWadmc<br>SUNWadmfr<br>SUNWadmfw<br>SUNWlur<br>SUNWlucfg<br>SUNWluu<br>SUNWpoolr<br>SUNWpool<br>SUNWluzone<br>SUNWzoner<br>SUNWzoneu<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-4917089064384825479?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-39294628983861110942009-05-25T11:16:00.001+02:002009-05-28T16:50:27.810+02:00First steps to do after fresh installation of Solaris 10(core system) part 11. Install <B>bash,ssh,less(can't live without it):</B><BR> mount /dev/dsk/c1t0d0p0 /mnt<BR> <B>#pkgadd -d /mnt/Solaris_10/Product/ SUNWbash</B><BR> <B>#pkgadd -d /mnt/Solaris_10/Product/ SUNWssh*</B><BR> <B>#pkgadd -d /mnt/Solaris_10/Product/ SUNWless</B><BR> <BR> 2. Generate key and enable ssh:<BR> <B>#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key</B><BR> <B>#svcadm enable ssh</B><BR> <BR> 3. Man pages will be useful also:<BR> <B>#pkgadd -d /cdrom/Solaris_10/Product SUNWdoc SUNWman</B> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-3929462898386111094?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-76451294780169261932009-05-25T11:11:00.000+02:002009-05-29T09:28:27.617+02:00First steps to do after fresh installation of Solaris 10(core system) part 11. Install <B>bash,ssh,less(can't live without it):</B><BR> mount /dev/dsk/c1t0d0p0 /mnt<BR> <B>#pkgadd -d /mnt/Solaris_10/Product/ SUNWbash</B><BR> <B>#pkgadd -d /mnt/Solaris_10/Product/ SUNWssh*</B><BR> <B>#pkgadd -d /mnt/Solaris_10/Product/ SUNWless</B><BR> <BR> 2. Generate key and enable ssh:<BR> <B>#ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key</B><BR> <B>#svcadm enable ssh</B><BR> <BR> 3. Man pages will be useful also:<BR> <B>#pkgadd -d /cdrom/Solaris_10/Product SUNWdoc SUNWman</B> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-7645129478016926193?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-50636289839356244582009-04-27T14:36:00.002+02:002009-04-27T14:40:38.010+02:00From Debian with love!New Solaris packing system (IPS) and Debian's apt-get <a href="http://opensolaris.org/os/community/documentation/apt_ips/">comparison</a>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-5063628983935624458?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-89945574222614713402008-11-26T15:08:00.002+02:002008-11-26T15:09:51.543+02:00Debian way of SolarisAs you know a new packet management system (IPS) was released in a Open Solaris 2008.05.<br />The great event I thinks, It was the very necessary step towards greater usability of Solaris.<br />IPS is similar to Debian's APT or Aptitude and this is very good!<br />Great deal <a href="http://ianmurdock.com/">Ian Murdock </a> !<br /> <br />I found a great <a href="http://dlc.sun.com/osol/docs/content/IPS/ggcph.html">article</a> which will give you an overview of how it works.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-8994557422261471340?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-63233168875753808642008-11-05T16:58:00.006+02:002008-11-05T17:22:00.646+02:00Quick view at Solaris 10 10/08 ReleaseAs you know It was <a href="http://docs.sun.com/app/docs/doc/817-0547/ghgdx?a=view">announced</a> by SUN that it will be possible to install <span style="font-weight: bold;"><br /></span>Solaris 10/08 on ZFS filesystem directly.<br />I've checked how it works, you can watch it in the video report below.<br />I only can say that I've expected more: installer doesn't give ability to chose of what type of pool I want, I mean the process must be more customizable ... and hope that it will done in future releases.<br /><br /><object width="320" height="266" class="BLOG_video_class" id="BLOG_video-a57f7c40dd09bf37" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="movie" value="http://www.blogger.com/img/videoplayer.swf?videoUrl=http%3A%2F%2Fvp.video.google.com%2Fvideodownload%3Fversion%3D0%26secureurl%3DqAAAAP0YN7YpWvFNWPjMMOzGjlV5nv9gcV8jqaygoewFU4_GC8GYvMjf9V5Z3aODUg50yClGFee2t9BE6v4ls4h9G-qaxP7NeeWD2eN2TJwuxI-DrnWlolA48Q515px4A38m3nWymM7SSNKEf_BXi6Ox9gJpAFC6BKm62qykFcrvugSqo9KY8wCemsyUxf5ZV8ALeF1pQCcABAyLP3JUJDFlj6TIm3Kid42IzbCjLaozttw1%26sigh%3DvUOJh2_Lzde2cHNR1hOSShG_Iic%26begin%3D0%26len%3D86400000%26docid%3D0&nogvlm=1&thumbnailUrl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dblogger%26contentid%3Da57f7c40dd09bf37%26offsetms%3D5000%26itag%3Dw320%26sigh%3DwBYVPoeDP9f6oMkgItVsPU9XlnQ&messagesUrl=video.google.com%2FFlashUiStrings.xlb%3Fframe%3Dflashstrings%26hl%3Den"><param name="bgcolor" value="#FFFFFF"><embed width="320" height="266" src="http://www.blogger.com/img/videoplayer.swf?videoUrl=http%3A%2F%2Fvp.video.google.com%2Fvideodownload%3Fversion%3D0%26secureurl%3DqAAAAP0YN7YpWvFNWPjMMOzGjlV5nv9gcV8jqaygoewFU4_GC8GYvMjf9V5Z3aODUg50yClGFee2t9BE6v4ls4h9G-qaxP7NeeWD2eN2TJwuxI-DrnWlolA48Q515px4A38m3nWymM7SSNKEf_BXi6Ox9gJpAFC6BKm62qykFcrvugSqo9KY8wCemsyUxf5ZV8ALeF1pQCcABAyLP3JUJDFlj6TIm3Kid42IzbCjLaozttw1%26sigh%3DvUOJh2_Lzde2cHNR1hOSShG_Iic%26begin%3D0%26len%3D86400000%26docid%3D0&nogvlm=1&thumbnailUrl=http%3A%2F%2Fvideo.google.com%2FThumbnailServer2%3Fapp%3Dblogger%26contentid%3Da57f7c40dd09bf37%26offsetms%3D5000%26itag%3Dw320%26sigh%3DwBYVPoeDP9f6oMkgItVsPU9XlnQ&messagesUrl=video.google.com%2FFlashUiStrings.xlb%3Fframe%3Dflashstrings%26hl%3Den" type="application/x-shockwave-flash"></embed></object><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_t_xu8zc-05g/SRG1KHCn7WI/AAAAAAAAFv4/vFagbWEzumM/s1600-h/zfs_mirror"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 222px;" src="http://3.bp.blogspot.com/_t_xu8zc-05g/SRG1KHCn7WI/AAAAAAAAFv4/vFagbWEzumM/s400/zfs_mirror" alt="" id="BLOGGER_PHOTO_ID_5265188624666193250" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_t_xu8zc-05g/SRG1TwrvjrI/AAAAAAAAFwA/3xGCGSehaLQ/s1600-h/df"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 222px;" src="http://2.bp.blogspot.com/_t_xu8zc-05g/SRG1TwrvjrI/AAAAAAAAFwA/3xGCGSehaLQ/s400/df" alt="" id="BLOGGER_PHOTO_ID_5265188790463336114" border="0" /></a><br /><br /><br /><br /><br /><div style="text-align: left;"><br /></div><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-6323316887575380864?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-38452294443162321642008-11-03T16:45:00.002+02:002008-11-03T16:47:27.772+02:00Good article about Mysql Cluster deployed in Solaris Zones<a href="http://www.sun.com/bigadmin/features/articles/mysql_cluster_zones.jsp">http://www.sun.com/bigadmin/features/articles/mysql_cluster_zones.jsp</a><br /><table width="100%" cellpadding="0" cellspacing="0"> <tbody><tr> <td><br /></td> </tr> </tbody></table><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-3845229444316232164?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-25462199124416894982008-06-04T17:35:00.006+02:002008-06-04T17:40:57.426+02:00Some usefull shell tricks<h3> <b>Reuse previous arguments</b> </h3><br />The <tt>!$</tt> command returns the last file name parameter used with a command. But what happens if you have a command that used multiple file names and you want to reuse just one of them? The <tt>!:1</tt> operator returns the first file name used in a command. The example in Listing 1 shows how you can use this operator in combination with the <tt>!$</tt> operator. In the first command, a file is renamed to a more meaningful name, but to preserve use of the original file name, a symbolic link is created. The file <i>kxp12.c</i> is renamed in a more readable manner, then the <tt>link</tt> command is used to create a symbolic link back to the original file name, in case it's still used elsewhere. The <tt>!$</tt> operator returns the <i>file_system_access.c</i> file name, and the <tt>!:1</tt> operator returns the <i>kxp12.c</i> file name, which is the first file name of the previous comma nd.<br /><br /><br /><b>Listing 1. Using !$ and !:1 in combination</b><br /><table cellpadding="0" cellspacing="0" width="65%"> <tbody><tr> <td> <pre>$ mv kxp12.c file_system_access.c<br />$ ln –s !$ !:1 </pre> </td> </tr> </tbody></table><br /><br /><br /><h3> Manage directory navigation with pushd and popd </h3><br />UNIX supports a wide variety of directory-navigation tools. Two of my favorite productivity tools are <tt>pushd</tt> and <tt>popd</tt>. You're certainly aware that the <tt>cd</tt> command changes your current directory. What happens if you have several directories to navigate, but you want to be able to quickly return to a location? The <tt>pushd</tt> and <tt>popd</tt> commands create a virtual directory stack, with the <tt>pushd</tt> command changing your current directory and storing it on the stack, and the <tt>popd</tt> command removing the directory from the top of the stack and returning you to that location. You can use the <tt>dirs</tt> command to display the current directory stack without pushing or popping a new directory. <span style="text-decoration: underline;"></span>Listing 2 shows how you can use the <tt>pushd</tt> and <tt>popd</tt> commands to quickly navigate the directory tree.<br /><br /><br /><b>Listing 2. Using pushd and popd to navigate the directory tree</b><br /><table cellpadding="0" cellspacing="0" width="65%"> <tbody><tr> <td> <pre>$ pushd . ~ ~<br />$ pushd /etc /etc ~ ~<br />$ pushd /var /var /etc ~ ~<br />$ pushd /usr/local/bin /usr/local/bin /var /etc ~ ~<br />$ dirs /usr/local/bin /var /etc ~ ~<br />$ popd /var /etc ~ ~<br />$ popd /etc ~ ~<br />$ popd ~ ~<br />$ popd </pre> </td> </tr> </tbody></table><br /><br /><br />The <tt>pushd</tt> and <tt>popd</tt> commands also support parameters to manipulate the directory stack. Using the <tt>+</tt><tt><i>n</i></tt><tt> </tt>or <tt>-</tt><tt><i>n</i></tt><tt> </tt>parameter, where <i>n</i> is a number, you can rotate the stack left or right, as shown in Listing 3.<br /><br /><br /><b>Listing 3. Rotating the directory stack</b><br /><table cellpadding="0" cellspacing="0" width="65%"> <tbody><tr> <td> <pre>$ dirs /usr/local/bin /var /etc ~ ~<br />$ pushd +1 /var /etc ~ ~ /usr/local/bin<br />$ pushd -1 ~ /usr/local/bin /var /etc ~ </pre> </td> </tr> </tbody></table><br />Taken from <a href="http://www.ibm.com/developerworks/aix/library/au-unixtips/index.html">here</a>.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-2546219912441689498?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com0tag:blogger.com,1999:blog-7562850550612305427.post-70046841451868633102008-05-28T11:36:00.002+02:002008-05-28T11:37:18.789+02:00Using X server in Windows for calling remote graphical applications in UnixSometimes you need ability to run X apps from remote unix servers.<br />It is not a problem when you are using unix as a client, but what should you do when you running windows.<br /><br />The answer:<br />1. Your can use X servers for windows such as Xming is(I recommend this case if you are sure that this is the onliest task you will perform).<br />2. You can run X server from Cygwin<br /><br />Lets examine the second one:<br />1. Install Cygwin and run it.<br />2. In shell run:<br /> <b> $XWin -logfile /tmp/asd.log -ac &</b><br />3. Connect to the desired host:<br /> <b>$ssh -X host</b><br />4. You have to export $DISPLAY variable with a value which points to host you have come from:<br /> <b>host$export DISPLAY=sourcehost:0.0</b><br />5. Run your apps:<br /> <b>host$xterm</b><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7562850550612305427-7004684145186863310?l=unixinmind.blogspot.com'/></div>nixlikehttp://www.blogger.com/profile/18090601772645723533nixlike@unixinmind.com2