User Tools

Site Tools


linux_faq:ubuntu_setup_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
linux_faq:ubuntu_setup_script [2019/02/11 09:13]
127.0.0.1 external edit
linux_faq:ubuntu_setup_script [2019/07/03 19:58] (current)
admin
Line 363: Line 363:
 CURRENT_DC=\`wbinfo -P | awk '​{print \$9}' | awk -F "​\""​ '​{print \$2}'​\` CURRENT_DC=\`wbinfo -P | awk '​{print \$9}' | awk -F "​\""​ '​{print \$2}'​\`
 FULL_NAME=\`wbinfo -i \$USER | awk -F ":"​ '​{print \$5}'​\` FULL_NAME=\`wbinfo -i \$USER | awk -F ":"​ '​{print \$5}'​\`
-BASEDN=\`echo \$CURRENT_DC | sed s/"​\."/,​dc=/​g | sed -r 's!^[^dc=]+!!'\`+BASEDN=\`echo \$CURRENT_DC ​| sed s/​^[^.]*.//​g ​| sed s/"​\."/,​dc=/​g | sed s/^/dc=/\`
 MAIL=\`ldapsearch -h \$CURRENT_DC -b "​\$BASEDN"​ "​sAMAccountName=\$USER"​ | grep mail: | awk '​{print \$2 }'\` MAIL=\`ldapsearch -h \$CURRENT_DC -b "​\$BASEDN"​ "​sAMAccountName=\$USER"​ | grep mail: | awk '​{print \$2 }'\`
  
linux_faq/ubuntu_setup_script.txt · Last modified: 2019/07/03 19:58 by admin