Normally they're kept in the NetInfo database. You can use nidump to generate a traditional /etc/passwd file (I don't know about /etc/shadow; OSX may not allow you to do that one). OSX doesn't use the traditional files, though, except as a last resort.