Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
muskrat
Aug 16, 2004

tehfox0r posted:

I wish to create a startup script to run these (as root) every time my system boots. That would eliminate the need for me to go through the circle-jerk of using the terminal every time I start my computer to get my internet working properly. How can I do this?

The simplest way is to put the commands in /etc/rc.local, or create another script that rc.local will execute. You might want to read about system startup while you're at it.

Adbot
ADBOT LOVES YOU

muskrat
Aug 16, 2004

hallik posted:

hopefully this is the right thread. I am trying to search all files in a directory for a certain string within the files, tell me the file name and line they are on. This only gives me, (standard input): Line#:string

like this...
(standard input):178:var tzname= "US EASTERN";

This is what I am doing:
more * |grep -H -n 'tz'

obviously the -H is wrong. Help?

Like this:

code:
grep -HRn tz *
Your example doesn't work because 'more' is seeing the filenames, 'grep' isn't (grep is just seeing the output from 'more *')

EDIT: -R is for recursion within the directory, and can be removed if you just want the current directory and nothing below it.

muskrat fucked around with this message at 02:07 on Apr 9, 2007

muskrat
Aug 16, 2004

shizen posted:

So plan to make the switch to debian from vista, as lifetime windows user. Is there anything tips to make this a smooth process? Found this link where seems like be incredibly easy to make transition http://www.goodbye-windows.com/debian/vista/

I suspect you'll want to get flash player working as soon as possible.

http://wiki.debian.org/FlashPlayer

You'll also want to read up about various desktop environments (XFCE, LXDE, KDE, Gnome) and try them out.

Also do some research on your video card and whether you'll need to do anything special to get it working in Linux.

muskrat
Aug 16, 2004

Carthag posted:

I'm trying to set up exim4 so that either of the following can send mail:

- IPs whitelisted in dc_relay_nets
- Authenticated users

That is, if whitelisted, authentication is not needed. Only authentication for non-whitelisted IPs. Anyone tried this?

I do this. All of my servers are whitelisted. Mail clients (i.e., real users) have virtual accounts using userdb.

Not sure what distro you're using, but here's the relevant part of my config.

code:
# Defines the access control list that is run when an
# SMTP RCPT command is received.
acl_smtp_rcpt = acl_check_rcpt

...

acl_check_rcpt:
  ...
  # Note that, by putting this test before any DNS black list checks, you will
  # always accept from these hosts, even if they end up on a black list. The
  # assumption is that they are your friends, and if they get onto black
  # list, it is a mistake.
  accept
    hosts = +relay_from_hosts
    control = submission/sender_retain
    control = dkim_disable_verify


  # Accept if the message arrived over an authenticated connection, from
  # any host. Again, these messages are usually from MUAs, so recipient
  # verification is omitted, and submission mode is set. And again, we do this
  # check before any black list tests.
  accept
    authenticated = *
    control = submission/sender_retain
    control = dkim_disable_verify
  ...

muskrat
Aug 16, 2004

PotatoJudge posted:

I'm not familiar with Bash scripts, but I've got one that was auto-generated with tons of bugs and I'm trying to fix it. It is supposed to download some data from the Census website on a state-by-state basis but it is failing at several points. First is on the wget command it is using to attempt to download the data.

code:
wget [url]http://www2.census.gov/geo/tiger/TIGER2009/11_DISTRICT_OF_COLUMBIA/[/url] --no-parent --relative --recursive \
--level=2 --accept=zip,txt --mirror --reject=html
That's the example for downloading DC's data. It is doing the first step right, it recreates the directory structure on my local machine, but it doesn't create the subdirectory in 11_DISTRICT_OF_COLUMBIA. Also, it is not downloading any of the zip files. I've tried it without the --accept and the --reject switches but it still doesn't work.

Put the URL after all of your options. Should work then.

muskrat
Aug 16, 2004

PotatoJudge posted:

