Vous êtes sur la page 1sur 15

Dummies Guide To Adding Users

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NOTE: Read this from beginning to end. There will be a test!

Contents
~~~~~~~~
Section 1: Initial Setup

Section 2: Your Very First Add

Section 2: Adding General Users

Section 3: Deleting Users

Section 4: Adding A Host

Section 5: Deleting A Host

=======================================================================
====

Section 1: Initial Setup


~~~~~~~~~~~~~~~~~~~~~~~~
Starting from version 2.8.3 of the Energymech setup is done a little
differently. Previous versions have required you to run the bot first
and
then add yourself as the bots owner. From here on out you will need to
run
the supplied genuser shell script to add yourself to the bots userfile
*before* you run it for the first time.

If you start your bot without running the genuser script first you will
get
output similar to the following:

init: Mech(s) added [ emech ]


init: Fatal: emech has no userlist, run ./genuser emech.users
init: 1 bot(s) have no userlist. EnergyMech NOT running.

This is just the last few lines of output but you can see it even tells
you
what you didn't do (create the userlist) and how to fix the problem
(running
genuser).

You run genuser from your shell prompt:

./genuser emech.users

The script is very simple to use and comes with complete instructions
onscreen. Just make sure you follow the prompts for Handle and
Hostmask.
Look at the examples shown in genuser if you are not too sure.

When genuser is finished it will output the following if it is


successfull:
Userfile emech.users created.

If it fails then make polite enquiries about it and you might get
answered.

In the next section you will find out how to add the general users.
Read it
carefully.

=======================================================================
====

Section 2: Adding General Users


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The command you use for adding general users is the Add command. It
allows
you to add global and channel users.

NOTE: The bot will let you add users to channels that the bot isn't in
or
channels that don't even exist.

There are two ways you could add yourself to your bot. You can message
the
add command to it or you can type it in the channel. Both methods
provide
the desired result - the user is added.

Method 1: Message the bot

/msg botnick -add handle * nick/userhost level aop prot password

Method 2: Open channel command

NOTE: An open channel command is typed straight in and shows up


in the channel.

botnick -add handle * nick/userhost level aop prot password


or
-add handle * nick/userhost level aop prot password

Breakdown: /msg - Command from your IRC software to message


the bot.

botnick - Your bots nick.

-add - This is the add command. The '-' should


be replaced with what you chose for your
bots command character in the mech.set
file.

handle - A handle is just a name for the users


record in the bot. A handle can be 1 -9
characters long.

* - This is the channel specification. A '*'


means to add a global user. Use #channel to
add general users.

nick/
userhost - You can put the bot users nick here or
you can specify a userhost mask (e.g.
*!*user@*.host.com). The bot will let
you add using a stupid userhost mask so
be carefull and think before you add.

level - The user level determines what commands


are available to the user being added.
Global users should probably be set at
level 100 (which gives them total control)
and general users be given only the level
that they need to do their channel control
tasks.

aop - The Auto-Op toggle is used to tell the


bot that this user should be op'd when
they enter a channel. Set to 0 it is
turned off and set to 1 it is turned on.
NOTE: You either have to VERIFY before
entering the channel or have no password
for this to work. And adding the first
user with not password would be very
stupid!

prot - The protection level determines what


should be done when something happens
to this user. Protection levels are
explained fully in Appendix i.

password - You do not need a password to use a bot


BUT a global user should always have
a password.

No matter which method you choose to add a user to your bot the outcome
will
be the same. You will get either an error message or a confimation
that the
user has been added.

Here are some examples of error messages and the commands that produce
them.

Example 1:

Command: /msg addbot -add azmodan * joebloggs 100 0 0 changeme


Response: -AddBot(azmodan@phrozen.gen.nz)- No information found
for joebloggs
Error: The nick joebloggs didn't actually exist when the add
command was sent to the bot.

Command: /msg addbot -add azmodan * *!*dan@*.gen.nz 100 0 5


