sudo passwd user code example Example 1: linux change user password passwd $user Example 2: add password to user ubuntu passwd {username}