Nope, doing that re-creates the directory structure except now 11_DIST... is an html file.

Oops, forgot I had tested by using tigerline.census.gov:

code:
wget --no-parent --relative --recursive --level=2 --mirror --accept=zip,txt --reject=html [url]http://tigerline.census.gov/geo/tiger/TIGER2009/11_DISTRICT_OF_COLUMBIA/[/url]
I think a combination of flags (-H and -D look promising) might be of use to you, if you have to use www2.census.gov for some reason. Pretty sure it's not following the links because the domains are different.

All of the zip files seem to be hosted on tigerline.census.gov, not www2.

muskrat
Aug 16, 2004

JHVH-1 posted:

I haven't tried it, but this is the kinda crazy thing that might be cool http://www.fudgie.org/
Or this http://code.google.com/p/logstalgia/

Wow, awesome. Tried logstalgia on a production server log; very cool program and idea.

muskrat
Aug 16, 2004

bimmian posted:

Any suggestions for a syslog web frontend?

Try LogZilla (formerly php-syslog-ng): http://www.logzilla.pro/

Splunk is also popular, though I think it's a bit more of a complete package as opposed to just a frontend -- a bit more "enterprise" for better or worse... http://www.splunk.com/download

muskrat
Aug 16, 2004

fletcher posted:

code:
greg@box:~$ dpkg --get-selections | grep gnutls
gnutls-bin					install
libcurl3-gnutls					install
libgnutls26					install
libneon27-gnutls				install
I guess that means 2.6?

You'll get more detailed information if you use "dpkg -l" (for installed packages) or "dpkg-query -l":

code:
$ dpkg -l|grep libgnutls
ii  libgnutls26                          2.8.6-1+squeeze1                  the GNU TLS library - runtime library
$ dpkg-query -l "*gnutls*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                               Version                            Description
+++-==================================-==================================-====================================================================================
un  gnutls-bin                         <none>                             (no description available)
un  gnutls0                            <none>                             (no description available)
un  gnutls0.4                          <none>                             (no description available)
un  gnutls3                            <none>                             (no description available)
ii  libcurl3-gnutls                    7.21.0-2.1+squeeze1                Multi-protocol file transfer library (GnuTLS)
un  libcurl4-gnutls                    <none>                             (no description available)
ii  libgnutls26                        2.8.6-1+squeeze1                   the GNU TLS library - runtime library
ii  libneon27-gnutls                   0.29.3-3                           An HTTP and WebDAV client library (GnuTLS enabled)
un  rsyslog-gnutls                     <none>                             (no description available)
The GnuTLS release is 2.8.6 (for me) -- the library version is libgnutls26.

This is probably because the library doesn't change significantly between small GnuTLS releases (e.g., 2.8.5 to 2.8.6), so there's no need to bump the library version number. They usually only do that when incompatibilities are introduced I think.

muskrat
Aug 16, 2004

Bob Morales posted:

Any ideas on a tool or script to watch /var/maillog?

Sometimes our customers email servers will start flagging us as spam, and we don't know it until someone calls wondering why they haven't gotten mail from us all week.

They're supposed to have our servers whitelisted, and we're using SPF records and the other crap, but due to incompetent IT departments and stuff we get flagged as spam every so often.

Basically if there's 10 messages that we're being flagged as spam or something like that within 1 minute, I want an email right away.

It's easy enough to actually parse that part out but I'm not sure how you would make it run 24/7 (every minute via cron?) and make sure it reads every line that gets written to maillog by postfix

I feel for you with the spam bullshit :| You might want to look into tenshi though I don't know if it's still maintained: http://www.inversepath.com/tenshi.html

