| /l3/users/16-07-2018/NT-Ladm/debian5.net.nt/root :1 :2 :3 |
|
|
#useradd ivan
|
|
#echo $?
0 |
|
#useradd ivan
useradd: пользователь «ivan» уже существует |
|
#echo $?
9 |
|
#useradd --help
ÐÑполÑзование: useradd [паÑамеÑÑÑ] ÐÐÐ
seradd -D
useradd -D [паÑамеÑÑÑ]
ÐаÑамеÑÑÑ:
-b, --base-dir ÐÐÐ_ÐÐТ базовÑй каÑалог Ð´Ð»Ñ Ð´Ð¾Ð¼Ð°Ñнего каÑалога новой
ÑÑÑÑной запиÑи
-c, --comment ÐÐÐÐÐÐТÐÐ ÐРполе GECOS новой ÑÑÑÑной запиÑи
-d, --home-dir ÐÐÐ_ÐÐТ домаÑний каÑалог новой ÑÑÑÑной запиÑи
-D, --defaults показаÑÑ Ð¸Ð»Ð¸ измениÑÑ Ð½Ð°ÑÑÑойки
по ÑмолÑÐ°Ð½Ð¸Ñ Ð´Ð»Ñ useradd
...
-p, --password ÐÐÐ ÐÐÑÑной запиÑи
-r, --system ÑоздаÑÑ ÑиÑÑемнÑÑ ÑÑÑÑнÑÑ Ð·Ð°Ð¿Ð¸ÑÑ
-R, --root ÐÐТ_CHROOT каÑалог, в коÑоÑÑй вÑполнÑеÑÑÑ chroot
-s, --shell ÐÐÐРновой
ÑÑÑÑной запиÑи
-u, --uid UID полÑзоваÑелÑÑкий ID новой ÑÑÑÑной запиÑи
-U, --user-group ÑоздаÑÑ Ð³ÑÑÐ¿Ð¿Ñ Ñ Ñем же именем ÑÑо и Ñ
полÑзоваÑелÑ
-Z, --selinux-user SEUSER иÑполÑзоваÑÑ Ñказанного SEUSER длÑ
полÑзоваÑелÑÑкого ÑопоÑÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ SELinux
|
|
#$lang
|
|
#LANG=``
|
|
#$$LANG=``
l3script: 2375LANG=: command not found |
|
#man useradd
|
|
#passwd ivan
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
|
#userdel ivan
|
|
#useradd --help
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options]
Options:
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-D, --defaults print or change default useradd configuration
-e, --expiredate EXPIRE_DATE expiration date of the new account
...
the user
-o, --non-unique allow to create users with duplicate
(non-unique) UID
-p, --password PASSWORD encrypted password of the new account
-r, --system create a system account
-R, --root CHROOT_DIR directory to chroot into
-s, --shell SHELL login shell of the new account
-u, --uid UID user ID of the new account
-U, --user-group create a group with the same name as the user
-Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
|
|
#useradd -m -s /bin/bash ivan
|
|
#passwd ivan
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
|
#useradd -m -s /bin/bash petr
|
|
#passwd petr
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
|
#useradd -m -s /bin/bash petr
useradd: user 'petr' already exists |
|
#cd /
|
|
#cd ..
|
|
#cd ivan
l3script: cd: ivan: No such file or directory |
|
#cd root
|
|
#cd ..
|
|
#cd home
|
|
#cd ivan
|
|
#cd home/ivan
l3script: cd: home/ivan: No such file or directory |
|
#cd ivan
l3script: cd: ivan: No such file or directory |
|
#cd
|
|
#cd /home/ivan
|
|
#cd
|
|
#ls -l
total 8 -rw-r--r-- 1 root root 5268 Oct 13 2014 install |
|
#ls -la
total 56 drwx------ 5 root root 4096 Jul 16 10:01 . drwxr-xr-x 24 root root 4096 Oct 15 2014 .. drwx------ 2 root root 4096 Jun 27 2014 .aptitude -rw------- 1 root root 1896 Oct 15 2014 .bash_history -rw-r--r-- 1 root root 10 Jun 27 2014 .bash_profile -rw-r--r-- 1 root root 630 Jun 27 2014 .bashrc -rw-r--r-- 1 root root 51 Jul 13 14:53 .l3rc drwxr-xr-x 2 root root 4096 Jul 16 10:06 .lilalo -rw-r--r-- 1 root root 140 Nov 19 2007 .profile drwxr-xr-x 2 root root 4096 Jun 27 2014 .vim -rw------- 1 root root 5369 Jul 16 10:01 .viminfo -rw-r--r-- 1 root root 5268 Oct 13 2014 install |
|
#ls -la --colot
ls: unrecognized option '--colot' Try `ls --help' for more information. |
|
#ls -la --color
total 56 drwx------ 5 root root 4096 Jul 16 10:01 . drwxr-xr-x 24 root root 4096 Oct 15 2014 .. drwx------ 2 root root 4096 Jun 27 2014 .aptitude -rw------- 1 root root 1896 Oct 15 2014 .bash_history -rw-r--r-- 1 root root 10 Jun 27 2014 .bash_profile -rw-r--r-- 1 root root 630 Jun 27 2014 .bashrc -rw-r--r-- 1 root root 51 Jul 13 14:53 .l3rc drwxr-xr-x 2 root root 4096 Jul 16 10:06 .lilalo -rw-r--r-- 1 root root 140 Nov 19 2007 .profile drwxr-xr-x 2 root root 4096 Jun 27 2014 .vim -rw------- 1 root root 5369 Jul 16 10:01 .viminfo -rw-r--r-- 1 root root 5268 Oct 13 2014 install |
|
#alias ls=`ls --color
> alias ls=`ls --color` > alias ls=`ls --color alias ls='ls --color' l3script: alias: --colorls: not found l3script: alias: --color: not found |
|
#alias
alias ls='ls --color' |
|
#who
root pts/0 Jul 16 09:55 (192.168.15.124) ivan pts/2 Jul 16 10:42 (192.168.15.124) user pts/3 Jul 16 10:51 (192.168.15.124) |
|
#echo privet >/dev/pts/2
|
|
#ls
install |
|
#mailq
|
|
#who
root pts/0 Jul 16 09:55 (192.168.15.124) ivan pts/2 Jul 16 10:42 (192.168.15.124) user pts/3 Jul 16 10:51 (192.168.15.124) |
|
#which who
/usr/bin/who |
|
#ls-l /usr/bin/who
l3script: ls-l: command not found |
|
#ls -l /usr/bin/who
-rwxr-xr-x 1 root root 55888 Jan 26 2013 /usr/bin/who |
|
#wich mailq
l3script: wich: command not found |
|
#wich maailq
l3script: wich: command not found |
|
#wich mailq
l3script: wich: command not found |
|
#which mailq
/usr/bin/mailq |
|
#ls -l /usr/sbin/exim4
-rwsr-xr-x 1 root root 973824 Jan 2 2013 /usr/sbin/exim4 |
|
#ls -l /dev/cdrom1
lrwxrwxrwx 1 root root 3 Jul 16 08:39 /dev/cdrom1 -> sr0 |
|
#ls -l /dev/sr0
brw-rw---T 1 root cdrom 11, 0 Jul 16 08:39 /dev/sr0 |
|
#mkfifo /tmp/test
|
|
#ls -l /tmp/test
prw-r--r-- 1 root root 0 Jul 16 12:03 /tmp/test |
|
#echo privet > /tmp/test
ls -l /dev/log who cd netstat ^Cl3script: /tmp/test: Interrupted system call |
|
#echo privet > /tmp/test
|
|
#netstat
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 debian5.net.nt:ssh 192.168.15.124:49364 ESTABLISHED tcp 0 432 debian5.net.nt:ssh 192.168.15.124:49187 ESTABLISHED tcp 0 0 debian5.net.nt:ssh 192.168.15.124:49363 ESTABLISHED Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node Path unix 6 [ ] DGRAM 5065 /dev/log unix 3 [ ] STREAM CONNECTED 7073 unix 3 [ ] STREAM CONNECTED 7072 unix 2 [ ] DGRAM 7071 unix 3 [ ] STREAM CONNECTED 6788 unix 3 [ ] STREAM CONNECTED 6787 unix 2 [ ] DGRAM 6786 unix 2 [ ] DGRAM 5473 unix 2 [ ] DGRAM 5113 unix 3 [ ] DGRAM 3249 unix 3 [ ] DGRAM 3248 |
|
#cd /home/ivan
|
|
#cd /home/petr
|
|
#cd -
/home/ivan |
|
#cd -
/home/petr |
|
|