开发者

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

开发者 https://www.devze.com 2023-02-19 14:05 出处:网络
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 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

精彩评论

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

关注公众号