当前位置: 首页 > news >正文

有了域名怎么建设网站wordpress 4.5.7漏洞

有了域名怎么建设网站,wordpress 4.5.7漏洞,高端网站建设成都,六安人论坛最新招聘近期由于工作需要整理一下自动化的东西#xff0c;因为公司去年上线了OA#xff0c;所以公司的入职系统会提交用户的信息到IT部门#xff0c;最早的做法是入职到了#xff0c;IT部门收集用户信息在AD中创建对应的用户信息#xff0c;所以为了提高管理员的工作效率#xf… 近期由于工作需要整理一下自动化的东西因为公司去年上线了OA所以公司的入职系统会提交用户的信息到IT部门最早的做法是入职到了IT部门收集用户信息在AD中创建对应的用户信息所以为了提高管理员的工作效率所以准备实施自动创建AD账户当OA流程到IT人员审批节点后IT人员审批后根据人员信息自动创建AD账户所以整理了一些JAVA创建AD人员信息的信息但是我们需要注意点的是对于JAVA语言操作MS AD的一些普通操作是不需要SSL的但是对于用户密码的重置操作必须使用SSL当然之前看网上有说可以跳过的但是没有试验成功所以还是按照标准的配置来通过SSL对用户的AD密码进行操作废话不多说了今天我们主要介绍使用JAVA通过SSL方式创建MS AD账户因为要对创建的用户设置密码所以需要使用SSL证书既然需要SSL证书目的就是为了让JAVA信任LDAP所以我们需要从AD中导出受信任的证书然后导入到JAVA运行环境中的JRE下的cacert证书文件中。我们既然说到了OA其实OA中就可以通过系统自带的功能进行证书申请及证书导入这样比较简单当然如果没有OA环境的我们可以通过JAVA运行环境中的JDK中的keytool进行证书导入工作我们下面都会介绍到 我们首先使用OA中的功能进行证书导入我们OA中的证书路劲在/OAFS/WEAVER/jdk1.8.0_101/jre/lib/security/cacerts 确认OA环境中的JDK路劲后我们接下来就是证书申请及导入了 我们访问OA的地址然后路劲增加/integration/ldapcert.jsp路劲访问即可如果没有后面的JAVA文件可以找OA供应商要或者在附件下载 我们首先下载附件中的文件下载后附件中有三个文件classbean、 我们首先进入classbean文件夹内的内容拷贝到对应的OA服务器的对应目录 ecology\classbean\weaver\ldap 2.然后将解压文件中的文件夹integration文件中的以下文件拷贝到OA的对应的服务器目录下 ecology\integration 3.因为解压后有三个文件夹第三个文件夹src为源码我们就不用管了 按照以上方法走完后我们就可以通过以下链接来配置了 http://192.168.6.101/integration/ldapcert.jsp 访问后我们再LDAP IP输入环境的AD DC服务器地址系统会默认填写LDAP端口636及证书路劲这些信息系统会自动补全我们需要手动设置证书密码一般我们都会设置成changeit设置好这些信息后我们导入证书会提示下面的导入信息 导入完成 然后我们需要在证书路劲下载证书到本地的JRE环境进行测试了 接着我们看看第二种方式的证书申请 我们需要从DC上导入域的根证书 mmc---增加---证书---计算机---个人---选择根证书----导出 不需要导出私钥 使用默认的DRE编码 保存 我们按照同样的方式将另外一张也导出来 然后我们需要在本地的JDK环境中导入该根证书到JDK环境中的证书中 我本地的JDK环境路劲D:\Development_Environment\java\jdk\jre\lib\security 然后运行命令将刚才导出的根证书导入到该路劲的cacert证书文件中 我们首先要cd到jdk路劲 1 cd D:\Development_Environment\java\jdk\jre\bin 然后将刚才导出的根证书保存到D盘下通过以下命令导入 1 keytool keytool -import -keystore    D:\Development_Environment\java\jdk\jre\lib\security\cacerts -storepass changeit -keypass changeit -alias CA -file d:\ADroot.cer 输入Y受信任 然后我们就可以通过 接着就是看看ADDS环境了 换进准备好我们就可以上代码了 我们设置好证书路劲及LDAP验证信息及需要注册的用户名 账户注册成功 上代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 package com.ixmsoft.oa.util;        import java.util.Properties;        import javax.naming.*;    import javax.naming.ldap.*;    import javax.naming.directory.*;        /**    * author Keven Chen    * version $Revision 1.0 $    *     */   public class AddAdUser {        private static final String SUN_JNDI_PROVIDER  com.sun.jndi.ldap.LdapCtxFactory;            public static void main(String[] args) throws Exception {            String keystore  D:\\Development_Environment\\java\\jdk\\jre\\lib\\security\\cacerts;            System.setProperty(javax.net.ssl.trustStore, keystore);                Properties env  new Properties();                env.put(Context.INITIAL_CONTEXT_FACTORY, SUN_JNDI_PROVIDER);// java.naming.factory.initial            env.put(Context.PROVIDER_URL, ldap://192.168.5.20:636);// java.naming.provider.url            env.put(Context.SECURITY_AUTHENTICATION, simple);// java.naming.security.authentication            env.put(Context.SECURITY_PRINCIPAL,                    cnAdministrator,cnUsers,dcixmsoft,dccom);// java.naming.security.principal            env.put(Context.SECURITY_CREDENTIALS, 123);// java.naming.security.credentials            env.put(Context.SECURITY_PROTOCOL, ssl);                String userName  CNgaowenlong,OUIXM Adm,OUIMXSOFT Users,DCixmsoft,DCcom;            String groupName  CNDomain Admins,CNUsers,DCixmsoft,DCcom;                LdapContext ctx  new InitialLdapContext(env, null);                // Create attributes to be associated with the new user            Attributes attrs  new BasicAttributes(true);                // These are the mandatory attributes for a user object            // Note that Win2K3 will automagically create a random            // samAccountName if it is not present. (Win2K does not)            attrs.put(objectClass, user);            attrs.put(sAMAccountName, gaowenlong);            attrs.put(cn, gaowenlong);                // These are some optional (but useful) attributes            attrs.put(sn, gaowenlong);            attrs.put(displayName, gaowenlong);            attrs.put(description, gaowenlong);            attrs.put(userPrincipalName, gaowenlongixmsoft.com);            attrs.put(mail, gaowenlongixmsoft.com);            attrs.put(telephoneNumber, 1234568999);                // some useful constants from lmaccess.h            int UF_ACCOUNTDISABLE  0x0002;  //禁用账户          int UF_PASSWD_NOTREQD  0x0020;   //用户不能修改密码         int UF_PASSWD_CANT_CHANGE  0x0040;            int UF_NORMAL_ACCOUNT  0x0200;   //正常用户         int UF_DONT_EXPIRE_PASSWD  0x10000;   //密码永不过期         int UF_PASSWORD_EXPIRED  0x800000;   //密码已经过期             // Note that you need to create the user object before you can            // set the password. Therefore as the user is created with no            // password, user AccountControl must be set to the following            // otherwise the Win2K3 password filter will return error 53            // unwilling to perform.                attrs.put(userAccountControl, Integer.toString(UF_NORMAL_ACCOUNT                     UF_PASSWD_NOTREQD  UF_PASSWORD_EXPIRED  UF_ACCOUNTDISABLE));                // Create the context            Context result  ctx.createSubcontext(userName, attrs);            System.out.println(Created disabled account for:   userName);                ModificationItem[] mods  new ModificationItem[2];                // Replace the unicdodePwd attribute with a new value            // Password must be both Unicode and a quoted string            String newQuotedPassword  \Password2000\;            byte[] newUnicodePassword  newQuotedPassword.getBytes(UTF-16LE);                mods[0]  new ModificationItem(DirContext.REPLACE_ATTRIBUTE,                    new BasicAttribute(unicodePwd, newUnicodePassword));            mods[1]  new ModificationItem(DirContext.REPLACE_ATTRIBUTE,                    new BasicAttribute(userAccountControl, Integer                            .toString(UF_NORMAL_ACCOUNT  UF_PASSWORD_EXPIRED)));                // Perform the update            ctx.modifyAttributes(userName, mods);            System.out.println(Set password  updated userccountControl);            // now add the user to a group.                try {                ModificationItem member[]  new ModificationItem[1];                member[0]  new ModificationItem(DirContext.ADD_ATTRIBUTE,                        new BasicAttribute(member, userName));                    ctx.modifyAttributes(groupName, member);                System.out.println(Added user to group:   groupName);                } catch (NamingException e) {                System.err.println(Problem adding user to group:   e);            }            // Could have put tls.close() prior to the group modification            // but it seems to screw up the connection or context ?                ctx.close();                System.out.println(Successfully created User:   userName);            }        } 我们查看 查看账户属性 然后查看属性 我们将java文件上传到附件中如果加在eclipse中有报错请根据错误提示右击导入ldap相关的包即可 本文转自 高文龙 51CTO博客原文链接http://blog.51cto.com/gaowenlong/1969585如需转载请自行联系原作者
http://www.yutouwan.com/news/422594/

