/l3/users/27-3-2017/NT-Ladm/debian3.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#~
root@192.168.13.6's password: #!/bin/bash if [ $# -gt 1 ] then exit 2 fi users=`awk -F: '$3>=1000&&$3!=65534{print $1}' /etc/passwd | tr "\n" " "` for user in $users do echo "Changing shell for user $user..." usermod -s /bin/${1:-bash} $user done |
#cat shell.sh
#!/bin/bash if [ $# -gt 1 ] then exit 2 fi users=`awk -F: '$3>=1000&&$3!=65534{print $1}' /etc/passwd | tr "\n" " "` for user in $users do echo "Changing shell for user $user" usermod -s /bin/${1:-bash} $user done |
#vim shell.sh
--- /tmp/l3-saved-14496.11326.14217 2017-03-29 15:00:27.775924513 +0300 +++ shell.sh 2017-03-29 15:00:45.275925814 +0300 @@ -1,5 +1,6 @@ #!/bin/bash -if [ $# -gt 1 ] then +if [ $# -gt 1 ] +then exit 2 fi users=`awk -F: '$3>=1000&&$3!=65534{print $1}' /etc/passwd | tr "\n" " "` |
#./shell.sh
Changing shell for user user usermod: изменения не внесены Changing shell for user ivan usermod: изменения не внесены Changing shell for user petr usermod: изменения не внесены Changing shell for user anna usermod: изменения не внесены |
#./shell.sh sh
Changing shell for user user Changing shell for user ivan Changing shell for user petr Changing shell for user anna |
#./shell.sh bash
Changing shell for user user Changing shell for user ivan Changing shell for user petr Changing shell for user anna |
#echo $OSTYPE
linux-gnu |
#set
BASH=/usr/local/bin/l3script BASHOPTS=checkwinsize:cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath BASH_ALIASES=() BASH_ARGC=() BASH_ARGV=() BASH_CMDS=() BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="4" [1]="2" [2]="37" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu") BASH_VERSION='4.2.37(1)-release' ... MACHTYPE=x86_64-pc-linux-gnu MAIL=/var/mail/root MAILCHECK=60 OLDPWD=/home/user OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PIPESTATUS=([0]="0") PPID=14495 |
#vim shell.sh
|
#~
TEST(1) User Commands TEST(1) NAME test - check file types and compare values NAME SYNOPSIS test EXPRESSIONle types and compare values test [ EXPRESSION ] [ ] [ OPTION ... Except for -h and -L, all FILE-related tests dereference symbolic links. Beware that parentheses need to be escaped (e.g., by backslashes) for shells. INTEGER may also be -l STRING, which evalu‐ ates to the length of STRING. NOTE: [ honors the --help and --version options, but test does not. test treats each of those as it treats any other nonempty STRING. NOTE: your shell may have its own version of test and/or [, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it sup‐ ports. AUTHOR Written by Kevin Braunsdorf and Matthew Bradburn. REPORTING BUGS Report test bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> |
#man test
|
#vim shell.sh
|
#vim shell.sh &
|
#jobs
[1]+ Stopped vim shell.sh |
#fg $1
#!/bin/bash if [ $# -gt 1 ] exit 2 then fi users=` do -F: '$3>=1000&&$3!=65534{print $1}' /etc/passwd | tr "\n" " "` echo "Changing shell for user $user" for user in $us usermod -s /bin/${1:-bash} $user done "shell.sh" 11L, 222C |
#~
l3script: systemclt: команда не найдена |
#sudo systemctl
sudo: systemctl: command not found |
#cd /etc/init.d
|
#ls
acpid checkroot-bootclean.sh cron hwclock.sh kmod mountdevsubfs.sh mtab.sh rc reboot sendsigs sudo umountnfs.sh bootlogs checkroot.sh exim4 kbd motd mountkernfs.sh netdiag rc.local rmnologin single udev umountroot bootmisc.sh console-cyrillic halt keyboard-setup mountall-bootclean.sh mountnfs-bootclean.sh networking rcS rsyslog skeleton udev-mtab urandom checkfs.sh console-setup hostname.sh killprocs mountall.sh mountnfs.sh procps README screen-cleanup ssh umountfs |
#vim cron
|
#$status_of_proc
|
#$status_of_proc /run/
acpid.pid crond.pid exim4/ initramfs/ motd.dynamic network/ screen/ shm/ sshd.pid utmp acpid.socket crond.reboot initctl lock/ mount/ rsyslogd.pid sendsigs.omit.d/ sshd/ udev/ |
#$status_of_proc /run/
acpid.pid crond.pid exim4/ initramfs/ motd.dynamic network/ screen/ shm/ sshd.pid utmp acpid.socket crond.reboot initctl lock/ mount/ rsyslogd.pid sendsigs.omit.d/ sshd/ udev/ |
#$status_of_proc /run/crond.pid
l3script: /run/crond.pid: Отказано в доступе |
#sudo $status_of_proc /run/crond.pid
sudo: /run/crond.pid: command not found |
#cat /run/crond.pid
1942 |
#$status_of_proc 1942
l3script: 1942: команда не найдена |
#$(status_of_proc) 1942
l3script: status_of_proc: команда не найдена l3script: 1942: команда не найдена |
#env
SHELL=/bin/bash TERM=xterm HISTSIZE=2000 SSH_CLIENT=192.168.16.187 49228 22 L3_PARENT_TTY=/dev/pts/0 OLDPWD=/home/user/scripts L3_TAMPERED_EDITORS= vi vim pico nano SSH_TTY=/dev/pts/0 USER=root HISTFILESIZE=2000 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root L3_SESSION_ID=31383263589649259-1490769712 a=1 PWD=/etc/init.d LANG=ru_RU.UTF-8 |
#set | grep status
|
#cd ~/script
l3script: cd: /root/script: Нет такого файла или каталога |
#cd root
l3script: cd: root: Нет такого файла или каталога |
#ls
acpid checkroot-bootclean.sh cron hwclock.sh kmod mountdevsubfs.sh mtab.sh rc reboot sendsigs sudo umountnfs.sh bootlogs checkroot.sh exim4 kbd motd mountkernfs.sh netdiag rc.local rmnologin single udev umountroot bootmisc.sh console-cyrillic halt keyboard-setup mountall-bootclean.sh mountnfs-bootclean.sh networking rcS rsyslog skeleton udev-mtab urandom checkfs.sh console-setup hostname.sh killprocs mountall.sh mountnfs.sh procps README screen-cleanup ssh umountfs |
#cd ~user/scripts/
|
#ls
shell.sh |
#vim proc.sh
--- /dev/null 2017-03-27 13:30:21.879999998 +0300 +++ proc.sh 2017-03-29 15:42:02.687923137 +0300 @@ -0,0 +1,8 @@ +#!/bin/bash + +i=1 +while [ $i -lt 1000000 ] + do + echo $i > /dev/`who | awk '$1~/ivan/{print $2}'` + + done |
#cd /usr/local/bin
|
#ls
l3-agent l3-config l3script |
#man chfn
|
#chfn ivan
Ðзменение инÑоÑмаÑии о полÑзоваÑеле ivan ÐведиÑе новое знаÑение или нажмиÑе ENTER Ð´Ð»Ñ Ð²ÑбоÑа знаÑÐµÐ½Ð¸Ñ Ð¿Ð¾ ÑмолÑÐ°Ð½Ð¸Ñ Ðолное Ð¸Ð¼Ñ []: ÐваÑик ТелеÑик ÐÐ¾Ð¼ÐµÑ ÐºÐ¾Ð¼Ð½Ð°ÑÑ []: 9ÐРРабоÑий ÑелеÑон []: в911 ÐомаÑний ÑелеÑон []: 123-34-54 ÐÑÑгое []: ÑелÑнин chfn: Ð¸Ð¼Ñ Â«ÐваÑик ТелеÑик» ÑодеÑÐ¶Ð¸Ñ Ð½Ðµ ASCII-ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ chfn: Ð½Ð¾Ð¼ÐµÑ ÐºÐ¾Ð¼Ð½Ð°ÑÑ Â«9Ðл ÑодеÑÐ¶Ð¸Ñ Ð½Ðµ ASCII-ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ chfn: некоÑÑекÑное знаÑение номеÑа ÑелеÑона «в911» |
#chfn ivan
Изменение информации о пользователе ivan Введите новое значение или нажмите ENTER для выбора значения по умолчанию Полное имя []: ^C |
#chfn ivan
Изменение информации о пользователе ivan Введите новое значение или нажмите ENTER для выбора значения по умолчанию Полное имя []: Ivasyk Telesyk Номер комнаты []: 9D Рабочий телефон []: 911 Домашний телефон []: 911-11-11 Другое []: village |
#finger ivan
Login: ivan Name: Ivasyk Telesyk Directory: /home/ivan Shell: /bin/bash Office: 9D, 911 Home Phone: 911-11-11 On since Thu Mar 30 09:45 (EEST) on pts/1 from 192.168.16.187 10 minutes 12 seconds idle No mail. No Plan. |
#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 16G 0 disk └─xvda1 202:1 0 15,3G 0 part / sr0 11:0 1 222M 0 rom xvdb 202:16 0 5G 0 disk |
#df
Файловая система 1K-блоков Использовано Доступно Использовано% Cмонтировано в rootfs 15791024 1117556 13871320 8% / udev 10240 0 10240 0% /dev tmpfs 50740 176 50564 1% /run /dev/disk/by-uuid/92b79496-a6c3-450d-a438-766caa8504d8 15791024 1117556 13871320 8% / tmpfs 5120 0 5120 0% /run/lock tmpfs 101460 0 101460 0% /run/shm |
#cat /etc/shadow
root:$6$ppY7xZxX$CnutMU4XxetHko6DW5K/ckfiA6CFeC0cbV/d6rrWE6F5iszqxAaQTwekH3.vBTQPNCakvqusvPcBecndLcbX8.:16248:0:99999:7::: daemon:*:16248:0:99999:7::: bin:*:16248:0:99999:7::: sys:*:16248:0:99999:7::: sync:*:16248:0:99999:7::: games:*:16248:0:99999:7::: man:*:16248:0:99999:7::: lp:*:16248:0:99999:7::: mail:*:16248:0:99999:7::: news:*:16248:0:99999:7::: ... irc:*:16248:0:99999:7::: gnats:*:16248:0:99999:7::: nobody:*:16248:0:99999:7::: libuuid:!:16248:0:99999:7::: Debian-exim:!:16248:0:99999:7::: user:$6$CkJHVC8E$ykTJUix/7qmcPBJgqnJtCHlWhYfEaImqXcQyeRrwYm6Xi4KaZSfb4FB20ocZ/VlrQzTR2wiEobMxT/OM/FXgd0:16248:0:99999:7::: sshd:*:16248:0:99999:7::: ivan:$6$D8Ab58//$HG1E9BHP0YFi699I.JUnOSjpZh3B4kkw.PyhYWuJYle0JlAi5rZGUuXnat2YBPFclMgok/B.jKlL9jXKFIQVQ.:17252:0:99999:7::: petr:$6$m7i46clE$BIS5lc73S8cozpWGRcbiw6HW2q7kyGVkrToiC50IIfs8Zw/2JloPJumn/RpWlWvdwjUI/GCUEYxtQASMGTgrq1:17252:0:99999:7::: anna:!:17254:0:99999:7::: |
#chage -l ivan
Последний раз пароль был изменён : Мар 27, 2017 Срок действия пароля истекает : никогда Пароль будет деактивирован через : никогда Срок действия учётной записи истекает : никогда Минимальное количество дней между сменой пароля : 0 Максимальное количество дней между сменой пароля : 99999 Количество дней с предупреждением перед деактивацией пароля : 7 |
#chage -l root
Последний раз пароль был изменён : Июн 27, 2014 Срок действия пароля истекает : никогда Пароль будет деактивирован через : никогда Срок действия учётной записи истекает : никогда Минимальное количество дней между сменой пароля : 0 Максимальное количество дней между сменой пароля : 99999 Количество дней с предупреждением перед деактивацией пароля : 7 |
#cd /etc
|
#ls
acpi calendar discover.conf.d gshadow- iproute2 login.defs nail.rc profile.d resolv.conf skel ufw adduser.conf console-cyrillic discover-modprobe.conf host.conf issue logrotate.conf nanorc protocols rmt ssh vim adjtime console-setup dpkg hostname issue.net logrotate.d network python rpc ssl w3m aliases cron.d email-addresses hosts kbd lynx-cur networks python2.7 rsyslog.conf staff-group-for-usr-local wgetrc alternatives cron.daily environment hosts.allow kernel mailcap nsswitch.conf rc0.d rsyslog.d sudoers X11 apt cron.hourly exim4 hosts.deny kernel-img.conf mailcap.order opt rc1.d screenrc sudoers.d xml bash.bashrc cron.monthly fstab init ld.so.cache mailname os-release rc2.d securetty sysctl.conf zsh bash_completion crontab fstab.d init.d ld.so.conf manpath.config pam.conf rc3.d security sysctl.d bash_completion.d cron.weekly gai.conf initramfs-tools ld.so.conf.d mime.types pam.d rc4.d selinux systemd bindresvport.blacklist debconf.conf groff inittab lilalo mke2fs.conf passwd rc5.d services terminfo blkid.tab debian_version group inputrc locale.alias modprobe.d passwd- rc6.d sgml timezone blkid.tab.old default group- insserv locale.gen modules perl rc.local shadow trafshow ca-certificates deluser.conf grub.d insserv.conf localtime motd ppp rcS.d shadow- ucf.conf ca-certificates.conf dhcp gshadow insserv.conf.d logcheck mtab profile reportbug.conf shells udev |
#ls passwd
passwd passwd- |
#ls passwd-
passwd- |
#cat passwd-
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh ... irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh Debian-exim:x:101:103::/var/spool/exim4:/bin/false user:x:1000:1000:user,,,:/home/user:/bin/bash sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin ivan:x:1001:1001::/home/ivan:/bin/bash petr:x:1002:1002::/home/petr:/bin/bash anna:x:1003:1003::/home/anna:/bin/bash |
#cd default
|
#ls
acpid bsdmainutils console-setup cron devpts exim4 grub halt hwclock keyboard locale netdiag networking nss ntpdate rcS rsyslog ssh tmpfs useradd |
#cat useradd
# Default values for useradd(8) # # The SHELL variable specifies the default login shell on your # system. # Similar to DHSELL in adduser. However, we use "sh" here because # useradd is a low level utility and should be as general # as possible SHELL=/bin/sh # # The default group for users ... # EXPIRE= # # The SKEL variable specifies the directory containing "skeletal" user # files; in other words, files such as a sample .profile that will be # copied to the new user's home directory when it is created. # SKEL=/etc/skel # # Defines whether the mail spool should be created while # creating the account # CREATE_MAIL_SPOOL=yes |
#ls
acpid bsdmainutils console-setup cron devpts exim4 grub halt hwclock keyboard locale netdiag networking nss ntpdate rcS rsyslog ssh tmpfs useradd |
#cd ..
|
#cat login.defs
# # /etc/login.defs - Configuration control definitions for the login package. # # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. # If unspecified, some arbitrary (and possibly incorrect) value will # be assumed. All other items are optional - if not specified then # the described action or option will be inhibited. # # Comment lines (lines beginning with "#") and blank lines are ignored. # ... # These options are no more handled by shadow. # # # # Shadow utilities will display a warning if they # # still appear. # # # ################################################### # CLOSE_SESSIONS # LOGIN_STRING # NO_PASSWORD_CONSOLE # QMAIL_DIR |
#less login.defs
|
#deluser
Введите имя пользователя, которого вы хотите удалить: ^C |
#man deluser
|
#cat login.defs
# # /etc/login.defs - Configuration control definitions for the login package. # # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. # If unspecified, some arbitrary (and possibly incorrect) value will # be assumed. All other items are optional - if not specified then # the described action or option will be inhibited. # # Comment lines (lines beginning with "#") and blank lines are ignored. # ... # These options are no more handled by shadow. # # # # Shadow utilities will display a warning if they # # still appear. # # # ################################################### # CLOSE_SESSIONS # LOGIN_STRING # NO_PASSWORD_CONSOLE # QMAIL_DIR |
#cat /etc/default/
acpid console-setup devpts grub hwclock locale networking ntpdate rsyslog tmpfs bsdmainutils cron exim4 halt keyboard netdiag nss rcS ssh useradd |
#cat /etc/default/useradd
# Default values for useradd(8) # # The SHELL variable specifies the default login shell on your # system. # Similar to DHSELL in adduser. However, we use "sh" here because # useradd is a low level utility and should be as general # as possible SHELL=/bin/sh # # The default group for users ... # EXPIRE= # # The SKEL variable specifies the directory containing "skeletal" user # files; in other words, files such as a sample .profile that will be # copied to the new user's home directory when it is created. # SKEL=/etc/skel # # Defines whether the mail spool should be created while # creating the account # CREATE_MAIL_SPOOL=yes |
#cat /etc/gr
groff/ group group- grub.d/ |
#groupadd developers
|
#usermod -G de
debconf.conf debian_version default/ deluser.conf |
#usermod -G developers
ÐÑполÑзование: usermod [паÑамеÑÑÑ] ÐÐÐ , --comment ÐÐÐÐÐÐТÐÐ ÐРновое знаÑение Ð¿Ð¾Ð»Ñ GECOS -d, --home ÐÐÐ_ÐÐТ новÑй домаÑний каÑалог ÑÑÑÑной запиÑи -e, --expiredate ÐÐТÐ_УСТ ÑÑÑановиÑÑ Ð´Ð°ÑÑ Ð¾ÐºÐ¾Ð½ÑÐ°Ð½Ð¸Ñ Ð´ÐµÐ¹ÑÑÐ²Ð¸Ñ ÑÑÑÑной запиÑи в ÐÐТÐ_УСТ -f, --inactive ÐÐÐÐТÐÐÐÐСТЬ ÑÑÑановиÑÑ Ð¿ÐµÑиод неакÑивноÑÑи паÑÐ¾Ð»Ñ Ð¿Ð¾Ñле ÑÑÑаÑÐµÐ²Ð°Ð½Ð¸Ñ ÑÑÑÑной запиÑи ÑавнÑм ÐÐÐÐТÐÐÐÐСТЬ -g, --gid ÐРУÐÐРпÑинÑдиÑелÑно назнаÑиÑÑ Ð¿ÐµÑвиÑнÑÑ ÐРУÐÐУ -G, --groups ÐРУÐÐЫ ÑпиÑок дополниÑелÑнÑÑ ÐРУÐÐ -a, --append добавиÑÑ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ Ð² дополниÑелÑнÑе ... имеÑÑимÑÑ (не ÑникалÑнÑм) UID -p, --password ÐÐÐ ÐÐ¾Ð»Ñ Ð´Ð»Ñ ÑÑÑÑной запиÑи -R, --root ÐÐТ_CHROOT каÑалог, в коÑоÑÑй вÑполнÑеÑÑÑ chroot -s, --shell ÐÐÐолоÑка Ð´Ð»Ñ ÑÑÑÑной запиÑи -u, --uid UID новÑй UID Ð´Ð»Ñ ÑÑÑÑной запиÑи -U, --unlock ÑазблокиÑоваÑÑ ÑÑÑÑнÑÑ Ð·Ð°Ð¿Ð¸ÑÑ -Z, --selinux-user SEUSER новое полÑзоваÑелÑÑкое ÑопоÑÑавление SELinux Ð´Ð»Ñ ÑÑÑÑной запиÑи |
#usermod -G developers
ÐÑполÑзование: usermod [паÑамеÑÑÑ] ÐÐÐ , --comment ÐÐÐÐÐÐТÐÐ ÐРновое знаÑение Ð¿Ð¾Ð»Ñ GECOS -d, --home ÐÐÐ_ÐÐТ новÑй домаÑний каÑалог ÑÑÑÑной запиÑи -e, --expiredate ÐÐТÐ_УСТ ÑÑÑановиÑÑ Ð´Ð°ÑÑ Ð¾ÐºÐ¾Ð½ÑÐ°Ð½Ð¸Ñ Ð´ÐµÐ¹ÑÑÐ²Ð¸Ñ ÑÑÑÑной запиÑи в ÐÐТÐ_УСТ -f, --inactive ÐÐÐÐТÐÐÐÐСТЬ ÑÑÑановиÑÑ Ð¿ÐµÑиод неакÑивноÑÑи паÑÐ¾Ð»Ñ Ð¿Ð¾Ñле ÑÑÑаÑÐµÐ²Ð°Ð½Ð¸Ñ ÑÑÑÑной запиÑи ÑавнÑм ÐÐÐÐТÐÐÐÐСТЬ -g, --gid ÐРУÐÐРпÑинÑдиÑелÑно назнаÑиÑÑ Ð¿ÐµÑвиÑнÑÑ ÐРУÐÐУ -G, --groups ÐРУÐÐЫ ÑпиÑок дополниÑелÑнÑÑ ÐРУÐÐ -a, --append добавиÑÑ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ Ð² дополниÑелÑнÑе ... имеÑÑимÑÑ (не ÑникалÑнÑм) UID -p, --password ÐÐÐ ÐÐ¾Ð»Ñ Ð´Ð»Ñ ÑÑÑÑной запиÑи -R, --root ÐÐТ_CHROOT каÑалог, в коÑоÑÑй вÑполнÑеÑÑÑ chroot -s, --shell ÐÐÐолоÑка Ð´Ð»Ñ ÑÑÑÑной запиÑи -u, --uid UID новÑй UID Ð´Ð»Ñ ÑÑÑÑной запиÑи -U, --unlock ÑазблокиÑоваÑÑ ÑÑÑÑнÑÑ Ð·Ð°Ð¿Ð¸ÑÑ -Z, --selinux-user SEUSER новое полÑзоваÑелÑÑкое ÑопоÑÑавление SELinux Ð´Ð»Ñ ÑÑÑÑной запиÑи |
#usermod -G developers ivan
|
#id ivan
uid=1001(ivan) gid=1001(ivan) группы=1001(ivan),1004(developers) |
#finger ivan
Login: ivan Name: Ivasyk Telesyk Directory: /home/ivan Shell: /bin/bash Office: 9D, 911 Home Phone: 911-11-11 On since Thu Mar 30 09:45 (EEST) on pts/1 from 192.168.16.187 48 minutes 47 seconds idle No mail. No Plan. |
#user
useradd userdel usermod users |
#users
ivan root |
#man gpasswd
|
#cat /etc/passwd
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh ... irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh Debian-exim:x:101:103::/var/spool/exim4:/bin/false user:x:1000:1000:user,,,:/home/user:/bin/bash sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin ivan:x:1001:1001:Ivasyk Telesyk,9D,911,911-11-11,village:/home/ivan:/bin/bash petr:x:1002:1002::/home/petr:/bin/bash anna:x:1003:1003::/home/anna:/bin/bash |
#cat /etc/group
group group- |
#gpasswd
ÐÑполÑзование: gpasswd [паÑамеÑÑ] ÐРУÐÐÐ ÐаÑамеÑÑÑ: -a, --add ÐÐÐРУÐÐУ -d, --delete ÐÐÐУÐÐЫ -h, --help показаÑÑ Ð´Ð°Ð½Ð½Ð¾Ðµ ÑообÑение и законÑиÑÑ ÑабоÑÑ -Q, --root ÐÐТ_CHROOT каÑалог, коÑоÑÑй вÑполнÑеÑÑÑ chroot -r, --remove-password ÑдалиÑÑ Ð¿Ð°ÑÐ¾Ð»Ñ ÐРУÐÐЫ -R, --restrict огÑаниÑиÑÑ Ð´Ð¾ÑÑÑп в ÐРУÐÐУ ÐµÑ Ñленами -M, --members ÐÐÐЫ -A, --administrators ÐÐÐÐÐ,⦠задаÑÑ ÑпиÑок админиÑÑÑаÑоÑов ÐРУÐÐЫ Ðа иÑклÑÑением паÑамеÑÑов -A и -M, оÑÑалÑнÑе не могÑÑ ÑказÑваÑÑÑÑ Ð¾Ð´Ð½Ð¾Ð²Ñеменно. |
#gpasswd -A anna developers
|
#man passwd
|
#cat /etc/lo
locale.alias locale.gen localtime logcheck/ login.defs logrotate.conf logrotate.d/ |
#cat /etc/lo
locale.alias locale.gen localtime logcheck/ login.defs logrotate.conf logrotate.d/ |
#cat /etc/local
locale.alias locale.gen localtime |
#cat /etc/locale.co
cat: /etc/locale.co: Нет такого файла или каталога |
#cat /etc/locale.conf
cat: /etc/locale.conf: Нет такого файла или каталога |
#cat /etc/locale.gen
# This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add # user defined locales to /usr/local/share/i18n/SUPPORTED. If you change # this file, you need to rerun locale-gen. # aa_DJ ISO-8859-1 # aa_DJ.UTF-8 UTF-8 # aa_ER UTF-8 # aa_ER@saaho UTF-8 # aa_ET UTF-8 # af_ZA ISO-8859-1 ... # zh_HK.UTF-8 UTF-8 # zh_SG GB2312 # zh_SG.GBK GBK # zh_SG.UTF-8 UTF-8 # zh_TW BIG5 # zh_TW.EUC-TW EUC-TW # zh_TW.UTF-8 UTF-8 # zu_ZA ISO-8859-1 # zu_ZA.UTF-8 UTF-8 # ru_UA.UTF-8 UTF-8 |
#LANG=en_US.UTF8
|
#LANG=en_US.UTF-8
|
#LANG=en_US.UTF8
|
#passwd -l ivan
passwd: информация об истечении срока действия пароля изменена. |
#LANG=en_US.UTF
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "ru_UA:ru", LC_ALL = (unset), LANG = "en_US.UTF" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). |
#LANG=en_US
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "ru_UA:ru", LC_ALL = (unset), LANG = "en_US" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). |
acpid console-setup devpts grub hwclock locale networking ntpdate rsyslog tmpfs bsdmainutils cron exim4 halt keyboard netdiag nss rcS ssh useradd
# Default values for useradd(8) # # The SHELL variable specifies the default login shell on your # system. # Similar to DHSELL in adduser. However, we use "sh" here because # useradd is a low level utility and should be as general # as possible SHELL=/bin/sh # # The default group for users # 100=users on Debian systems # Same as USERS_GID in adduser # This argument is used when the -n flag is specified. # The default behavior (when -n and -g are not specified) is to create a # primary user group with the same name as the user being added to the # system. # GROUP=100 # # The default home directory. Same as DHOME for adduser # HOME=/home # # The number of days after a password expires until the account # is permanently disabled # INACTIVE=-1 # # The default expire date # EXPIRE= # # The SKEL variable specifies the directory containing "skeletal" user # files; in other words, files such as a sample .profile that will be # copied to the new user's home directory when it is created. # SKEL=/etc/skel # # Defines whether the mail spool should be created while # creating the account # CREATE_MAIL_SPOOL=yes
groff/ group group- grub.d/
root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4: tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20: fax:x:21: voice:x:22: cdrom:x:24:user floppy:x:25:user tape:x:26: sudo:x:27: audio:x:29:user dip:x:30:user www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44:user sasl:x:45: plugdev:x:46:user staff:x:50: games:x:60: users:x:100: nogroup:x:65534: libuuid:x:101: crontab:x:102: Debian-exim:x:103: ssh:x:104: user:x:1000: ivan:x:1001: petr:x:1002: anna:x:1003: developers:x:1004:ivan,petr
root:*:: daemon:*:: bin:*:: sys:*:: adm:*:: tty:*:: disk:*:: lp:*:: mail:*:: news:*:: uucp:*:: man:*:: proxy:*:: kmem:*:: dialout:*:: fax:*:: voice:*:: cdrom:*::user floppy:*::user tape:*:: sudo:*:: audio:*::user dip:*::user www-data:*:: backup:*:: operator:*:: list:*:: irc:*:: src:*:: gnats:*:: shadow:*:: utmp:*:: video:*::user sasl:*:: plugdev:*::user staff:*:: games:*:: users:*:: nogroup:*:: libuuid:!:: crontab:!:: Debian-exim:!:: ssh:!:: user:!:: ivan:!:: petr:!:: anna:!:: developers:!:anna:ivan,petr
locale.alias locale.gen localtime logcheck/ login.defs logrotate.conf logrotate.d/
locale.alias locale.gen localtime
# This file lists locales that you wish to have built. You can find a list # of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add # user defined locales to /usr/local/share/i18n/SUPPORTED. If you change # this file, you need to rerun locale-gen. # aa_DJ ISO-8859-1 # aa_DJ.UTF-8 UTF-8 # aa_ER UTF-8 # aa_ER@saaho UTF-8 # aa_ET UTF-8 # af_ZA ISO-8859-1 # af_ZA.UTF-8 UTF-8 # am_ET UTF-8 # an_ES ISO-8859-15 # an_ES.UTF-8 UTF-8 # ar_AE ISO-8859-6 # ar_AE.UTF-8 UTF-8 # ar_BH ISO-8859-6 # ar_BH.UTF-8 UTF-8 # ar_DZ ISO-8859-6 # ar_DZ.UTF-8 UTF-8 # ar_EG ISO-8859-6 # ar_EG.UTF-8 UTF-8 # ar_IN UTF-8 # ar_IQ ISO-8859-6 # ar_IQ.UTF-8 UTF-8 # ar_JO ISO-8859-6 # ar_JO.UTF-8 UTF-8 # ar_KW ISO-8859-6 # ar_KW.UTF-8 UTF-8 # ar_LB ISO-8859-6 # ar_LB.UTF-8 UTF-8 # ar_LY ISO-8859-6 # ar_LY.UTF-8 UTF-8 # ar_MA ISO-8859-6 # ar_MA.UTF-8 UTF-8 # ar_OM ISO-8859-6 # ar_OM.UTF-8 UTF-8 # ar_QA ISO-8859-6 # ar_QA.UTF-8 UTF-8 # ar_SA ISO-8859-6 # ar_SA.UTF-8 UTF-8 # ar_SD ISO-8859-6 # ar_SD.UTF-8 UTF-8 # ar_SY ISO-8859-6 # ar_SY.UTF-8 UTF-8 # ar_TN ISO-8859-6 # ar_TN.UTF-8 UTF-8 # ar_YE ISO-8859-6 # ar_YE.UTF-8 UTF-8 # as_IN.UTF-8 UTF-8 # ast_ES ISO-8859-15 # ast_ES.UTF-8 UTF-8 # az_AZ.UTF-8 UTF-8 # be_BY CP1251 # be_BY.UTF-8 UTF-8 # be_BY@latin UTF-8 # bem_ZM UTF-8 # ber_DZ UTF-8 # ber_MA UTF-8 # bg_BG CP1251 # bg_BG.UTF-8 UTF-8 # bn_BD UTF-8 # bn_IN UTF-8 # bo_CN UTF-8 # bo_IN UTF-8 # br_FR ISO-8859-1 # br_FR.UTF-8 UTF-8 # br_FR@euro ISO-8859-15 # bs_BA ISO-8859-2 # bs_BA.UTF-8 UTF-8 # byn_ER UTF-8 # ca_AD ISO-8859-15 # ca_AD.UTF-8 UTF-8 # ca_ES ISO-8859-1 # ca_ES.UTF-8 UTF-8 # ca_ES.UTF-8@valencia UTF-8 # ca_ES@euro ISO-8859-15 # ca_ES@valencia ISO-8859-15 # ca_FR ISO-8859-15 # ca_FR.UTF-8 UTF-8 # ca_IT ISO-8859-15 # ca_IT.UTF-8 UTF-8 # crh_UA UTF-8 # cs_CZ ISO-8859-2 # cs_CZ.UTF-8 UTF-8 # csb_PL UTF-8 # cv_RU UTF-8 # cy_GB ISO-8859-14 # cy_GB.UTF-8 UTF-8 # da_DK ISO-8859-1 # da_DK.UTF-8 UTF-8 # de_AT ISO-8859-1 # de_AT.UTF-8 UTF-8 # de_AT@euro ISO-8859-15 # de_BE ISO-8859-1 # de_BE.UTF-8 UTF-8 # de_BE@euro ISO-8859-15 # de_CH ISO-8859-1 # de_CH.UTF-8 UTF-8 # de_DE ISO-8859-1 # de_DE.UTF-8 UTF-8 # de_DE@euro ISO-8859-15 # de_LI.UTF-8 UTF-8 # de_LU ISO-8859-1 # de_LU.UTF-8 UTF-8 # de_LU@euro ISO-8859-15 # dv_MV UTF-8 # dz_BT UTF-8 # el_CY ISO-8859-7 # el_CY.UTF-8 UTF-8 # el_GR ISO-8859-7 # el_GR.UTF-8 UTF-8 # en_AG UTF-8 # en_AU ISO-8859-1 # en_AU.UTF-8 UTF-8 # en_BW ISO-8859-1 # en_BW.UTF-8 UTF-8 # en_CA ISO-8859-1 # en_CA.UTF-8 UTF-8 # en_DK ISO-8859-1 # en_DK.ISO-8859-15 ISO-8859-15 # en_DK.UTF-8 UTF-8 # en_GB ISO-8859-1 # en_GB.ISO-8859-15 ISO-8859-15 # en_GB.UTF-8 UTF-8 # en_HK ISO-8859-1 # en_HK.UTF-8 UTF-8 # en_IE ISO-8859-1 # en_IE.UTF-8 UTF-8 # en_IE@euro ISO-8859-15 # en_IN UTF-8 # en_NG UTF-8 # en_NZ ISO-8859-1 # en_NZ.UTF-8 UTF-8 # en_PH ISO-8859-1 # en_PH.UTF-8 UTF-8 # en_SG ISO-8859-1 # en_SG.UTF-8 UTF-8 # en_US ISO-8859-1 # en_US.ISO-8859-15 ISO-8859-15 en_US.UTF-8 UTF-8 # en_ZA ISO-8859-1 # en_ZA.UTF-8 UTF-8 # en_ZM UTF-8 # en_ZW ISO-8859-1 # en_ZW.UTF-8 UTF-8 # eo ISO-8859-3 # eo.UTF-8 UTF-8 # es_AR ISO-8859-1 # es_AR.UTF-8 UTF-8 # es_BO ISO-8859-1 # es_BO.UTF-8 UTF-8 # es_CL ISO-8859-1 # es_CL.UTF-8 UTF-8 # es_CO ISO-8859-1 # es_CO.UTF-8 UTF-8 # es_CR ISO-8859-1 # es_CR.UTF-8 UTF-8 # es_DO ISO-8859-1 # es_DO.UTF-8 UTF-8 # es_EC ISO-8859-1 # es_EC.UTF-8 UTF-8 # es_ES ISO-8859-1 # es_ES.UTF-8 UTF-8 # es_ES@euro ISO-8859-15 # es_GT ISO-8859-1 # es_GT.UTF-8 UTF-8 # es_HN ISO-8859-1 # es_HN.UTF-8 UTF-8 # es_MX ISO-8859-1 # es_MX.UTF-8 UTF-8 # es_NI ISO-8859-1 # es_NI.UTF-8 UTF-8 # es_PA ISO-8859-1 # es_PA.UTF-8 UTF-8 # es_PE ISO-8859-1 # es_PE.UTF-8 UTF-8 # es_PR ISO-8859-1 # es_PR.UTF-8 UTF-8 # es_PY ISO-8859-1 # es_PY.UTF-8 UTF-8 # es_SV ISO-8859-1 # es_SV.UTF-8 UTF-8 # es_US ISO-8859-1 # es_US.UTF-8 UTF-8 # es_UY ISO-8859-1 # es_UY.UTF-8 UTF-8 # es_VE ISO-8859-1 # es_VE.UTF-8 UTF-8 # et_EE ISO-8859-1 # et_EE.ISO-8859-15 ISO-8859-15 # et_EE.UTF-8 UTF-8 # eu_ES ISO-8859-1 # eu_ES.UTF-8 UTF-8 # eu_ES@euro ISO-8859-15 # eu_FR ISO-8859-1 # eu_FR.UTF-8 UTF-8 # eu_FR@euro ISO-8859-15 # fa_IR UTF-8 # ff_SN UTF-8 # fi_FI ISO-8859-1 # fi_FI.UTF-8 UTF-8 # fi_FI@euro ISO-8859-15 # fil_PH UTF-8 # fo_FO ISO-8859-1 # fo_FO.UTF-8 UTF-8 # fr_BE ISO-8859-1 # fr_BE.UTF-8 UTF-8 # fr_BE@euro ISO-8859-15 # fr_CA ISO-8859-1 # fr_CA.UTF-8 UTF-8 # fr_CH ISO-8859-1 # fr_CH.UTF-8 UTF-8 # fr_FR ISO-8859-1 # fr_FR.UTF-8 UTF-8 # fr_FR@euro ISO-8859-15 # fr_LU ISO-8859-1 # fr_LU.UTF-8 UTF-8 # fr_LU@euro ISO-8859-15 # fur_IT UTF-8 # fy_DE UTF-8 # fy_NL UTF-8 # ga_IE ISO-8859-1 # ga_IE.UTF-8 UTF-8 # ga_IE@euro ISO-8859-15 # gd_GB ISO-8859-15 # gd_GB.UTF-8 UTF-8 # gez_ER UTF-8 # gez_ER@abegede UTF-8 # gez_ET UTF-8 # gez_ET@abegede UTF-8 # gl_ES ISO-8859-1 # gl_ES.UTF-8 UTF-8 # gl_ES@euro ISO-8859-15 # gu_IN UTF-8 # gv_GB ISO-8859-1 # gv_GB.UTF-8 UTF-8 # ha_NG UTF-8 # he_IL ISO-8859-8 # he_IL.UTF-8 UTF-8 # hi_IN UTF-8 # hne_IN UTF-8 # hr_HR ISO-8859-2 # hr_HR.UTF-8 UTF-8 # hsb_DE ISO-8859-2 # hsb_DE.UTF-8 UTF-8 # ht_HT UTF-8 # hu_HU ISO-8859-2 # hu_HU.UTF-8 UTF-8 # hy_AM UTF-8 # hy_AM.ARMSCII-8 ARMSCII-8 # ia UTF-8 # id_ID ISO-8859-1 # id_ID.UTF-8 UTF-8 # ig_NG UTF-8 # ik_CA UTF-8 # is_IS ISO-8859-1 # is_IS.UTF-8 UTF-8 # it_CH ISO-8859-1 # it_CH.UTF-8 UTF-8 # it_IT ISO-8859-1 # it_IT.UTF-8 UTF-8 # it_IT@euro ISO-8859-15 # iu_CA UTF-8 # iw_IL ISO-8859-8 # iw_IL.UTF-8 UTF-8 # ja_JP.EUC-JP EUC-JP # ja_JP.UTF-8 UTF-8 # ka_GE GEORGIAN-PS # ka_GE.UTF-8 UTF-8 # kk_KZ PT154 # kk_KZ RK1048 # kk_KZ.UTF-8 UTF-8 # kl_GL ISO-8859-1 # kl_GL.UTF-8 UTF-8 # km_KH UTF-8 # kn_IN UTF-8 # ko_KR.EUC-KR EUC-KR # ko_KR.UTF-8 UTF-8 # kok_IN UTF-8 # ks_IN UTF-8 # ks_IN@devanagari UTF-8 # ku_TR ISO-8859-9 # ku_TR.UTF-8 UTF-8 # kw_GB ISO-8859-1 # kw_GB.UTF-8 UTF-8 # ky_KG UTF-8 # lg_UG ISO-8859-10 # lg_UG.UTF-8 UTF-8 # li_BE UTF-8 # li_NL UTF-8 # lo_LA UTF-8 # lt_LT ISO-8859-13 # lt_LT.UTF-8 UTF-8 # lv_LV ISO-8859-13 # lv_LV.UTF-8 UTF-8 # mai_IN UTF-8 # mg_MG ISO-8859-15 # mg_MG.UTF-8 UTF-8 # mi_NZ ISO-8859-13 # mi_NZ.UTF-8 UTF-8 # mk_MK ISO-8859-5 # mk_MK.UTF-8 UTF-8 # ml_IN UTF-8 # mn_MN UTF-8 # mr_IN UTF-8 # ms_MY ISO-8859-1 # ms_MY.UTF-8 UTF-8 # mt_MT ISO-8859-3 # mt_MT.UTF-8 UTF-8 # my_MM UTF-8 # nan_TW@latin UTF-8 # nb_NO ISO-8859-1 # nb_NO.UTF-8 UTF-8 # nds_DE UTF-8 # nds_NL UTF-8 # ne_NP UTF-8 # nl_AW UTF-8 # nl_BE ISO-8859-1 # nl_BE.UTF-8 UTF-8 # nl_BE@euro ISO-8859-15 # nl_NL ISO-8859-1 # nl_NL.UTF-8 UTF-8 # nl_NL@euro ISO-8859-15 # nn_NO ISO-8859-1 # nn_NO.UTF-8 UTF-8 # nr_ZA UTF-8 # nso_ZA UTF-8 # oc_FR ISO-8859-1 # oc_FR.UTF-8 UTF-8 # om_ET UTF-8 # om_KE ISO-8859-1 # om_KE.UTF-8 UTF-8 # or_IN UTF-8 # os_RU UTF-8 # pa_IN UTF-8 # pa_PK UTF-8 # pap_AN UTF-8 # pl_PL ISO-8859-2 # pl_PL.UTF-8 UTF-8 # ps_AF UTF-8 # pt_BR ISO-8859-1 # pt_BR.UTF-8 UTF-8 # pt_PT ISO-8859-1 # pt_PT.UTF-8 UTF-8 # pt_PT@euro ISO-8859-15 # ro_RO ISO-8859-2 # ro_RO.UTF-8 UTF-8 ru_RU ISO-8859-5 ru_RU.CP1251 CP1251 ru_RU.KOI8-R KOI8-R ru_RU.UTF-8 UTF-8 ru_UA KOI8-U ru_UA.UTF-8 UTF-8 # rw_RW UTF-8 # sa_IN UTF-8 # sc_IT UTF-8 # sd_IN UTF-8 # sd_IN@devanagari UTF-8 # se_NO UTF-8 # shs_CA UTF-8 # si_LK UTF-8 # sid_ET UTF-8 # sk_SK ISO-8859-2 # sk_SK.UTF-8 UTF-8 # sl_SI ISO-8859-2 # sl_SI.UTF-8 UTF-8 # so_DJ ISO-8859-1 # so_DJ.UTF-8 UTF-8 # so_ET UTF-8 # so_KE ISO-8859-1 # so_KE.UTF-8 UTF-8 # so_SO ISO-8859-1 # so_SO.UTF-8 UTF-8 # sq_AL ISO-8859-1 # sq_AL.UTF-8 UTF-8 # sq_MK UTF-8 # sr_ME UTF-8 # sr_RS UTF-8 # sr_RS@latin UTF-8 # ss_ZA UTF-8 # st_ZA ISO-8859-1 # st_ZA.UTF-8 UTF-8 # sv_FI ISO-8859-1 # sv_FI.UTF-8 UTF-8 # sv_FI@euro ISO-8859-15 # sv_SE ISO-8859-1 # sv_SE.ISO-8859-15 ISO-8859-15 # sv_SE.UTF-8 UTF-8 # sw_KE UTF-8 # sw_TZ UTF-8 # ta_IN UTF-8 # te_IN UTF-8 # tg_TJ KOI8-T # tg_TJ.UTF-8 UTF-8 # th_TH TIS-620 # th_TH.UTF-8 UTF-8 # ti_ER UTF-8 # ti_ET UTF-8 # tig_ER UTF-8 # tk_TM UTF-8 # tl_PH ISO-8859-1 # tl_PH.UTF-8 UTF-8 # tn_ZA UTF-8 # tr_CY ISO-8859-9 # tr_CY.UTF-8 UTF-8 # tr_TR ISO-8859-9 # tr_TR.UTF-8 UTF-8 # ts_ZA UTF-8 # tt_RU.UTF-8 UTF-8 # tt_RU.UTF-8@iqtelif UTF-8 # ug_CN UTF-8 # uk_UA KOI8-U # uk_UA.UTF-8 UTF-8 # ur_PK UTF-8 # uz_UZ ISO-8859-1 # uz_UZ.UTF-8 UTF-8 # uz_UZ@cyrillic UTF-8 # ve_ZA UTF-8 # vi_VN UTF-8 # vi_VN.TCVN TCVN5712-1 # wa_BE ISO-8859-1 # wa_BE.UTF-8 UTF-8 # wa_BE@euro ISO-8859-15 # wo_SN UTF-8 # xh_ZA ISO-8859-1 # xh_ZA.UTF-8 UTF-8 # yi_US CP1255 # yi_US.UTF-8 UTF-8 # yo_NG UTF-8 # zh_CN GB2312 # zh_CN.GB18030 GB18030 # zh_CN.GBK GBK # zh_CN.UTF-8 UTF-8 # zh_HK BIG5-HKSCS # zh_HK.UTF-8 UTF-8 # zh_SG GB2312 # zh_SG.GBK GBK # zh_SG.UTF-8 UTF-8 # zh_TW BIG5 # zh_TW.EUC-TW EUC-TW # zh_TW.UTF-8 UTF-8 # zu_ZA ISO-8859-1 # zu_ZA.UTF-8 UTF-8 # ru_UA.UTF-8 UTF-8
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh Debian-exim:x:101:103::/var/spool/exim4:/bin/false user:x:1000:1000:user,,,:/home/user:/bin/bash sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin ivan:x:1001:1001:Ivasyk Telesyk,9D,911,911-11-11,village:/home/ivan:/bin/bash petr:x:1002:1002::/home/petr:/bin/bash anna:x:1003:1003::/home/anna:/bin/bash
root:$6$ppY7xZxX$CnutMU4XxetHko6DW5K/ckfiA6CFeC0cbV/d6rrWE6F5iszqxAaQTwekH3.vBTQPNCakvqusvPcBecndLcbX8.:16248:0:99999:7::: daemon:*:16248:0:99999:7::: bin:*:16248:0:99999:7::: sys:*:16248:0:99999:7::: sync:*:16248:0:99999:7::: games:*:16248:0:99999:7::: man:*:16248:0:99999:7::: lp:*:16248:0:99999:7::: mail:*:16248:0:99999:7::: news:*:16248:0:99999:7::: uucp:*:16248:0:99999:7::: proxy:*:16248:0:99999:7::: www-data:*:16248:0:99999:7::: backup:*:16248:0:99999:7::: list:*:16248:0:99999:7::: irc:*:16248:0:99999:7::: gnats:*:16248:0:99999:7::: nobody:*:16248:0:99999:7::: libuuid:!:16248:0:99999:7::: Debian-exim:!:16248:0:99999:7::: user:$6$CkJHVC8E$ykTJUix/7qmcPBJgqnJtCHlWhYfEaImqXcQyeRrwYm6Xi4KaZSfb4FB20ocZ/VlrQzTR2wiEobMxT/OM/FXgd0:16248:0:99999:7::: sshd:*:16248:0:99999:7::: ivan:$6$D8Ab58//$HG1E9BHP0YFi699I.JUnOSjpZh3B4kkw.PyhYWuJYle0JlAi5rZGUuXnat2YBPFclMgok/B.jKlL9jXKFIQVQ.:17252:0:99999:7::: petr:$6$m7i46clE$BIS5lc73S8cozpWGRcbiw6HW2q7kyGVkrToiC50IIfs8Zw/2JloPJumn/RpWlWvdwjUI/GCUEYxtQASMGTgrq1:17252:0:99999:7::: anna:!:17254:0:99999:7:::
1942
# # /etc/login.defs - Configuration control definitions for the login package. # # Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. # If unspecified, some arbitrary (and possibly incorrect) value will # be assumed. All other items are optional - if not specified then # the described action or option will be inhibited. # # Comment lines (lines beginning with "#") and blank lines are ignored. # # Modified for Linux. --marekm # REQUIRED for useradd/userdel/usermod # Directory where mailboxes reside, _or_ name of file, relative to the # home directory. If you _do_ define MAIL_DIR and MAIL_FILE, # MAIL_DIR takes precedence. # # Essentially: # - MAIL_DIR defines the location of users mail spool files # (for mbox use) by appending the username to MAIL_DIR as defined # below. # - MAIL_FILE defines the location of the users mail spool files as the # fully-qualified filename obtained by prepending the user home # directory before $MAIL_FILE # # NOTE: This is no more used for setting up users MAIL environment variable # which is, starting from shadow 4.0.12-1 in Debian, entirely the # job of the pam_mail PAM modules # See default PAM configuration files provided for # login, su, etc. # # This is a temporary situation: setting these variables will soon # move to /etc/default/useradd and the variables will then be # no more supported MAIL_DIR /var/mail #MAIL_FILE .mail # # Enable logging and display of /var/log/faillog login failure info. # This option conflicts with the pam_tally PAM module. # FAILLOG_ENAB yes # # Enable display of unknown usernames when login failures are recorded. # # WARNING: Unknown usernames may become world readable. # See #290803 and #298773 for details about how this could become a security # concern LOG_UNKFAIL_ENAB no # # Enable logging of successful logins # LOG_OK_LOGINS no # # Enable "syslog" logging of su activity - in addition to sulog file logging. # SYSLOG_SG_ENAB does the same for newgrp and sg. # SYSLOG_SU_ENAB yes SYSLOG_SG_ENAB yes # # If defined, all su activity is logged to this file. # #SULOG_FILE /var/log/sulog # # If defined, file which maps tty line to TERM environment parameter. # Each line of the file is in a format something like "vt100 tty01". # #TTYTYPE_FILE /etc/ttytype # # If defined, login failures will be logged here in a utmp format # last, when invoked as lastb, will read /var/log/btmp, so... # FTMP_FILE /var/log/btmp # # If defined, the command name to display when running "su -". For # example, if this is defined as "su" then a "ps" will display the # command is "-su". If not defined, then "ps" would display the # name of the shell actually being run, e.g. something like "-sh". # SU_NAME su # # If defined, file which inhibits all the usual chatter during the login # sequence. If a full pathname, then hushed mode will be enabled if the # user's name or shell are found in the file. If not a full pathname, then # hushed mode will be enabled if the file exists in the user's home directory. # HUSHLOGIN_FILE .hushlogin #HUSHLOGIN_FILE /etc/hushlogins # # *REQUIRED* The default PATH settings, for superuser and normal users. # # (they are minimal, add the rest in the shell startup files) ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games # # Terminal permissions # # TTYGROUP Login tty will be assigned this group ownership. # TTYPERM Login tty will be set to this permission. # # If you have a "write" program which is "setgid" to a special group # which owns the terminals, define TTYGROUP to the group number and # TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign # TTYPERM to either 622 or 600. # # In Debian /usr/bin/bsd-write or similar programs are setgid tty # However, the default and recommended value for TTYPERM is still 0600 # to not allow anyone to write to anyone else console or terminal # Users can still allow other people to write them by issuing # the "mesg y" command. TTYGROUP tty TTYPERM 0600 # # Login configuration initializations: # # ERASECHAR Terminal ERASE character ('\010' = backspace). # KILLCHAR Terminal KILL character ('\025' = CTRL/U). # UMASK Default "umask" value. # # The ERASECHAR and KILLCHAR are used only on System V machines. # # UMASK is the default umask value for pam_umask and is used by # useradd and newusers to set the mode of the new home directories. # 022 is the "historical" value in Debian for UMASK # 027, or even 077, could be considered better for privacy # There is no One True Answer here : each sysadmin must make up his/her # mind. # # Prefix these values with "0" to get octal, "0x" to get hexadecimal. # ERASECHAR 0177 KILLCHAR 025 UMASK 022 # # Password aging controls: # # PASS_MAX_DAYS Maximum number of days a password may be used. # PASS_MIN_DAYS Minimum number of days allowed between password changes. # PASS_WARN_AGE Number of days warning given before a password expires. # PASS_MAX_DAYS 99999 PASS_MIN_DAYS 0 PASS_WARN_AGE 7 # # Min/max values for automatic uid selection in useradd # UID_MIN 1000 UID_MAX 60000 # System accounts #SYS_UID_MIN 100 #SYS_UID_MAX 999 # # Min/max values for automatic gid selection in groupadd # GID_MIN 1000 GID_MAX 60000 # System accounts #SYS_GID_MIN 100 #SYS_GID_MAX 999 # # Max number of login retries if password is bad. This will most likely be # overriden by PAM, since the default pam_unix module has it's own built # in of 3 retries. However, this is a safe fallback in case you are using # an authentication module that does not enforce PAM_MAXTRIES. # LOGIN_RETRIES 5 # # Max time in seconds for login # LOGIN_TIMEOUT 60 # # Which fields may be changed by regular users using chfn - use # any combination of letters "frwh" (full name, room number, work # phone, home phone). If not defined, no changes are allowed. # For backward compatibility, "yes" = "rwh" and "no" = "frwh". # CHFN_RESTRICT rwh # # Should login be allowed if we can't cd to the home directory? # Default in no. # DEFAULT_HOME yes # # If defined, this command is run when removing a user. # It should remove any at/cron/print jobs etc. owned by # the user to be removed (passed as the first argument). # #USERDEL_CMD /usr/sbin/userdel_local # # If set to yes, userdel will remove the user´s group if it contains no # more members, and useradd will create by default a group with the name # of the user. # # Other former uses of this variable such as setting the umask when # user==primary group are not used in PAM environments, such as Debian # USERGROUPS_ENAB yes # # Instead of the real user shell, the program specified by this parameter # will be launched, although its visible name (argv[0]) will be the shell's. # The program may do whatever it wants (logging, additional authentification, # banner, ...) before running the actual shell. # # FAKE_SHELL /bin/fakeshell # # If defined, either full pathname of a file containing device names or # a ":" delimited list of device names. Root logins will be allowed only # upon these devices. # # This variable is used by login and su. # #CONSOLE /etc/consoles #CONSOLE console:tty01:tty02:tty03:tty04 # # List of groups to add to the user's supplementary group set # when logging in on the console (as determined by the CONSOLE # setting). Default is none. # # Use with caution - it is possible for users to gain permanent # access to these groups, even when not logged in on the console. # How to do it is left as an exercise for the reader... # # This variable is used by login and su. # #CONSOLE_GROUPS floppy:audio:cdrom # # If set to "yes", new passwords will be encrypted using the MD5-based # algorithm compatible with the one used by recent releases of FreeBSD. # It supports passwords of unlimited length and longer salt strings. # Set to "no" if you need to copy encrypted passwords to other systems # which don't understand the new algorithm. Default is "no". # # This variable is deprecated. You should use ENCRYPT_METHOD. # #MD5_CRYPT_ENAB no # # If set to MD5 , MD5-based algorithm will be used for encrypting password # If set to SHA256, SHA256-based algorithm will be used for encrypting password # If set to SHA512, SHA512-based algorithm will be used for encrypting password # If set to DES, DES-based algorithm will be used for encrypting password (default) # Overrides the MD5_CRYPT_ENAB option # # Note: It is recommended to use a value consistent with # the PAM modules configuration. # ENCRYPT_METHOD SHA512 # # Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. # # Define the number of SHA rounds. # With a lot of rounds, it is more difficult to brute forcing the password. # But note also that it more CPU resources will be needed to authenticate # users. # # If not specified, the libc will choose the default number of rounds (5000). # The values must be inside the 1000-999999999 range. # If only one of the MIN or MAX values is set, then this value will be used. # If MIN > MAX, the highest value will be used. # # SHA_CRYPT_MIN_ROUNDS 5000 # SHA_CRYPT_MAX_ROUNDS 5000 ################# OBSOLETED BY PAM ############## # # # These options are now handled by PAM. Please # # edit the appropriate file in /etc/pam.d/ to # # enable the equivelants of them. # ############### #MOTD_FILE #DIALUPS_CHECK_ENAB #LASTLOG_ENAB #MAIL_CHECK_ENAB #OBSCURE_CHECKS_ENAB #PORTTIME_CHECKS_ENAB #SU_WHEEL_ONLY #CRACKLIB_DICTPATH #PASS_CHANGE_TRIES #PASS_ALWAYS_WARN #ENVIRON_FILE #NOLOGINS_FILE #ISSUE_FILE #PASS_MIN_LEN #PASS_MAX_LEN #ULIMIT #ENV_HZ #CHFN_AUTH #CHSH_AUTH #FAIL_DELAY ################# OBSOLETED ####################### # # # These options are no more handled by shadow. # # # # Shadow utilities will display a warning if they # # still appear. # # # ################################################### # CLOSE_SESSIONS # LOGIN_STRING # NO_PASSWORD_CONSOLE # QMAIL_DIR
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh Debian-exim:x:101:103::/var/spool/exim4:/bin/false user:x:1000:1000:user,,,:/home/user:/bin/bash sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin ivan:x:1001:1001::/home/ivan:/bin/bash petr:x:1002:1002::/home/petr:/bin/bash anna:x:1003:1003::/home/anna:/bin/bash
#!/bin/bash if [ $# -gt 1 ] then exit 2 fi users=`awk -F: '$3>=1000&&$3!=65534{print $1}' /etc/passwd | tr "\n" " "` for user in $users do echo "Changing shell for user $user" usermod -s /bin/${1:-bash} $user done
# Default values for useradd(8) # # The SHELL variable specifies the default login shell on your # system. # Similar to DHSELL in adduser. However, we use "sh" here because # useradd is a low level utility and should be as general # as possible SHELL=/bin/sh # # The default group for users # 100=users on Debian systems # Same as USERS_GID in adduser # This argument is used when the -n flag is specified. # The default behavior (when -n and -g are not specified) is to create a # primary user group with the same name as the user being added to the # system. # GROUP=100 # # The default home directory. Same as DHOME for adduser # HOME=/home # # The number of days after a password expires until the account # is permanently disabled # INACTIVE=-1 # # The default expire date # EXPIRE= # # The SKEL variable specifies the directory containing "skeletal" user # files; in other words, files such as a sample .profile that will be # copied to the new user's home directory when it is created. # SKEL=/etc/skel # # Defines whether the mail spool should be created while # creating the account # CREATE_MAIL_SPOOL=yes
Время первой команды журнала | 13:59:10 2017- 3-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:45:19 2017- 3-30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 12.87 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.53 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008