首页 \ 问答 \ 使用net-ldap登录Active Directory“无环境”(Active Directory “contextless” login with net-ldap)

使用net-ldap登录Active Directory“无环境”(Active Directory “contextless” login with net-ldap)

我正在写一个Rails 3.2应用程序,作为身份验证,我想使用Net :: LDAP连接到公司MS ADDS。 我可以使用Net :: LDAP对用户进行身份验证。 问题是我的用户存在于不同的OU中,因此我想进行“无环境”登录。 不确定它是否在Microsoft世界中被称为无环境。 我来自Novell的背景。

我所知道的是不必提供FQDN,只需提供sAMAccountName和密码。 :基本选项似乎锁定了我在该上下文中并期望用户仅存在于该OU中。

我是否必须先与用户绑定(FQDN),然后进行过滤搜索或什么? 任何建议都是受欢迎的。


I'm writting a Rails 3.2 application and as authentication I want to use Net::LDAP to connect to the company MS ADDS. I can authenticate a user with Net::LDAP. The problem is that my users exists in different OU's so I would like to do a "contextless" login. Not sure if it is called contextless in the Microsoft world. I come from a Novell background.

What I meen is to not have to give the FQDN, just the sAMAccountName and password. The :base options seems to lock me in that context and expects the users to exist in that OU alone.

Do I have to bind with a user first(FQDN) then do a filter search or what? Any suggesions are welcome.


原文:https://stackoverflow.com/questions/15094354
更新时间:2022-12-19 11:12

最满意答案

你无法修复1

造成差异的原因是Firefox使用“DirectWrite” - 一种与Chrome相比渲染文本的技术。

在这里阅读更多内容: http//www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite

阅读本文,特别是“提示和间距差异”部分: http//blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/

要修复2 ,请尝试在px设置line-height20px看起来不错)。 要修复水平对齐,请删除text-indent并稍微调整width28px看起来不错)。

您还应该在文本周围添加更多的间距。 我认为这个快速模型看起来更好:


You can't fix 1.

The reason for the differences is that Firefox uses "DirectWrite" - a different technique to render text than Chrome does.

Read more here: http://www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite

And read this, particularly the "Hinting and spacing differences" section: http://blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/

To fix 2, try setting a line-height in px (20px looks good). To fix the horizontal alignment, remove the text-indent and adjust the width slightly (28px looks good).

You should also add a bit more spacing around the text. I think this quick mockup looks better:

相关问答

更多
  • 正如@Pedro_Costa所述,.ol-touch风格仅在某些浏览器中触发,这会使字体变得更大,如下面的CSS规则所示: ol-touch .ol-control button{font-size:1.5em} 所以,问题在于Open Layers仅在某些浏览器和操作系统中检测触摸功能。 检查我看到的OpenLayers代码: ol.has.TOUCH = ol.ASSUME_TOUCH || 'ontouchstart' in window; 这看起来没问题。 所以,显然这是Linux中的Chrom ...
  • 你有三个选择: 修复您的菜单布局,使其更容忍不同的字体大小(建议:大量用户不同意您选择的字体大小 - 不仅限于视障用户)。 用图像替换文本(使用适当的替代文字!); FF(和IE)仍然会在“缩放”模式下缩放它们,但不会破坏页面的布局。 没做什么。 将破碎的布局作为一个大的“FU”留给那些否则会阅读固定大小的文本的用户。 You have three choices: Fix your menu layout such that it is more tolerant of different font si ...
  • 用这个 : span { font-family: Verdana; font-size: 16px; font-weight: bold; line-height: 1.15; display: inline-block; } 区别在于浏览器中字体的呈现方式不同。 Use this : span { font-family: Verdana; font-size: 16px; font-weight: bold; line-height: 1.15; displa ...
  • 缩放使字体更大。 您的媒体查询使字体变小。 这两个人互相争斗。 发生这种情况是因为当缩放使像素变大时,窗口中的像素更少,这使得较小窗口的媒体查询匹配。 此行为特定于桌面浏览器。 移动浏览器不使用窗口大小进行媒体查询,而是使用屏幕大小( 粗略地 )。 在其他字体大小很奇怪的情况下,可能是因为text-size-adjust 。 Zoom makes the font bigger. Your media query makes the font smaller. These two fight each ot ...
  • 定义字体大小样式: 您可以尝试以像素为单位定义以获得更多一致性: 代码将放在你的html 中 Define a font size style: ...
  • 我建议使用Firefox支持的字体格式,或者使用font-size-adjust在不同字体系列中获得统一尺寸。 您可以通过添加以下CSS来使用font-size-adjust : font-size-adjust:0.5; 这会将所有字体设置为具有大致相同高度的小写字符(通常,在应用不同字体时查看看起来更接近相同大小的文本)。 I suggest either using a font format that Firefox supports, or using font-size-adjust to g ...
  • Chrome目前不在Windows上使用DirectWrite进行字体渲染。 文本没有消除锯齿,因此字体大小被舍入(到最接近的整数?)。 他们正在研究它。 查看相关错误票证的评论 ,特别是附件: 如果您使用正确的标志启用DirectWrite,它应该平滑地动画。 Chrome currently doesn't use DirectWrite for font rendering on Windows. Text isn't anti-aliased and as such font-sizes are r ...
  • 请参阅http://quirksmode.org 上execCommand的兼容性图表 。 Internet Explorer根本不支持字体大小的改变 ,Opera和Firefox包装字体标签,Safari / Chrome按照您的建议行事。 你不能改变这个功能,你将不得不建立一个与当前选择范围一起工作的替代方案来实现一种与X浏览器兼容的方法。 See the compatibility charts for execCommand at http://quirksmode.org. Internet Ex ...
  • 更新:这是因为每个浏览器都有自己的字体渲染引擎 。 我使用您当前的sans-serif字体复制了您的结果。 当我将字体更改为monospace字体时也会发生这种情况。 我相信你最好使用非系统字体。 例如,我想看看Open Sans等典型Google字体会发生什么,我发现使用它时问题不存在。 顺便说一句,在该网站上做得很好。 看起来很好。 TSM! TSM! TSM! Update: This is because each browser has its own font rendering engine. ...
  • 你无法修复1 。 造成差异的原因是Firefox使用“DirectWrite” - 一种与Chrome相比渲染文本的技术。 在这里阅读更多内容: http : //www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite 阅读本文,特别是“提示和间距差异”部分: http : //blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)