It depends on the configuration of the domain controller. You may try:
net ads user info USERNAME@DOMAIN.COM -S DC_SERVER_NAME -U USERNAME
USERNAME@DOMAIN.COM - , DC_SERVER_NAME - , USERNAME - .
.
, ,
ads_pull_uint32 failed
UNIX- .
, Microsoft Windows Services UNIX, .
. , .
: 80 , (smbpasswd -U USERNAME -r DC_SERVER_NAME), 90 . , .
[]
rpcclient, script:
#!/bin/bash
USER="username"
PASS="Pa$$W0rd"
DC="vmdc01"
if [ "x$USERDCID" == "x" ]; then
RPCLOOKUPID=$(rpcclient -U $USER%$PASS -c "lookupnames $USER" $DC 2> ./rpc_errFile)
USERDCID=$(echo "$RPCLOOKUPID" | grep -e '[0-9]\{4,9\} ' -o)
fi
QUERYUSER=$(rpcclient -U $USER%$PASS -c "queryuser $USERDCID" $DC 2> ./rpc_errFile)
EXPDATE=$(echo "$QUERYUSER" | grep 'Password must change Time' | grep -e '[a-Z]\{2\}, [0-9]\{2\} [a-Z]\{3\} [0-9]\{4\} [0-9]\{2\}:[0-9]\{2\}' -o)
RPCERR=$(<./rpc_errFile)
if [ "x$RPCERR" != "x" ]; then
notify-send -i /usr/share/icons/gnome/48x48/status/dialog-error.png "Error while fetching expiration date of your domain password" "$RPCERR"
else
notify-send -i /usr/share/icons/gnome/48x48/status/dialog-information.png "your domain password expires at " "$EXPDATE h"
fi
script , , Unity. , script, .
[/]