sed - print lines till you encounter a specific pattern

sed  '/dmitritelinov/q' /etc/passwd
The q command tells to quit from that point onwards.
This sed command tells to keep printing (which is default) and stop processing once the pattern dmitritelinov is encountered.