changeme
Response: -AddBot(azmodan@phrozen.gen.nz)- Usage: ADD <handle>
<channel> <nick|userhost> <level> [aop] [prot] [pass]
Error: Protection levels are from 0-4. 5 was outside thise
range
so the bot thought you needed to see the help on the
add
command.

Command: /msg addbot -add azmodan * azmodan 500 0 0 changeme


Response: -AddBot(azmodan@phrozen.gen.nz)- Valid levels are from
0 thru 100
Error: User levels are from 0 to 100. And for the global
user
you should be using 100 to give total control of the
bot.

Command: /msg addbot -add azmodandude * azmodan 100 0 0


changeme
Response: -AddBot(azmodan@phrozen.gen.nz)- Handle must be
between 1
and 9 chars in length
Error: The handle you tried to add is more that 9 characters.
The limit is 9 characters and you cannot go over it.

Command: /msg addbot -add trustme * rogue 100 0 0 changeme


Notes: This adds the nick rogue with the handle of trustme
as a level 100 user that has global access.

Command: /msg addbot -add notrust #UserGuide rogue 10 0 0


changeme
Notes: This adds the nick rogue with the handle of notrust
as a level 10 user that has access to only channel
#UserGuide. We don't trust this person all that much.

Command: /msg addbot -add general #UserGuide rogue 40 0 0


changeme
Notes: This adds the nick rogue with the handle of general as
a
level 40 user that has access to only channel
#UserGuide.
This person can use all commands of level 40 and below.

There are probably other ways to produce errors from using the add
command.
If you stick to using the add command by following the breakdown above
then
you can't go too far wrong (if you do consider yourself special and
beyond
help).

When you actually add the user correctly you will get something similar
to
the following example.

Example 2:
-AddBot(azmodan@phrozen.gen.nz)- azmodan has been added as
*!*azmodan@*.gen.nz on *
-AddBot(azmodan@phrozen.gen.nz)- Access level: 100 Auto-op: No
Protect level: 0 Password: changeme

If you got this then congratulations you have now added your first
general
user and can have a cookie (NOTE: Cookies have been discontinued).
At this point you might want to issue a save command e.g. /msg botnick
-save.
Use your own bot nick and your own command character.

The user level is important when adding general users. You should only
give
them the level required to get their job done. If you don't want user
joebloggs to have the ability to issue the die command then don't give
him/her level 100 access. Consult the Default Command Levels in
Appendix ii
when you are making up your mind what level to add a user at.

To add a user to more than one channel you need to add them with a
different
handel for each channel.

If you stick to the breakdown above you can't go very wrong when adding
users.
In the next section you will learn how to remove users.

=======================================================================
====

Section 3: Deleting Users


~~~~~~~~~~~~~~~~~~~~~~~~~~
Ok, so now you know how to add users you might be wondering how you
remove
them when they are no longer required. This is probably one of the
simpler
commands you can use with your bot.

Before deleting a user you need to know the handle that you added them
with.
If you don't know it or want to double check and make sure then you can
use
the userlist command e.g. /msg botnick -userlist. Check in the list
that
comes up for the user you want to delete and note the handle.

You have decided to delete the user with the handle of rogue. You can
do
this one way by using the del command.

Example 3:
Command: /msg addbot -del trustme
Response: -AddBot(azmodan@phrozen.gen.nz)- User trustme has been
purged

This is a successfull delete. The user record is now gone. Check with
/msg
botnick -userlist if you want to double check.
If you had specified an unknown handle then the bot will tell you that
you
have made a mistake.

Example 4:
Command: /msg addbot -del rogue2
Response: -AddBot(azmodan@phrozen.gen.nz)- Unknown handle
Error: The handle rogue2 did not exist so could not be
deleted.

If this happens to you then check the handle in the userlist again and
get
it right this time! Repeat the process for each user that you want to
remove.

