Выполненный top
.Пресса O
изменить порядок сортировки, и Q
для Резидентной памяти.
В RHEL/CentOS существует нет -a
опция с passwd, но -S
опция там. Таким образом, Вы выполняете этот лайнер как пользователь root:
for user in `awk -F: '{print $1}' /etc/passwd`; do passwd -S $user; done
или
for user in $(awk -F: '{print $1}' /etc/passwd); do passwd -S $user; done
По крайней мере, в тени-utils 4.1.5.1 на Дуге Linux, я имею -a
, который также печатает состояние. passwd -Sa
кажется, делает то, что Вы хотите. От man passwd
:
-a, --all
This option can be used only with -S and causes show status for all users.
-S, --status
Display account status information. The status information consists
of 7 fields. The first field is the user's login name. The second
field indicates if the user account has a locked password (L), has
no password (NP), or has a usable password (P). The third field
gives the date of the last password change. The next four fields
are the minimum age, maximum age, warning period, and inactivity
period for the password. These ages are expressed in days.
# passwd -Sa
root P 05/07/2013 -1 -1 -1 -1
bin P 09/19/2010 -1 -1 -1 -1
daemon P 09/19/2010 -1 -1 -1 -1
mail P 09/19/2010 -1 -1 -1 -1
ftp P 09/19/2010 -1 -1 -1 -1
http P 09/19/2010 -1 -1 -1 -1
uuidd P 09/19/2010 -1 -1 -1 -1
dbus P 09/19/2010 -1 -1 -1 -1
nobody P 09/19/2010 -1 -1 -1 -1
git L 05/07/2013 -1 -1 -1 -1
chris P 05/07/2013 0 99999 7 -1
avahi L 05/07/2013 -1 -1 -1 -1
mpd L 05/07/2013 -1 -1 -1 -1
ntp L 05/07/2013 0 99999 7 -1
nullmail L 05/13/2013 -1 -1 -1 -1
polkitd L 05/14/2013 0 99999 7 -1
passwd-0.77-4.el6_2.2.x86_64
) и тень-utils, которая включена (shadow-utils-4.1.4.2-13.el6.x86_6
) не имеет команды passwd.
– Bratchley
14.05.2013, 19:54
passwd -Sa
как root
?
– terdon♦
14.05.2013, 19:56
-a
опция не доступна с версией passwd
Я использую
– Bratchley
14.05.2013, 20:05
-a
переключатель.
– slm♦
14.05.2013, 21:31