[03:13] <dj-fu> Hi there, is it possible to do a limit on which commands 'sudo' can run? for example, I'd like the user to be able to run everything APART from passwd
[07:09] <amigamia> morning. i installed ubuntu server ver 6 and i thought that it would have a gui for administration to setup the network characteristics? should i have used lamp option? 
[07:09] <amigamia> ?
[07:10] <amigamia> i thought it would be a simple install and the network facilities would be setup at some point? 
[07:10] <amigamia> they dont have a interface to enter in the properties for your network?
[07:10] <amigamia> ?
[07:20] <amigamia> bah
[07:23] <amigamia> i cannot believe there is no option during installation to enter in the domain, ip address, or anything. 
[07:23] <amigamia> or did i make an error somewhere?
[07:23] <amigamia> whatever
[07:36] <amigamia> hello
[07:36] <amigamia> is anyone even alive or is this just a bunch of bots
[09:31] <buk> moin miles
[09:34] <[miles] > hi buk
[09:34] <[miles] > hows it going
[09:34] <buk> good
[09:35] <[miles] > im shattered...
[09:35] <[miles] > was programming til late into the morning 
[09:35] <buk> heh
[09:36] <buk> I'm tired as hell every evening 
[09:36] <buk> dunno why, dont sleep that well maybe
[09:36] <[miles] > me also
[09:36] <[miles] > buk: you been playing with Ubuntu server then?
[09:42] <buk> nope
[09:42] <buk> won't be able to until friday i guess
[09:43] <[miles] > :O
[02:52] <\sh> ok..installing ubuntu dapper server on dl365 with a MSA60 attached
[03:04] <ajmitch>   /win 21
[04:51] <\sh> hmmm...
[04:51] <\sh> why is dapper kernel not recognizing the external msa60 (which has 12x750GB Sata HDs with raid6 configured)
[04:52] <\sh> I can see the 4 internal sas drives....(everything is hanging on a P800 SmartArray)
[04:58] <mralphabet> dell + suse on servers? ;(
[04:59] <buk> suse on dell servers
[04:59] <buk> :)
[05:02] <\sh> hmm??? HP dl365 with P800 SmartArray SAS + 4 internal sas drives + msa60 with 12x 750GB drives 
[06:11] <r00tintheb0x> Leave me alone you nasty little Gibbon Monkey.
[06:11] <r00tintheb0x> oops, my bad.
[06:12] <mralphabet> . . .
[06:13] <mralphabet> why does that make me remember the monkey scene from Bruce Almighty?
[06:13] <r00tintheb0x> hah
[07:56] <gubluntu> does anyone know of a method to auto blacklist in hosts.deny anyone trying to ssh to me from any other user than root?
[07:59] <ivoks> does it have to be hosts.deny?
[08:00] <gubluntu> no
[08:00] <ivoks> it would be better to do it this way
[08:00] <gubluntu> i just want to stop these bruteforce attacks
[08:00] <ivoks> 'blacklist any host that tries to ssh more than 4 times in 60 seconds'
[08:01] <ivoks> is that a better solution?
[08:01] <gubluntu> more then 4 failed attempts
[08:01] <gubluntu> right.. how do i go about this?
[08:01] <ivoks> no, more than 4 new ssh connections
[08:01] <ivoks> you can do it 4 in 30 seconds
[08:02] <ivoks> it's unlikely that anyone would want to connect 5 times in 30 seconds
[08:02] <gubluntu> okay
[08:02] <gubluntu> how do  do that?
[08:02] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 30 --hitcount 4 --rttl -j DROP
[08:03] <ivoks> you can even do some logging about it
[08:03] <ivoks> then you have to create rule (before that above):
[08:03] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 30 --hitcount 4 --rttl --name SSH -m limit --limit 2/sec -j LOG --log-prefix "SSH_brute_force:"
[08:04] <ivoks> and beofre both of them:
[08:04] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
[08:07] <gubluntu> thanks
[08:07] <gubluntu> do all three backwards in order?
[08:07] <ivoks> yes
[08:07] <gubluntu> thanks
[08:09] <ivoks> umm...
[08:09] <ivoks> does it work?
[08:11] <ivoks> probably not... this will work:
[08:11] <ivoks> TRUSTED_SSH="127.0.0.1/32"
[08:11] <ivoks> iptables -N SSH_WHITELIST
[08:12] <ivoks> iptables -F SSH_WHITELIST
[08:12] <ivoks> iptables -A SSH_WHITELIST -s $TRUSTED_SSH -m recent --remove --name SSH -j ACCEPT
[08:12] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name SSH
[08:12] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j SSH_WHITELIST
[08:12] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -m limit --limit 2/sec -j LOG --log-prefix "SSH_brute_force:"
[08:12] <ivoks> iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --rttl --name SSH -j DROP
[08:12] <ivoks> (sorry for flood)
[08:13] <ivoks> note that this one is for 60 seconds, not 30
[08:23] <gubluntu> iptables v1.3.3: Unknown arg `-j'
[08:24] <gubluntu> ivoks: PiNG :-D
[08:24] <ivoks>  -j? -j is in iptables from the begining
[08:24] <gubluntu> im just the messenger
[08:25] <gubluntu> iptables eludes me
[08:25] <ivoks> modprobe ip_tables?
[08:26] <gubluntu> returned nothing
[08:26] <gubluntu> retry returns same error
[08:26] <ivoks> that's ok
[08:27] <gubluntu>   --jump        -j target
[08:27] <gubluntu>                                 target for rule (may load target extension)
[08:27] <gubluntu> its in my help
[08:27] <ivoks> right
[08:27] <gubluntu> does it come before SSH ?
[08:28] <ivoks> no
[08:28] <ivoks> SSH is name
[08:28] <ivoks> target is ACCEPT
[08:28] <gubluntu> oh
[08:28] <gubluntu> you mean DROP
[08:28] <gubluntu> i dont have DROP in there
[08:28] <ivoks> i don't what rule you are talking about
[08:29] <gubluntu> last one
[08:29] <gubluntu> done.. no error
[08:29] <ivoks> typo? :)
[08:29] <gubluntu> ya
[08:29] <gubluntu> how do i see all of the rules i added?
[08:29] <gubluntu> so i can check them for errors?
[08:29] <ivoks> iptables -L
[08:31] <gubluntu> http://pastebin.ca/475820
[08:31] <gubluntu> can you take a look real quick?
[08:31] <gubluntu> do you mind?
[08:33] <ivoks> yup, that's ok
[08:33] <gubluntu> thank you very much
[08:34] <ivoks> now open ssh connection to it
[08:34] <ivoks> and stay logged in
[08:34] <ivoks> and in other terminal
[08:34] <ivoks> open another ssh connection, close it, open again, close it and then try opening it again :)
[08:34] <gubluntu> how long will i be locked out for?
[08:34] <ivoks> forever :)
[08:35] <ivoks> but established connections will not be locked out
[08:35] <gubluntu> hmm..
[08:35] <gubluntu> how do i remove blacklisted ips?
[08:36] <gubluntu> where do they end up?
[08:36] <ivoks> clearing SSH chain
[08:37] <ivoks> in kernel
[08:37] <ivoks> firewall
[08:38] <gubluntu> hmm
[08:39] <gubluntu> i cant seem to figure it out
[08:39] <ivoks> what?
[08:39] <gubluntu> clear ssh chain
[08:40] <ivoks> http://www.debian-administration.org/articles/342
[08:40] <ivoks> maybe this is what you want...
[08:46] <ivoks> time for me to go...
[08:46] <ivoks> if you don't like those iptables rules, don't forget tu flush iptables
[08:47] <gubluntu> k
[08:47] <gubluntu> thank you
[08:47] <ivoks> otherwise, you could end up locked out
[08:47] <ivoks> s/tu/to
[08:48] <ivoks> iptables -F
[08:48] <ivoks> iptables -X
[09:21] <jpiccolo> how would i install a smp kernel from the command line
[09:24] <mralphabet> sudo apt-cache search linux-image
[09:25] <mralphabet> pick appropriate kernel
[09:25] <mralphabet> sudo apt-get install some-linux-kernel
[09:32] <jpiccolo> i am not seeing any with a -smb do i need to enable that
[09:33] <mralphabet> you should look at the ubuntu package manager for the kernels, it may tell you which kernel was compiled with what options
[09:33] <mralphabet> http://packages.ubuntu.com/
[09:34] <mralphabet> what are you running?
[10:40] <mralphabet> I'm having some problems with mdadm, I want to delete a software mirror and I was able to fail /dev/md1 /dev/sdb5 and remove it from the array, but it will not let me fail / remove /dev/md1 /dev/sdc5.
[10:42] <mralphabet> when I try mdadm --set-faulty /dev/md1 /dev/sdc5 I get mdadm: set /dev/sdc5 faulty in /dev/md1 but when I try mdadm --remove /dev/md1 /dev/sdc5 I still get mdadm: hot remove failed for /dev/sdc5: Device or resource busy
[10:42] <mralphabet> Any suggestions?
[10:45] <ivoks> and md1 is mirror of sdc5 and sdb5?
[10:45] <mralphabet> yes
[10:45] <ivoks> so, you now have md1 in faulty state (without sdb5)?
[10:45] <mralphabet> correct
[10:46] <ivoks> why is it strange that you can't delete other disk in raid while using apps which are on that disk? :)
[10:46] <mralphabet> State : clean, degraded, Not Started
[10:46] <ivoks> not started?
[10:47] <ivoks> i was under impression that you have "/" on md1
[10:47] <mralphabet> is on md0
[10:47] <mralphabet> ./ is on md0
[10:47] <ivoks> ok then
[10:47] <ivoks> you don't have md1 mounted, right?
[10:47] <mralphabet> nope
[10:48] <mralphabet> as in, correct, not mounted
[10:48] <ivoks> lsof /dev/md1?
[10:49] <mralphabet> none
[10:49] <ivoks> lsof /dev/sdc5
[10:49] <mralphabet> none
[10:50] <ivoks>  /etc/init.d/mdadm stop
[10:51] <ivoks> then try
[10:53] <mralphabet> I'm mildly scared to try that heh
[10:53] <mralphabet> it may blow up this machine, we'll see
[10:53] <ivoks> that's a monitor
[10:54] <mralphabet> oh
[10:54] <ivoks> mdadm-raid is *don't* touch
[10:54] <mralphabet> heh
[10:55] <mralphabet> root@Dominus:~# mdadm --set-faulty /dev/md1 /dev/sdc5
[10:55] <mralphabet> mdadm: set /dev/sdc5 faulty in /dev/md1
[10:55] <mralphabet> root@Dominus:~# mdadm --remove /dev/md1 /dev/sdc5
[10:55] <mralphabet> mdadm: hot remove failed for /dev/sdc5: Device or resource busy
[10:56] <ivoks> hm
[10:57] <mralphabet> if I do a query / detail I still get 
[10:57] <mralphabet>        1       8       37        1      active sync   /dev/sdc5
[11:01] <mralphabet> afk a bit, I'll check back in a bit, thanks
[11:13] <mralphabet> back
[11:16] <ivoks> heh
[11:17] <mralphabet> meeting didn't take long
[11:22] <ivoks> did you try -f? :)
[11:23] <ivoks> ups... that for assemble
[11:23] <ivoks> well, i don't see how you can remove all devices from running MD
[11:24] <ivoks> only way you can do this is stoping MD
[11:24] <ivoks> and then removing devices
[11:24] <ivoks> mdadm -S /dev/md1
[11:24] <mralphabet> I tried the --really-really-try-really-hard
[11:24] <ivoks> but... you can't remove all devices from raid and expect it to be running :)
[11:26] <mralphabet> well, I understand that logic, I just don't care if that partition is running or not
[11:26] <ivoks> right?
[11:26] <mralphabet> I'll have to reboot with the server cd
[11:26] <ivoks> no
[11:26] <ivoks> mdadm -S
[11:26] <mralphabet> mdadm -S /dev/md1
[11:26] <mralphabet> mdadm: fail to stop array /dev/md1: Device or resource busy
[11:26] <ivoks> hehe
[11:26] <ivoks> mount | grep md1
[11:26] <ivoks> :)
[11:27] <mralphabet> none
[11:28] <ivoks> clueless
[11:28] <ivoks> are you using it for LVM too?
[11:28] <mralphabet> no
[11:29] <ivoks> and other partitions on that disk
[11:29] <ivoks> are used for something?
[11:29] <ivoks> but... hm... that shouldn't matter
[11:29] <mralphabet> sd[b.c] 1 are in md0
[11:30] <ivoks> is m1 swap?
[11:30] <ivoks> md1
[11:30] <mralphabet> yes, but it's not mounted
[11:31] <mralphabet> Swap:            0          0          0
[11:31] <mralphabet> # /dev/md1
[11:31] <mralphabet> UUID=d007d467-7bbf-4821-a79e-dc535c2202a9 none            swap    sw              0       0
[11:31] <ivoks> try swapon /dev/md1
[11:31] <ivoks> then swapoff /dev/md1
[11:32] <mralphabet> hrm
[11:32] <mralphabet> root@Dominus:~# swapon /dev/md1
[11:32] <mralphabet> swapon: /dev/md1: Invalid argument
[11:32] <mralphabet> root@Dominus:~# swapoff /dev/md1
[11:32] <mralphabet> swapoff: /dev/md1: Invalid argument
[11:32] <mralphabet> trying uuid, sec
[11:33] <mralphabet> root@Dominus:~# swapon -U d007d467-7bbf-4821-a79e-dc535c2202a9
[11:33] <mralphabet> swapon: cannot stat /dev/disk/by-uuid/d007d467-7bbf-4821-a79e-dc535c2202a9: No such file or directory
[11:33] <mralphabet> that's an odd one
[11:34] <ivoks> md1 should work
[11:36] <ivoks> try mkswap
[11:37] <ivoks> swapon -a
[11:38] <mralphabet> no error, but no swap space shows up either
[11:39] <ivoks> mkswap /dev/md1 (if you are really sure it's for swap :)
[11:39] <mralphabet> interesting, md1 doesn't have a uuid listed in /dev/disk/by-uuid/
[11:40] <mralphabet> mkswap /dev/md1
[11:41] <mralphabet> mkswap: error: swap area needs to be at least 40kB
[11:41] <ivoks> heeh
[11:41] <mralphabet> I'm boggled . . .
[11:41] <ivoks> bring back sdb5 in md1
[11:41] <mralphabet> FYI - this was set up through the server installer
[11:43] <mralphabet> rebuilding
[11:44] <ivoks> FYI - it always works from me[TM] 
[11:44] <ivoks> for
[11:44] <mralphabet> I don't doubt it
[11:46] <mralphabet> mdadm --detail /dev/md1
[11:46] <mralphabet> State : clean, Not Started
[11:47] <mralphabet> mdadm --run /dev/md1
[11:47] <mralphabet> mdadm: failed to run array /dev/md1: Device or resource busy
[11:48] <ivoks> check sizes of yoursdb5 and sdc5
[11:49] <ivoks> also check if you don't already have sdc5 in some other raid
[11:53] <mralphabet> interesting, from md0
[11:53] <mralphabet>      Raid Level : raid1
[11:53] <mralphabet>      Array Size : 74918976 (71.45 GiB 76.72 GB)
[11:53] <mralphabet>     Device Size : 74918976 (71.45 GiB 76.72 GB)
[11:53] <mralphabet>    Raid Devices : 2
[11:53] <mralphabet> from md1 
[11:53] <mralphabet>      Raid Level : raid1
[11:53] <mralphabet>     Device Size : 3228928 (3.08 GiB 3.31 GB)
[11:53] <mralphabet>    Raid Devices : 2
[11:53] <mralphabet> no array size
[11:56] <mralphabet> /dev/sdb5            9328        9729     3229033+  fd  Linux raid autodetect
[11:56] <mralphabet> /dev/sdc5            9328        9729     3229033+  fd  Linux raid autodetect
[11:59] <ivoks> there you go...
[12:00] <ivoks> ups... i misread that
[12:00] <mralphabet> hrm?
[12:01] <ivoks> you should destroy that raid and recreate it
[12:01] <mralphabet> heh, that's what I'm trying to do
[12:01] <ivoks> or...
[12:01] <ivoks> even better
[12:02] <ivoks> grow it
[12:02] <ivoks> mdadm -G
[12:02] <mralphabet> afkhome, back later
[12:03] <ivoks> and i'm of to bed