=======================================================================
====

Section 4: Adding A Host


~~~~~~~~~~~~~~~~~~~~~~~~
If a user has more than one host you don't need to add a whole new user
on a
different handle to give them access to the same channel. You can add
what
is called a host to the user.

The command to do this is /msg botnick -host add handle hostmask.


Handle is
the same handle you gave the user when you added them to the bot. The
hostmask is made up of a combination of the users ident and host. Some
examples of users and possible hostmasks are shown below to give you a
basic
idea of how to make up a hostmask.

If you do a /whois nick on your user you will get the information that
you
need to decide on the hostmask.

Example 5:
Whois: Rogue (barky@irc.phrozen.gen.nz)
Hostmask: *!*barky@*.phrozen.gen.nz
Notes: This mask will match on barky@skippy.phrozen.gen.nz or
barky@irc.phrozen.gen.nz. The '*' is a wildcard that
stands for anything.

Whois: Azmodan (azmodan@m002-b002.dialup.akl.clear.net.nz)


Hostmask: *!*azmodan@*.dialup.akl.clear.net.nz
Notes: With this host we are making sure that the user has
to be on dialup.akl.clear.net.nz before they will be
recognised by the bot.

Now for some examples of adding a host.

Example 6:
Command: /msg addbot -host add trustme
*!*barky@*.phrozen.gen.nz
Response: -AddBot(azmodan@phrozen.gen.nz)- Added mask
*!*barky@*.phrozen.gen.nz to user trustme
Notes: This is a good hostmask that leaves little room for
being abused by other users.

Command: /msg addbot -host add trustme *!*@*.*


Response: -AddBot(azmodan@phrozen.gen.nz)- Added mask *!*@*.*
to user trustme
Notes: This is a valid host but one you should never add to a
user. This host basically allows anyone that knows
the
password for this user to access the bot using this
users
handle.

Command: /msg addbot -host add trustme *!*@*


Response: -AddBot(azmodan@phrozen.gen.nz)- Problem adding *!*@*
(global mask)
Notes: The bot won't let you be totally rediculous with this
global hostmask.

You can add as many hostmask to a user as you need. These hostmasks
allow
users access to the bot from any different shell accounts or ISP
accounts
that they may have.

Of course from time to time you may wish to remove hostmasks from
users.
This is explained in the final section.

=======================================================================
====

Section 5: Deleting A Host


~~~~~~~~~~~~~~~~~~~~~~~~~~
Deleteing a host is very similar to adding a host. The only thing that
changes is the add becomes a del e.g. /msg botnick -host del handle
hostmask. You can get a list of a users handle and current hostmasks by
using the userlist command e.g. /msg botnick -userlist. Work out the
handle
and the hostmask that you want removed from it.

Here are some hostmask deletes as examples.

Example 7:
Command: /msg addbot -host del trustme
*!*barky@*.phrozen.gen.nz
Response: -AddBot(azmodan@phrozen.gen.nz)- Deleted mask
*!*barky@*.phrozen.gen.nz from user trustme
Notes: All their other hostmasks remain. Only the one in the
delete command is actually removed.

Command: /msg addbot -host del trustme *!*barky@*.com


Response: -AddBot(azmodan@phrozen.gen.nz)- Deleted mask
*!*barky@*.com from user trustme
Notes: -host del will respond saying that the hostmask was
removed if it does not exist.

Thats all there is to hostmask deleting and also the end of the Dummies
Guide To Adding Users. I hope you have found this document helpfull and
that have many hours of fun adding and removing various things from your
users.

***********************************************************************
****

Appendicies
~~~~~~~~~~~
Appendix i: Protection Levels

Protection level can be 0 through 4 where the specific levels


are as follows:

0 No protection.
1 Reop/unban, do nothing to offender.
2 Reop/unban, deop offender.
3 Reop/unban, kick offender.
4 Reop/unban, kickban offender.