That said, I highly recommend having these guys do your external mailing (if you're sending out newsletters or whatever): http://sendgrid.com/

muskrat
Aug 16, 2004

bobua posted:

When I plug my camera into an ubuntu box, it's mounted and shows up on the taskbar thing. I have to right click and eject it before something like gphoto can use it, but I can't seem to figure out how to 'eject' it from the command line, only the gui. It doesn't show up when using the mount or eject command.

Any ideas?

Tried 'umount'? E.g.:

code:
$ sudo umount /media/CANNON-CAMERA-OMG
Also, you can configure this auto-mounting behavior: https://help.ubuntu.com/community/Mount/USB

muskrat
Aug 16, 2004

standardtoaster posted:

Other than learning how to use the terminal, is there a simple source that will explain what the gently caress I'm doing with Linux. Like what the file system is, how to install things, where to find them after I install, or how to extract and install a .trz file?

If you haven't picked a distribution, visit their websites, check out their documentation, forums, etc. and pick one you like.

Read the guides for the distribution you pick. They all explain how to install, and what to do after you've finished the install.

muskrat
Aug 16, 2004

Maluco Marinero posted:

Anyone have a preferred method / application for automated mySQL database backups? I'll want to push them off to another server (got ssh access), as well as probably collect them on to my dev computer as well every week or so.

I've seen some automated scripts with a bit of a Google around but I'd rather defer to experience on this one and see what other people use, seeing as how any surprises ,if I needed this, would be very bad.

This depends on the type of tables. Usually mysqldump is fine (if your backup scheme is simple, probably just a custom script you write or find online).

Filesystem snapshots can work too if you have LLVM or ZFS.

If you have a slave, you can do backups without affecting site traffic (e.g., take the slave offline, copy files, restart it).

Overview: http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html

Also have a look at Percona XtraBackup: http://www.percona.com/software/percona-xtrabackup/

muskrat
Aug 16, 2004

CHEF!!! posted:

Hopefully I did not miss what is blindingly obvious due to searching for the wrong phrases on Google, but is it possible to block an entire subnet (Class C 192.168.1.0/24) in iptables but leave access to two or three IPs within that subnet open? These three are all over the place so I can resort to a few range entries and not do hundreds of entries, thank God, but it'd be nice if I could basically say "block access to this /24 except for these..."

Iptables rulesets are evaluated in order, and first match wins. Just put the exceptions first, e.g.:

code:
# exceptions accepted
-A INPUT -i eth0 --src 192.168.1.150 -j ACCEPT
-A INPUT -i eth0 --src 192.168.1.160 -j ACCEPT

# everything else rejected
-A INPUT -i eth0 --src 192.168.1.0/24 -j REJECT

muskrat
Aug 16, 2004

SuperNuts posted:

I need to set up a cron job and I've never set one up before. I read over the command and syntax, basically every day I want to move the log file into a directory. I can probably figure that part out, however can wildcards be used? I'd like it to mv $file.log -> $month\$file.$day.log, is this possible?

There are no environment variables (what you called wildcards) built-in for month/day, etc. but you can just use command substitution to get that information.

Here's how you would do that.

code:
mv /path/to/file.log /path/to/$(date +%B)/file.$(date +%d).log
See the manual page for 'date' to understand %B and %d.

That said, this task is better solved with a log rotation program (they're designed to do exactly this). They vary from system to system, but logrotate is a common one. Your system will have one already installed.

Adbot
ADBOT LOVES YOU

muskrat
Aug 16, 2004

Thermopyle posted:

I'd like to install an application (Everpix) via Wine. Unfortunately my Googlin' leads me to believe that programs distributed as a ClickOnce .application won't work. So, if that's wrong and someone can tell me how to do that that'd be cool.

Failing that, I guess I'd like to emulate a whole Windows install. Is there any compelling reason to pick one virtualization solution over the other on Ubuntu? I used VirtualBox a lot when I was running Windows as my main OS, so unless there's a reason to try something else, I guess I'll use that.

I don't do any heavy lifting with it, but I haven't run into many problems with VirtualBox on Debian (running Windows inside a vbox).

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply