it depends...
Do YOU know the root password...:
Yes: No problem just reset all other passwords
passwd etc...
No: Is the previous owner able/willing to tell
you the password. Yes, wel just do the above
after reclaiming the root account.
If also this is no, then try to get hold on a
cd like knoppix et al. Boot from that CD,
mount the root file system, find etc/passwd
on it.
Check the line with root on it.
if it contains "root::...." then
remove the part between the first and second
: sign effectively removing the password.
if it contains "root:x:...." then goto the
etc/shadow file because the shadow file is used.
then edit the shadow file and remove the string
between the first and second : char, thus
removing the password.
After removing the password like this, boot the
normal system and logon as root, no password will
be asked, then ensure you set the password on the
root account and change all other accounts if
they have a password something else then
:x: in the /etc/password file. Then change the
password for that account
if in the /etc/shadow file there is something
else than :!!: or :*: than change the password.
"!!" or "*" as encrypted password effectively
means that you cannot logon with these accounts.
They are mostly for services provided by your
system.
Kind regards,
Nico