I have made some changes to /etc/passwd file ,now I wanted to see if the effect of changes taken place or not .What command should I run for that.
For example after making change to /etc/ssh/ssh_config file ,I run /etc/init.d/sshd command.
etcpasswordusers
I have made some changes to /etc/passwd file ,now I wanted to see if the effect of changes taken place or not .What command should I run for that.
For example after making change to /etc/ssh/ssh_config file ,I run /etc/init.d/sshd command.
Best Answer
To verify the
passwd
and correspondingshadow
file, usepwck
. To verify thegroup
and correspondinggshadow
file, usegrpck
. See the manpages for the details of the actions they perform.Hand-editting of
/etc/passwd
is best done (if at all) withvipw
andvipw -s
for theshadow
file. For the/etc/group
and/etc/gshadow
usevigr
andvigr -s
, respectively. Using these tools provide not only a lock to prevent multiple, concurrent user updates but also offer validity checking.In general, modifications to the password and group files are best made using the standard
user(add|mod|del)
andgroup(add|mod|del)
tools.