Protection must be toggled on for a channel for anything to happen.

-----------------------------------------------------------------------
----

Appendix ii: Default Command Levels

These are the levels of all the commands a bot will accept. Use this
list to determine what you give your bot users access to.

Level 10: access, bye, chat, cmdchar, down, echo, help,


passwd, usage, verify

Level 20: host, ontime, seen, uptime, ver, whom

Level 40: ban, banlist, cchan, channels, cmd, cserv, deop,


idle, invite, kb, kick, lusers, mode, names, op, rt,
screw, siteban, sitekb, time, topic, unban, unvoice, up,
voice, wall, who, whois

Level 50: insult, pickup, qshit, rshit, shit, shitlist,


shitlvl

Level 60: add, clvl, ctcp, del, showidle, user, userlist,


ustats

Level 70: cycle, esay, join, ks, kslist, part, rks, setpass

Level 80: addserver, away, delserver, forget, last, load,


loadlevels, loadlists, me, msg, nextserver, rehash,
report, rstatmsg, save, savelevels, savelists, say, server,
serverlist, statmsg, stats, userhost, virtual, wingate

Level 90: chaccess, clearshit, do, link, nick, rspy, rspymsg,


set, spy, spylist, spymsg, tog

Level 100: core, debug, die, reset, shutdown, spawn, uset ( msconfig )

-----------------------------------------------------------------------

COMENZI GENERALE FOLOSITE IN LINUX : Ora


- cd -> deschidere de director /in acelasi timp si
iesi dintr-un director cu ea pana in /home director
;
- cd - (minus) -> mergi la directorul anterior
- cd dir && command -> / dechide director , executa
comanda si se intoarce in directorul precedent .
- ls -> afiseaza continutul unui director
- ls -lrt -> listeaza rapid fiserele din dir curent
aranjandule dupa data modificarii .
- pico -> Pe majoritatea sistemelor - editeaza un
fisier / de ex ai fisier : mech.set // dai pico
mech.set
- vi -> similar cu pico doar ca e un program
diferit . / de ex : vi mech.set
- cat -> nu editeaza ci doar citeste fisere .
- gpg -c file -> encripteaza fisiere
- gpg file.gpg -> decripteaza un fiser de extensie
.gpg
- echo 'wget url' | at 01:00 ->echo e ceva gen
schedule pe windows -// dai echo si comanda | at
time /i love this command :P
- echo I live in -> / afiseaza date despre tara
respectiva .
- tar c dir/ | bzip2 > dir.tar.bz2 -> arhiveaza
directorul introdus .
- tar cvzf folder.tgz folder/ - arhiveaza folderul
respectiv .
- tar -zxvf ( sau tar xzvf) -> dezarhiveaza o
arhiva : de ex ai arhiva : emech-
darwin.tar.gz // tar xzvf emech-darwin.tar.gz
- wget url -> downloadeaza url-ul introdus .
- hostname -i -> afiseaza ip-ul serverului
respectiv // echivalent cu -> hostname /.
- cal -3 -> afiseaza calendar
- cal 9 1752 -> afiseaza calendarul pt luna a9a din
anul 1752 :P
- date -d fri -> afiseaza data acestei vineri .
- w -> listeaza toate conexiunile in momentul
respectiv la serverul pe care esti ;
- lsof -p $$ -> afiseaza adresele proceselor
pornite de userul de pe care esti .
- lsof ~ -> afiseaza procesele apelate de cele la
care ti s-a aratat adresa cu
comanda anterioara .
- lynx url -> navighezi pe internet de pe linux
- passwd -> meniu de schimbare de parola pt userul
pe care esti .
- pwd -> afiseaza adresa directorului in care esti
.
- mkdir -> creeaza director /ex : mkdir stef :P
- mv -> muta un fisier/director intr-o locatie :
/ex : mv psybnc.tgz /tmp/.stef
sursa DarthSion
Code:
- cat /etc/issue -> ca sa afli ce versiune de linux
ai .
- /sbin/ifconfig | grep inet -> vezi ip-urile
serverului .
- cat /etc/hosts -> iti arat host-urile root-ului .
- cat /etc/passwd -> astfel sti cate usere si ce
usere sunt .
- /usr/sbin/useradd user -> Adaugi un user .
- /usr/sbin/useradd -o -u 0 user -> Adaugi un user
dar cu drept de root
- /usr/sbin/userdel useru -> stergi usere .
sursa Slasher
Comenzi Linux "Root"
Code:
comenzii linux (root)
w -->iti arata uptime, si cine mai e online
who -->iti arata cine mai e online pe sistem
ocklist => ce porturi are deschise
cat /etc/shadow => parole scriptate
/sbin/ifconfig | grep inet => ce ip-uri are
/etc/hosts => vhost-urile
/usr/sbin/adduser -g0 | passwd | /usr/sbin/userdel
cat /etc/passwd => ce usere are
w , uptime => arata de cate zile este serverul sus
id, whoami => arata dreptul pe care il avem pe
root: apache sau root
ls, dir => arata continutul unui folder
rm -rf => aterge un folder sau fisier
Impachetez un fisier tar chf fisier.tar fisier
=> tar zcd fisier.tar director
ping -c1 yahoo.com => Vad ip la un server
/sbin/ipchains -A input --destination-port -p tcp
-j REJECT
route add -host ip-ul reject Inchid un port anume
cat /proc/cpuinfo Informatii despre sistem
rpm -Uhv arhiva despachetez arhiva rpm
gzip -9 ex.tar modifik extensia tar in tar.gz
/usr/sbin/useradd -o -u 0 http fak shell
cat /etc/issue vad versiunea de linux
gcc program.c -o program compilez un program
df -h vad cat spatiu are hardu
/etc/rc.d/init.d Afisate Pidurile
cat /etc/hosts Vad Vhosturile
netstat -aut VAd cine mai ii pe roata
cat /etc/*release Vad versiunea de linux
alias ls='dir --color=tty' Bag ls
/usr/sbin/userdel user Sterg user
find / -name ".. " -print -xdev caut foldere
ascunse
find / -name ".*" -print -xdev | cat -v caut
foldere ascunse
dictionar linux
apache -> Apache este un puternic open source
server web dezvoltat de catre Apache Group. Acesta
ruleza pe sitemele de operare Unix, Linux, sau
Windows. Aceasta aplicatie este o derivare a
originalului server de web NCSA dezvoltat de
Universitate Illinois din Urbana-Champaigne. Apache
este cel mai polpular server web de pe internet, si
mult mai puternic decat Internet Information Server
al firmei Microsoft, cel mai apropiat competitor.
APM -> (Advanced Power Management) O functie
utilizate de anumite BIOS-uri pentru a trece
computer-ul intr-o stare de stand-by dupa o anumita
perioada de inactivitate. Pe laptop-uri, APM-ul
este responsabil cu raportarea starii bateriei si,
daca este suportat, timpul estimat ramas de viata a
bateriei.
APT -> Advanced Package tool/Outil de paquetage
avance(DEBIAN)
ARP-> Address Rezolution Protocol Realizeaza pentru
IP (Internet Protocol) gasirea adresei hardware a
masinii de destinatie.
ASCII -> (American Standard Code for Information
Interchange). Codul standard utilizat pentru
stocarea caracterelor, incluzand caracterele de
control, pe un computer. Multe coduri pe 8 biti (ca
ISO 8859-1, setul de caractere implicit sub Linux)
contin ASCII ca prima jumatate.
bash -> Bash este un interpretor-limbaj de comanda
care executa comenzi citite de la intrarea standard
sau dintr-un fisier.
Browser -> Program folosit la navigarea pe site-uri
web ce permite vizualizarea de pagini
hypertext(html), documente, imagini, secvente video
shi audio.
BSD -> (Berkley Software Distribution) O varianta
de Unix creata de departamentul de informatica de
la Universitatea Berkley. Aceasta versiune a fost
considerata intotdeauna mai avansata din punct de
vedere tehnic, si a adus multe inovatii in lumea
informaticii in general si Unix-ului in particular.
c/c++ -> limbaj de programare pe care se bazeaza
linuxul
CHAP -> (Chalange-Handshake Authentication
Protocol) Protocol folosit de ISP's pentru a
autentifica clientii lor.
CIFS -> (Common Internet FileSystem) Predecesorul
sistemului de fisiere SMB, folosit pe sisteme DOS.
ctime -> Data creeari fisierului
DHCP -> (Dynamin Host Configuration Protocol)
Protocol creat pentru ca masinile dintr-o retea
locala sa obtina dinamic o adresa IP de la un
server DHCP.
DMA -> (Direct Memory Access) O facilitate
utilizata in arhitectura PC-urilor care permite
unui periferic sa citeasca sau sa scrie in memoria
principala fara ajutorul procesorului.
DPMS -> (Display Power Management System) Protocol
utilizat de toate monitoarele moderne pentru a
administra functiile de economisire a energiei.
Monitoarele care suporta aceste functii sun numite
"green monitors".
ELF -> (Executable and Linking Format) Formatul
binar utilizat de cele mai multe distributii
CNU/Linux din zilele noastre.
ext2 -> Prescurtarea de la "Extended 2 filesystem".
Este sistemul de fisiere nativ al GNU/Linux si are
toate caracteristicile oricarui sistem de fisiere
din Unix: suport pentru fisiere speciale (legaturi
sibmolice,...), permisiuni pe fisier, etc.
FAQ -> (Frequently Asked Questions) Un document
care contine o serie de de intrebari/raspunsuri
despre un anumit subiect. FAQ-urile au aparut in
newsgroup-uri, dar acest tip de document apare acum
pe diferite site-uri web, si chiar produse
comerciale au propriul FAQ. In general, acestea
sunt surse foarte bune de informatii.
FAT -> (File Allocation Table) Sistem de fisiere
folosit de DOS si Windows.
FDDI -> (Fiber Distributed Digital Interface) Un
nivel fizic de mare mare viteza a unei retele, care
utilizeaza fibra optica pentru comunicatie. Folosit
doar de retelele mari, in principal din cauza
costurilor.
FHS -> (Filesystem Hierarcy Standard) Un documnent
care contine trasaturile unei organizari coerente
sub forma de arbore a fisierelor in sistemele Unix.
FIFO -> (First In, First Out) O structura de date
sau buffer hardware de unde obiectele sunt luate in
ordinea in care au fost puse.
FTP -> (File Transport Protocol) Acesta este
protocolul standard utilizat la transferarea
fisierelor de pe un computer pe altul.
pt wget pt.:Bnc,Psybnc,Botii,WU-Exploits,WU-
PATCH,SSH exploits,PHP Exploits,Securizare
Samba,Arhiva Psybnc,Bnc,botii................
Scanere,Sniffer,Flood,Rk.Pico,Tar,Cgi,Ps,Emech-
compilat...............
Ftp...........
Comenzi.......Pico....tar,Muh,Librarii
linux..........Windows bnc..Darwin bnc

Login form
.uLogBlock
{margin:0;padding
:2px;clear:both;}.u
LogDescr,.uLogRe
m
{float:left;}.uLogF
ield,.uLogSbm
{float:right;}
Login:
Parola:
remember
Am uitat parola ·
Register
News calendar
«
D
ec
e
m
be
r
20
08
»
S M T WT
Fr Sa
u o u e h
1 2 3 4 5 6
7 8 9 10 11 12 13
1415 1617 18 19 20
2122 2324 25 26 27
2829 3031

----

Vous aimerez peut-être aussi