You can do this by setting up a custom dimension and send a unique id for every user in this dimension. Ensure not to send email/twitter handle etc as this ID, since they violate the privacy terms of Google Analytics. Ideally this ID is a unique internal userID from your server. Once you do this, you can query the report using this dimension and date. This will give one row for each user’s daily visit. Count of these rows compared to the time period, say 6 months will give you the DAU/MAU etc.
I have made a detailed write up after finding no complete article on it: http://www.notingon.com/dau-mau-measurements-in-google-analytics/