相关文章:

  • 芙蓉区网站建设公司广州市官网网站建设平台
  • 高端网站建设哪家好成都h5网站建设
  • 做网站改版多少钱作品集设计
  • 嘉兴企业网站建设公司郑州网站建设msgg
  • 网站建设类课题的研究方法做网站推广好做吗
  • 河北制作网站模板建站公司阿里巴巴怎么做企业网站
  • 抽奖网站开发公司网站谁负责做
  • 网站开发qq群苏州保洁公司诗雨
  • 上海浦东新区做网站一个完整的品牌策划方案范文
  • 网站后台显示不全2016响应式网站模板
  • 中卫网站建设报价网站支付界面怎么做
  • 网站内链建设和外链的推广建设银行官网站下载地址
  • 电子商务网站建设的定义939网站建设
  • 河南制作网站个人博客网站开发历程
  • 郑州专门做网站国外卖货平台有哪些
  • 重庆建设科技培训中心官方网站seo zac
  • 只用django做网站网上卖货哪个平台比较好
  • 济南网站建设设计公司外贸推广网站收费吗
  • 现在建网站还能赚钱吗wordpress+私信
  • 献县城市住房建设局网站linux做网站要求
  • 360浏览器直接进入网站有哪些网站可以做全景效果图
  • 邢台网站建设多少钱wordpress front-page.php
  • 中山精品网站建设公司调查队网站建设
  • 如何改变网站首页栏目北京市中海建设有限公司网站
  • 音乐网站开发目的网站建设相关网站
  • 镇江市网站建设微信公众号推广的方法
  • 现代化公司网站建设惠民建设局网站是哪个
  • 工商网站查询企业信息武威海外购物网站哪个最好
  • 域名访问网站应该怎么做百度搜索指数入口
  • 网站不备案违法吗外贸流程案例