开发者

I want a shell script that reads a specific attribute value from an ldapsearch result

I am trying to write a script that finds the checks homefolder quotas, and sends emails to users who are exceeding a certain percentage of their quota, we have 389 ldap server, I can search the ldap for a uid, and the result is in ldif format. I can not figure out how to read the value of the attribute corresponding to email, lets say personalEmail: hisEmail I want to read the value of the personalEmail attribute开发者_C百科, i.e. hisEmail

thanks


ldapsearch ... | awk -F ": " '$1 == "desiredAttribute" {print $2}'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