Or better yet, the strncpy_s function that is standard in C11.
strncpy isn't a good choice, not least because it doesn't null-terminate excessively-long strings. strlcpy guarantees that there will be no overflow, it's a much safer option.
strcpy
insecurely for login authentication? Makes you go AAAAA-AAAAAAArrg *segfault*
Or better yet, the strncpy_s function that is standard in C11.
strncpy isn't a good choice, not least because it doesn't null-terminate excessively-long strings. strlcpy guarantees that there will be no overflow, it's a much safer option.