/l3/users/eb/2009/linux3/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
#cat gajim.strace
% time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 43.10 0.000503 0 1963 1159 read 36.93 0.000431 0 1095 select 15.85 0.000185 0 1215 gettimeofday 4.11 0.000048 0 593 writev 0.00 0.000000 0 1 restart_syscall 0.00 0.000000 0 28 write 0.00 0.000000 0 13 open 0.00 0.000000 0 13 close ... 0.00 0.000000 0 45 _llseek 0.00 0.000000 0 576 poll 0.00 0.000000 0 45 getcwd 0.00 0.000000 0 11 mmap2 0.00 0.000000 0 66 40 stat64 0.00 0.000000 0 23 fstat64 0.00 0.000000 0 33 fcntl64 0.00 0.000000 0 32 futex ------ ----------- ----------- --------- --------- ---------------- 100.00 0.001167 5777 1204 total |
#strace -p 3567 -o gajim.strace
Process 3567 attached - interrupt to quit ^CProcess 3567 detached |
#!l
ls -l gajim.strace -rw-r--r-- 1 root root 397885 2009-05-28 12:29 gajim.strace |
#grep write gajim.strace
writev(8, [{"\200\1\2\0\373\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8 writev(4, [{"5\30\4\0\240\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\241\22\300\1\240\22\300\1'\0\0\0"..., 256}, {NULL, 0}, {"", 0}], 3) = 256 writev(4, [{"5\30\4\0\242\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\243\22\300\1\242\22\300\1'\0\0\0"..., 200}, {NULL, 0}, {"", 0}], 3) = 200 writev(4, [{"5\30\4\0\244\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\245\22\300\1\244\22\300\1'\0\0\0"..., 256}, {NULL, 0}, {"", 0}], 3) = 256 writev(8, [{"\200\1\2\0\373\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8 writev(4, [{"5\30\4\0\246\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\247\22\300\1\246\22\300\1'\0\0\0"..., 200}, {NULL, 0}, {"", 0}], 3) = 200 writev(4, [{"5\30\4\0\250\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\251\22\300\1\250\22\300\1'\0\0\0"..., 256}, {NULL, 0}, {"", 0}], 3) = 256 writev(4, [{"5\30\4\0\252\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\253\22\300\1\252\22\300\1'\0\0\0"..., 200}, {NULL, 0}, {"", 0}], 3) = 200 writev(4, [{"5\30\4\0\254\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\255\22\300\1\254\22\300\1'\0\0\0"..., 256}, {NULL, 0}, {"", 0}], 3) = 256 writev(8, [{"\200\1\2\0\373\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8 ... writev(4, [{"&\30\2\0006\22\300\1", 8}, {NULL, 0}, {"", 0}], 3) = 8 writev(4, [{"5\30\4\0\266\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\267\22\300\1\266\22\300\1'\0\0\0"..., 160}, {NULL, 0}, {"", 0}], 3) = 160 writev(4, [{"5\30\4\0\270\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\271\22\300\1\270\22\300\1'\0\0\0"..., 216}, {NULL, 0}, {"", 0}], 3) = 216 writev(4, [{"5\30\4\0\272\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\273\22\300\1\272\22\300\1'\0\0\0"..., 160}, {NULL, 0}, {"", 0}], 3) = 160 writev(8, [{"\200\1\2\0\373\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8 writev(4, [{"5\30\4\0\274\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\275\22\300\1\274\22\300\1'\0\0\0"..., 216}, {NULL, 0}, {"", 0}], 3) = 216 writev(4, [{"5\30\4\0\276\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\277\22\300\1\276\22\300\1'\0\0\0"..., 160}, {NULL, 0}, {"", 0}], 3) = 160 writev(4, [{"5\30\4\0\300\22\300\0019\22\300\1\3\0\f\0\223\4\5\0\301\22\300\1\300\22\300\1'\0\0\0"..., 216}, {NULL, 0}, {"", 0}], 3) = 216 writev(4, [{"5\30\4\0\302\22\300\0017\22\300\1\344\1\24\0\223\4\5\0\303\22\300\1\302\22\300\1'\0\0\0"..., 420}, {NULL, 0}, {"", 0}], 3) = 420 writev(8, [{"\200\1\2\0\373\0\0\0", 8}, {NULL, 0}, {"", 0}], 3) = 8 |
#rm gajim.strace
|
#apt-get install miscfiles
Reading package lists... Done Building dependency tree Reading state information... Done miscfiles is already the newest version. miscfiles set to manually installed. The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head 20
head: cannot open `20' for reading: No such file or directory |
#zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -20
aaron ada adam adlai adrian adrienne agatha agnetha ahmed ahmet aimee al alain alan alasdair alastair albert alberto alejandro alex |
#tail -f user_list
chris rIkDHN77 christian oaKcWNj4tgHVJxbDMqQNDwn0x2oJzKdUQyEwZUwzRyFsGJqOsZctcJfiq7Mkq christie Hk9d9jTMolmlVPxH6BLAXXpnm7DWcbH1tivsAHvQOyIlgBHkH8zKVhXFU0sA7sKGLQTE3 christina lLsh7ccj4kFBGWPBoem1l christofer VECWzYGUqSlhSnvIbZBwD78qbverbHNXsRa2TYU7wv4KeFMvPUzYtrCYPkWDqNNCObD3hhz3DMqIH9bQCoKYnZ2Nvv7M7gQLoY7OS1xthdNz8AUnXDg8XxkHVQHCg9DtbfCotzmm425CJ30VS3ezQ9ULiPdGXRT5ut3xQ1oYWUPPi5fkYIJ8niTIGkG christophe T0l13 christopher 4kVdlp9L0G21yn0m chuck AKQsYMrH29qEEtWFJKThWzt5ebXFBnOD8tPWvehaJUcPSv1PszcroJ5YCO2d2aGEna6fVReS5AQ7KTEVsDcdmYPfJLo8RNZKqiT3GGsaBuJNsjw3vRzRFeWIx2KAWEP8XsJM0KDpfWa0dxW0rWhGFXOC1rRBNRadXd0ugmp0zAnLsRAirnxrmEJk0SS1 cinderella gHxXjH cindie ueaeVNNGzjuB3f4ieARTFwmvf5zcW4n0PlomNi2osCcX1zYZGWWYa4f ^C |
#chmod +x create_users
|
#ls -l create_users
-rwxr-xr-x 1 root root 211 2009-05-28 12:45 create_users |
#./create_users
|
#~
> ./user_list grep -x ...... | head -1` zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "create_users" 8L, 228C written |
#./create_users
|
#tail -f user_list
aaron 3NI8zL ada CMot1j adam Qll1Va adlai JR2xvi adrian X8XJMd ^C |
#tail -f user_list
aaron yN ada bZ4R adam PsfKp adlai ps adrian 2dF adrienne wpGV ^C |
#./create_users
|
#vi create_users
|
#useradd
Usage: useradd [options] LOGIN Options: -b, --base-dir BASE_DIR base directory for the new user account home directory -c, --comment COMMENT set the GECOS field for the new user account -d, --home-dir HOME_DIR home directory for the new user account -D, --defaults print or save modified default useradd configuration -e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -f, --inactive INACTIVE set password inactive after expiration ... the user -o, --non-unique allow create user with duplicate (non-unique) UID -p, --password PASSWORD use encrypted password for the new user account -r, --system create a system account -s, --shell SHELL the login shell for the new user account -u, --uid UID force use the UID for the new user 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 |
#tail -f user_list
aaron xXHjJ ada uLrLz adam lPn9F ^C |
#./create_users
Enter new UNIX password: Retype new UNIX password: Sorry, passwords do not match passwd: Authentication token manipulation error passwd: password unchanged Enter new UNIX password: Retype new UNIX password: Sorry, passwords do not match passwd: Authentication token manipulation error passwd: password unchanged Enter new UNIX password: Retype new UNIX password: Sorry, passwords do not match passwd: Authentication token manipulation error passwd: password unchanged |
#vi create_users
|
#ls -l /home/
total 16 drwxr-xr-x 2 aaron aaron 4096 2009-05-28 12:51 aaron drwxr-xr-x 2 ada ada 4096 2009-05-28 12:51 ada drwxr-xr-x 2 adam adam 4096 2009-05-28 12:51 adam drwxr-xr-x 31 user user 4096 2009-05-28 09:33 user |
#userdel
Usage: userdel [options] LOGIN Options: -f, --force force removal of files, even if not owned by user -h, --help display this help message and exit -r, --remove remove home directory and mail spool |
#userdel -f aaron
|
#userdel -f ada
|
#userdel -f adam
|
#( echo 123 ; echo 123 ) | passwd user
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#passwd user
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#./create_users
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: passwd: Authentication token manipulation error passwd: password unchanged Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#tail -f user_list
anastasia anatole anatoly X5 anderson 9j andre SucF andrea Zuye andreas andrew G3 andries andy ... antony Mo2HY anya 1A april y archibald geGW archie PPDo ariel zJmJ arlene arne hO arnold P ^C |
#ls -l *users
-rwxr-xr-x 1 root root 296 2009-05-28 12:54 create_users -rwxr-xr-x 1 root root 296 2009-05-28 13:59 del_users |
#vi del_users
|
#cat create_users
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep -v ...... | head -1` useradd -m $username ( echo $pass ; echo $pass ) | passwd $username echo $username $pass >> ./user_list done |
#cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep -Ðv ^\n
7hBZ89da5xhpmgIJE7jcZPhlUur7QYFwF2yI1vd7HlNdIuMc8lTiOdxBQSBmUOcVeeUxHqvJUtlWYXtlvBnk7qVKP5fjcTDiVuo0WooW89pHsdTkNNheFPPVNwWMtuGIpY22YxrEBfLaIE 4ybQuktenL3i6FtoQyqHxbyDq5WofHb4PnfoU7nhNwDeLaZKwQef7JyWLdZVC4IYWBBVw4EWGsM6VcWJjL7MCIIHXuOeEZR9fo085WuJ5zOEcoMu0Kpkk6sra2bH4764 3Fs45uOga4TA0puwhCJc1 B89jCQtfGpYmOulXXcg9Ur73m6o0vlS6LsGT2s4acyoeH4pP6V2E1LbRCEdm4msNa4fv7n 9XbZP3Cyotem5pQMzcGW5tvvf2eQ3wVJHkLab1QsVvIxI4SVhfPPP6ItcXEGpomFDwGpCuVPZ5eTDgmo6Tt5fpvFmAci9 l5EWdRcqhm 3hhuKlueVjtCQZCmaL7JXtWgsBMQTsXb17AKxkNEonJf 6c9ffxDWDQAUCjfHplZK9KFoWfUk57peUzUMHgQSWCw52Oz5fv6B084CiACVkLIsOudNgIrJTcLGVjfDYiD0Qhccwl6N4fm6mDzZOjPqL1bmSrlE7bi7P7PIE9c8YCxz5UlZ99Oj6zV23qAICyXi RfkFltFhlpV9LoMqJVwB3ozbuOEWin2MEx9ChodgzOohheIeULT3ipV6Mdnlv59hZESbqxSNKV9bd1W8SxFCkUSRGG TSdbAmcfVlgQi2aeN24kLheKfg3p5r1BBk0XWIzFbFpgSpTBN4NReAq7ifL9tprjD5Gg2SpefGs8e0FnieRPP4dh ... VFDRfBX7X4iASkbYJvdwRLOItGJx1YoPyOpaFxmSEITyqwDCmp0MkilbD0AMkgahTySJ1k9LfhyqOPyBBUeEZYsM46kR1w0eZWBCEhgjzMOhsV1QvBRimigxW6BbnIKYHMLbDmIz2XzeqTI07rRhuiV M8LcSuIfzWOieHn4HILknJWXcIDnBBceoN9NzFmaUClYnXE8N3c6JUTljC8QkKEFHdcgqU5Y31Td00GnBvf6yQnAs04YWk5BxPtrnabK1g tgFhmkJAg6hSQAM2cIvzaPXziFrkehsV43LjsqNJtna0KlxGXE ux2r74QY3giG1ObVEQVo6oOxu8yosH7ztgB6kabSlK4KP6Pbxtqn3r2bjvyg3PRz8vRlW9804nafA3AhUFe46MAEaciPj64eMunpaW9eATJNTwAN8yJHyVp1wHSSNfF4P27ihky8IDWVTMcrvKfC0noKu6 qrIQadryDuO5dkJCuiduvQZOX4mjfWRbOK2xQ7ZPxSOWQVOzMRoeuuqyRNoHEEIt4sqqVgGpvJpBQystYjyK9skYG5Sht5cv4YYxK0HsBcTSJszNMSXf5iKfTph9f6aaEEBtM98MdXO5Z2hynJZxE7ulO1ksxOGAZuwsOgPapXNHavwI4HBaAlqD BHb0iMFxsfNfwnBaSLkPkDiEn5dcJ4uXKWkGsUj 1lTnGfu3aFjuDFmnV2nq3qdrulosw0sx5PMxP1mL0kINtHAfaUO5CrRnWvECff0iQekexkZeH6w2uFCfX2dHCd NuK kqnz9yfXAciE9fzk2G5nSzbHuY4fVZJpEShNF8QhQL6BPp2klHwur9b5a6siijaBb8OdDegjP93mN5Zsiwvpll2GeP9ZSQlCklqOceV Zxbv3RsQysliOc9aWeZJKuqPHbmXkjzeCZ3kY3B1bPLObzL1gxcTqGH0nWwWBB |
#ps aux | grep cat
user 3578 0.0 0.5 24628 11672 ? S 09:38 0:00 /usr/lib/notification-daemon/notification-daemon root 9706 6.6 0.0 3856 528 pts/11 S+ 14:06 0:01 cat /dev/urandom root 9718 0.0 0.0 3952 744 pts/9 S+ 14:06 0:00 grep cat |
#cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep .....
19xDi48UnqZyp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za-z'\n' | grep ........ | awk '{print substr($0,1,8}'
awk: line 1: missing ) near } |
#cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}'
NbW5K1l3 eUFQ1K1V sCFohavX urqLiJTz qoCmoGUz qsSejFws piI4Xm1a y1jVY3Py jQyzAclH N29SMYan ... E6zcdOZx UWRdOVOO GDpCyqRg lMcrJSWO iWsOmbUS rdWyxLbz fkiGXiHl L7gP9zyw lB7qGjNh eddWNsZT |
#./del_users
|
#vi del_users
|
#rm -rf /home/c*
|
#ls -l /home/
total 4 drwxr-xr-x 31 user user 4096 2009-05-28 09:33 user |
#~
> ./user_list zcat /usr/share/dict >& /dev/nullgz | tr A-Z a-z | head -200 | while read username >& /dev/null do echo 'User '$username' created' pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}' | head -1` ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "create_users" 11L, 384C written |
#./create_users
User angelica created User angus created User anita created User ann created User anna created User annard created User anne created User annie created User anthea created User anthony created ... User chris created User christian created User christie created User christina created User christofer created User christophe created User christopher created User chuck created User cinderella created User cindie created |
#cat ./create_users
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}' | head -1` useradd -m $username >& /dev/null ( echo $pass ; echo $pass ) | passwd $username >& /dev/null echo $username $pass >> ./user_list echo 'User '$username' created' done |
#ls -l /home/
drwxr-xr-x 2 angus angus 4096 2009-05-28 14:13 angus drwxr-xr-x 2 anita anita 4096 2009-05-28 14:13 anita drwxr-xr-x 2 ann ann 4096 2009-05-28 14:13 ann drwxr-xr-x 2 anna anna 4096 2009-05-28 14:13 anna drwxr-xr-x 2 annard annard 4096 2009-05-28 14:13 annard drwxr-xr-x 2 anne anne 4096 2009-05-28 14:13 anne drwxr-xr-x 2 annie annie 4096 2009-05-28 14:13 annie drwxr-xr-x 2 anthea anthea 4096 2009-05-28 14:13 anthea drwxr-xr-x 2 anthony anthony 4096 2009-05-28 14:13 anthony drwxr-xr-x 2 anton anton 4096 2009-05-28 14:13 anton ... drwxr-xr-x 2 christian christian 4096 2009-05-28 14:14 christian drwxr-xr-x 2 christie christie 4096 2009-05-28 14:14 christie drwxr-xr-x 2 christina christina 4096 2009-05-28 14:14 christina drwxr-xr-x 2 christofer christofer 4096 2009-05-28 14:14 christofer drwxr-xr-x 2 christophe christophe 4096 2009-05-28 14:14 christophe drwxr-xr-x 2 christopher christopher 4096 2009-05-28 14:14 christopher drwxr-xr-x 2 chuck chuck 4096 2009-05-28 14:14 chuck drwxr-xr-x 2 cinderella cinderella 4096 2009-05-28 14:14 cinderella drwxr-xr-x 2 cindie cindie 4096 2009-05-28 14:14 cindie drwxr-xr-x 31 user user 4096 2009-05-28 09:33 user |
#tail -f user_list
chris M7RYAfCK christian 3k8ZUNCv christie p7PU1SKE christina bKwofnW2 christofer JbzESPRe christophe WkLkHGUI christopher drkyPeWJ chuck KNAVGVim cinderella WIy9uDB5 cindie IYDgeioT ^C |
$su - cindie
Password: su: Authentication failure |
$su - cindie
Password: cindie@linux3:~$ exit logout |
#userdel
Usage: userdel [options] LOGIN Options: -f, --force force removal of files, even if not owned by user -h, --help display this help message and exit -r, --remove remove home directory and mail spool |
#vi del_users
|
#tail -f user_list
angus cIhohMX6 anita xThpHJIY ann 3y93yy5b anna 0Dfc3BHT annard 9I3KG9XZ anne cLz6R3Vm annie GPLWuEWu anthea 1pW5NXC1 anthony 5un5aWXu anton AncocAt0 ... christian unHu8IUT christie a3ifnhAn christina 7JeYhkrd christofer 8Lw0ZdhB christophe REq65fxZ christopher Yl6rRG6Q chuck 6ENOSWhZ cinderella yWVu5U8c cindie GDdPfrrZ ^C |
#./del_users
User angelica deleted User angus deleted User anita deleted User ann deleted User anna deleted User annard deleted User anne deleted User annie deleted User anthea deleted User anthony deleted ... User chris deleted User christian deleted User christie deleted User christina deleted User christofer deleted User christophe deleted User christopher deleted User chuck deleted User cinderella deleted User cindie deleted |
#cat ./create_users
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}' | head -1` useradd -m $username >& /dev/null ( echo $pass ; echo $pass ) | passwd $username >& /dev/null echo $username $pass >> ./user_list echo 'User '$username' created' done |
#ls -l /home/
drwxr-xr-x 2 angus angus 4096 2009-05-28 14:25 angus drwxr-xr-x 2 anita anita 4096 2009-05-28 14:25 anita drwxr-xr-x 2 ann ann 4096 2009-05-28 14:25 ann drwxr-xr-x 2 anna anna 4096 2009-05-28 14:25 anna drwxr-xr-x 2 annard annard 4096 2009-05-28 14:25 annard drwxr-xr-x 2 anne anne 4096 2009-05-28 14:25 anne drwxr-xr-x 2 annie annie 4096 2009-05-28 14:25 annie drwxr-xr-x 2 anthea anthea 4096 2009-05-28 14:25 anthea drwxr-xr-x 2 anthony anthony 4096 2009-05-28 14:25 anthony drwxr-xr-x 2 anton anton 4096 2009-05-28 14:25 anton ... drwxr-xr-x 2 christian christian 4096 2009-05-28 14:26 christian drwxr-xr-x 2 christie christie 4096 2009-05-28 14:26 christie drwxr-xr-x 2 christina christina 4096 2009-05-28 14:26 christina drwxr-xr-x 2 christofer christofer 4096 2009-05-28 14:26 christofer drwxr-xr-x 2 christophe christophe 4096 2009-05-28 14:26 christophe drwxr-xr-x 2 christopher christopher 4096 2009-05-28 14:26 christopher drwxr-xr-x 2 chuck chuck 4096 2009-05-28 14:26 chuck drwxr-xr-x 2 cinderella cinderella 4096 2009-05-28 14:26 cinderella drwxr-xr-x 2 cindie cindie 4096 2009-05-28 14:26 cindie drwxr-xr-x 31 user user 4096 2009-05-28 09:33 user |
#ls -l /home/
total 4 drwxr-xr-x 31 user user 4096 2009-05-28 09:33 user |
#tail -f user_list
angus rQ1ebFm8 anita pyLSrvdR ann UVIbJQcl anna 8MCTK3iY annard t31QaEox anne hRnUjgFg annie JFjnUTkh anthea a0vq4T0F anthony fXm3p2GL anton qQ0ndWfL ... christian Nh7Jim5f christie viOsENrY christina 6raNuksN christofer mc67BdlR christophe NCmauwYj christopher uiDdeFCs chuck W01sdO4g cinderella EevDxPsd cindie nPKT1SIK ^X^C |
#cat ./create_users
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}' | head -1` useradd -m $username >& /dev/null ( echo $pass ; echo $pass ) | passwd $username >& /dev/null echo $username $pass >> ./user_list echo 'User '$username' created' done |
#ls -l /home/
drwxr-xr-x 2 angus angus 4096 2009-05-28 14:30 angus drwxr-xr-x 2 anita anita 4096 2009-05-28 14:30 anita drwxr-xr-x 2 ann ann 4096 2009-05-28 14:30 ann drwxr-xr-x 2 anna anna 4096 2009-05-28 14:30 anna drwxr-xr-x 2 annard annard 4096 2009-05-28 14:30 annard drwxr-xr-x 2 anne anne 4096 2009-05-28 14:30 anne drwxr-xr-x 2 annie annie 4096 2009-05-28 14:30 annie drwxr-xr-x 2 anthea anthea 4096 2009-05-28 14:30 anthea drwxr-xr-x 2 anthony anthony 4096 2009-05-28 14:30 anthony drwxr-xr-x 2 anton anton 4096 2009-05-28 14:30 anton ... drwxr-xr-x 2 christian christian 4096 2009-05-28 14:31 christian drwxr-xr-x 2 christie christie 4096 2009-05-28 14:31 christie drwxr-xr-x 2 christina christina 4096 2009-05-28 14:31 christina drwxr-xr-x 2 christofer christofer 4096 2009-05-28 14:31 christofer drwxr-xr-x 2 christophe christophe 4096 2009-05-28 14:31 christophe drwxr-xr-x 2 christopher christopher 4096 2009-05-28 14:31 christopher drwxr-xr-x 2 chuck chuck 4096 2009-05-28 14:31 chuck drwxr-xr-x 2 cinderella cinderella 4096 2009-05-28 14:31 cinderella drwxr-xr-x 2 cindie cindie 4096 2009-05-28 14:31 cindie drwxr-xr-x 31 user user 4096 2009-05-28 09:33 user |
#tail -f -n 20 /var/log/auth.log
May 28 14:31:20 linux3 useradd[21728]: new group: name=christophe, GID=1196 May 28 14:31:20 linux3 useradd[21728]: new user: name=christophe, UID=1196, GID=1196, home=/home/christophe, shell=/bin/sh May 28 14:31:20 linux3 passwd[21734]: pam_unix(passwd:chauthtok): password changed for christophe May 28 14:31:20 linux3 passwd[21734]: gkr-pam: couldn't update the 'login' keyring password: no old password was entered May 28 14:31:21 linux3 useradd[21741]: new group: name=christopher, GID=1197 May 28 14:31:21 linux3 useradd[21741]: new user: name=christopher, UID=1197, GID=1197, home=/home/christopher, shell=/bin/sh May 28 14:31:21 linux3 passwd[21747]: pam_unix(passwd:chauthtok): password changed for christopher May 28 14:31:21 linux3 passwd[21747]: gkr-pam: couldn't update the 'login' keyring password: no old password was entered May 28 14:31:21 linux3 useradd[21754]: new group: name=chuck, GID=1198 May 28 14:31:21 linux3 useradd[21754]: new user: name=chuck, UID=1198, GID=1198, home=/home/chuck, shell=/bin/sh May 28 14:31:21 linux3 passwd[21760]: pam_unix(passwd:chauthtok): password changed for chuck May 28 14:31:21 linux3 passwd[21760]: gkr-pam: couldn't update the 'login' keyring password: no old password was entered May 28 14:31:21 linux3 useradd[21767]: new group: name=cinderella, GID=1199 May 28 14:31:21 linux3 useradd[21767]: new user: name=cinderella, UID=1199, GID=1199, home=/home/cinderella, shell=/bin/sh May 28 14:31:21 linux3 passwd[21773]: pam_unix(passwd:chauthtok): password changed for cinderella May 28 14:31:21 linux3 passwd[21773]: gkr-pam: couldn't update the 'login' keyring password: no old password was entered May 28 14:31:22 linux3 useradd[21780]: new group: name=cindie, GID=1200 May 28 14:31:22 linux3 useradd[21780]: new user: name=cindie, UID=1200, GID=1200, home=/home/cindie, shell=/bin/sh May 28 14:31:22 linux3 passwd[21786]: pam_unix(passwd:chauthtok): password changed for cindie May 28 14:31:22 linux3 passwd[21786]: gkr-pam: couldn't update the 'login' keyring password: no old password was entered ^C |
#cat ./вdel_users
#!/bin/bash cat ./user_list | awk '{print $1}' | while read username do userdel -rf $username >& /dev/null echo 'User '$username' deleted' done > ./user_list |
#tail -f -n 20 /var/log/auth.log
May 28 14:40:02 linux3 userdel[22647]: Cannot remove /var/mail/butler: No such file or directory May 28 14:40:02 linux3 userdel[22652]: delete user 'byron' May 28 14:40:02 linux3 userdel[22652]: removed group 'byron' owned by 'byron' May 28 14:40:02 linux3 userdel[22652]: Cannot remove /var/mail/byron: No such file or directory May 28 14:40:02 linux3 userdel[22657]: delete user 'caesar' May 28 14:40:02 linux3 userdel[22657]: removed group 'caesar' owned by 'caesar' May 28 14:40:02 linux3 userdel[22657]: Cannot remove /var/mail/caesar: No such file or directory May 28 14:40:02 linux3 userdel[22662]: delete user 'caleb' May 28 14:40:02 linux3 userdel[22662]: removed group 'caleb' owned by 'caleb' May 28 14:40:02 linux3 userdel[22662]: Cannot remove /var/mail/caleb: No such file or directory ... May 28 14:40:06 linux3 userdel[22882]: delete user 'chuck' May 28 14:40:06 linux3 userdel[22882]: removed group 'chuck' owned by 'chuck' May 28 14:40:06 linux3 userdel[22882]: Cannot remove /var/mail/chuck: No such file or directory May 28 14:40:06 linux3 userdel[22887]: delete user 'cinderella' May 28 14:40:06 linux3 userdel[22887]: removed group 'cinderella' owned by 'cinderella' May 28 14:40:06 linux3 userdel[22887]: Cannot remove /var/mail/cinderella: No such file or directory May 28 14:40:06 linux3 userdel[22892]: delete user 'cindie' May 28 14:40:06 linux3 userdel[22892]: removed group 'cindie' owned by 'cindie' May 28 14:40:06 linux3 userdel[22892]: Cannot remove /var/mail/cindie: No such file or directory ^C |
#ssh -l swd crimea-board.info
итого 1428719 drwxr-xr-x 14 swd 1019 336 Апр 30 17:28 Agatha_Christie_-_Miss_Marple drwxr-xr-x 2 swd 1019 1104 Апр 27 18:24 Agatha_Christie_-_Poirot_Collection drwxr-xr-x 2 swd 1019 912 Май 6 12:47 BattleStar_Galactica_Season_1 drwxr-xr-x 2 swd 1019 1336 Май 6 20:39 BattleStar_Galactica_Season_2 drwxr-xr-x 2 swd 1019 1344 Май 7 15:20 BattleStar_Galactica_Season_3 drwxr-xr-x 2 swd 1019 1384 Май 8 15:03 BattleStar_Galactica_Season_4 -rw-r--r-- 1 swd 1019 730028032 Апр 27 19:57 Caprica_Pilot.avi -rwxr-xr-x 1 swd 1019 13 Янв 5 15:56 index.html -rw-r--r-- 1 swd 1019 731539456 Май 15 16:09 Lost.s05e16e17.rus.LostFilm.TV.avi lrwxrwxrwx 1 swd 1019 24 Май 14 19:26 Louis_Armstrong_Gold -> Louis Armstrong Gold 2CD drwxr-xr-x 5 swd 1019 168 Май 14 19:26 Louis Armstrong Gold 2CD drwxr-xr-x 2 swd 1019 408 Май 5 10:20 Midsomer_Murders_S01_DVDRip drwxr-xr-x 2 swd 1019 336 Май 20 16:15 Midsomer_Murders_S02_DVDRip drwxr-xr-x 47 swd 1019 1128 Апр 16 22:30 Poirot collection drwxr-xr-x 7 swd 1019 168 Янв 5 16:06 The_Pink_Panther drwxr-xr-x 5 swd 1019 224 Апр 29 18:48 Рада и Терновник swd@crimea-board:~/upload$ exit logout Connection to crimea-board.info closed. |
#cat ./create_users
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}' | head -1` useradd -m $username >& /dev/null ( echo $pass ; echo $pass ) | passwd $username >& /dev/null echo $username $pass >> ./user_list echo 'User '$username' created' done |
#exit
exit |
#фзеapt-get install
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. ^C |
#apt-get install sudo
Reading package lists... Done Building dependency tree Reading state information... Done sudo is already the newest version. The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#vi /etc/sudoers
|
#passwd user
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#vi /etc/sudoers
|
$su - user
Password: l3-agent is already running: pid=2787; pidfile=/home/user/.lilalo/l3-agent.pid Password: su: Authentication failure |
$sudo cat /root/user_list
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. [sudo] password for user: |
$sudo ls /root/user_list
Sorry, user user is not allowed to execute '/bin/ls /root/user_list' as root on linux3.unix.nt. |
$sudo ls /root/user_list
/root/user_list |
#sudo
usage: sudo [-n] -h | -K | -k | -L | -V | -v usage: sudo -l[l] [-AnS] [-g groupname|#gid] [-U username] [-u username|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHnPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>] usage: sudo -e [-AnS] [-C fd] [-g groupname|#gid] [-p prompt] [-u username|#uid] file ... |
#man sudo
|
#apt-get intall vlock
E: Invalid operation intall |
#apt-get install vlock
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: vlock 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 38.1kB of archives. After this operation, 221kB of additional disk space will be used. Get:1 http://10.0.35.1 sid/main vlock 2.2.2-3 [38.1kB] Fetched 38.1kB in 0s (2187kB/s) Selecting previously deselected package vlock. (Reading database ... 44652 files and directories currently installed.) Unpacking vlock (from .../vlock_2.2.2-3_i386.deb) ... Processing triggers for man-db ... Setting up vlock (2.2.2-3) ... |
#фзе-ашдapt-file search getfacl
acl: /usr/bin/getfacl acl: /usr/share/man/man1/getfacl.1.gz lustre-tests: /usr/lib/lustre/tests/acl/getfacl-noacl.test manpages-ja: /usr/share/man/ja/man1/getfacl.1.gz zsh: /usr/share/zsh/functions/Completion/Cygwin/_getfacl zsh-beta: /usr/share/zsh-beta/functions/Completion/Unix/_getfacl |
#apt-get install acl\
> Reading package lists... Done Building dependency tree Reading state information... Done acl is already the newest version. acl set to manually installed. The following packages were automatically installed and are no longer required: update-inetd portmap Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#getfacl ./user_list
# file: user_list # owner: root # group: root user::rw- group::r-- other::r-- |
#setafcl
bash: setafcl: command not found |
#setfacl
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... Try `setfacl --help' for more information. |
#setfacl --help
setfacl 2.2.47 -- set file access control lists Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ... -m, --modify=acl modify the current ACL(s) of file(s) -M, --modify-file=file read ACL entries to modify from file -x, --remove=acl remove entries from the ACL(s) of file(s) -X, --remove-file=file read ACL entries to remove from file -b, --remove-all remove all extended ACL entries -k, --remove-default remove the default ACL --set=acl set the ACL of file(s), replacing the current ACL --set-file=file read ACL entries to set from file --mask do recalculate the effective rights mask -n, --no-mask don't recalculate the effective rights mask -d, --default operations apply to the default ACL -R, --recursive recurse into subdirectories -L, --logical logical walk, follow symbolic links -P, --physical physical walk, do not follow symbolic links --restore=file restore ACLs (inverse of `getfacl -R') --test test mode (ACLs are not modified) --version print version and exit --help this help text |
#setfacl -Ñm u:user2:rw ./user_list
setfacl: Option -m: Invalid argument near character 3 |
#setfacl -m u:user2:rw ./user_list
setfacl: Option -m: Invalid argument near character 3 |
#getfacl ./user_list
# file: user_list # owner: root # group: root user::rw- group::r-- other::r-- |
#setfacl -m u:user2:rw ./user_list
setfacl: Option -m: Invalid argument near character 3 |
#mount
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) procbususb on /proc/bus/usb type usbfs (rw) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) rootfs on / type rootfs (rw) |
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep ........ | awk '{print substr($0,1,8)}' | head -1` useradd -m $username >& /dev/null ( echo $pass ; echo $pass ) | passwd $username >& /dev/null echo $username $pass >> ./user_list echo 'User '$username' created' done
#!/bin/bash cat ./user_list | awk '{print $1}' | while read username do userdel -rf $username >& /dev/null echo 'User '$username' deleted' done > ./user_list
#!/bin/bash > ./user_list zcat /usr/share/dict/propernames.gz | tr A-Z a-z | head -200 | while read username do pass=`cat /dev/urandom | tr -cd 0-9A-Za-z'\n' | grep -v ...... | head -1` useradd -m $username ( echo $pass ; echo $pass ) | passwd $username echo $username $pass >> ./user_list done
% time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 43.10 0.000503 0 1963 1159 read 36.93 0.000431 0 1095 select 15.85 0.000185 0 1215 gettimeofday 4.11 0.000048 0 593 writev 0.00 0.000000 0 1 restart_syscall 0.00 0.000000 0 28 write 0.00 0.000000 0 13 open 0.00 0.000000 0 13 close 0.00 0.000000 0 2 unlink 0.00 0.000000 0 1 chmod 0.00 0.000000 0 5 5 access 0.00 0.000000 0 1 rename 0.00 0.000000 0 11 munmap 0.00 0.000000 0 1 clone 0.00 0.000000 0 4 uname 0.00 0.000000 0 45 _llseek 0.00 0.000000 0 576 poll 0.00 0.000000 0 45 getcwd 0.00 0.000000 0 11 mmap2 0.00 0.000000 0 66 40 stat64 0.00 0.000000 0 23 fstat64 0.00 0.000000 0 33 fcntl64 0.00 0.000000 0 32 futex ------ ----------- ----------- --------- --------- ---------------- 100.00 0.001167 5777 1204 total
Время первой команды журнала | 12:28:11 2009- 5-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:23:34 2009- 5-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.84 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.08 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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