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
Accipiter
Jan 24, 2004

SINATRA.

DizzyBum posted:

Say I want to write a little shell script that tells a user what quotas on a server are above a certain percentage. I don't really have a problem writing it, but what I get stuck on is: where do I actually PUT the script? Obviously I can put it anywhere on the server the user has access to run scripts from, but where should I put it? Is there a standard for this sort of thing?

It should go somewhere under /usr. I'd probably put it in /usr/local/sbin.

Adbot
ADBOT LOVES YOU

SynVisions
Jun 29, 2003

DizzyBum posted:

Say I want to write a little shell script that tells a user what quotas on a server are above a certain percentage. I don't really have a problem writing it, but what I get stuck on is: where do I actually PUT the script? Obviously I can put it anywhere on the server the user has access to run scripts from, but where should I put it? Is there a standard for this sort of thing?

Just pick something in their $PATH. /usr/bin or /usr/local/bin would be fine.

I'm specifying the ones that have a /usr parent as I generally think of those as more user provided executables (as opposed to more core, OS standard executables), and nothing under a sbin/ as those are generally for the superuser.

Lukano
Apr 28, 2003

Anyone have any experience with WINE and uTorrent? I've gotten 1.8.5 working (after installing 1.8.5 in wine, then running 2.0 beta, then copying the settings.dat that 2.0 generated in appdata to the program files path) all well and good but for a problem that's plagued me with utorrent in wine for a while.

I've had the problem with both Ubuntu 9.04 and 9.10, both are running wine 1.1.32.

My speeds will climb up to the line max at times, then all of a sudden the upload speeds will bottom out and drop to 0. They'll stay there a minute or two, then jump back up again.

I've confirmed the traffic is stopping when it happens, it's not just a reporting/visual error in utorrent. I've played with all of the various disk cache options, writing directly to the path I want and through a drive mount in wine. The destination is an mdadm / lvm array with reiserfs.

I'm stumped, and the utorrent forums are useless - my post stating the same as above and more got a 'check the faq, your line might not be able to handle more than 100 connections'.

Elias_Maluco
Aug 23, 2007
I need to sleep
Quick common question: Im going to install linux on my PC, dual booting with Windows XP. Ive already had SUSE installed, but I just stopped working after I spent almost an year without touching it (it will give a big error during initialization and stop).

Anyways, I didnt like SUSE, had tons of problems and want to try another distro. I was going with Ubuntu, but would want to hear some other suggestions too. I intend to use it for everything but gaming and some specific tasks (I work with Flash). So, is Ubuntu still the best or could I try something else?

EDIT: I like Gnome better than KDE.
EDIT 2: I wonder if I could get Flash CS4 to work with Wine? Probably not?

Elias_Maluco fucked around with this message at 16:27 on Nov 5, 2009

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Lukano posted:

Anyone have any experience with WINE and uTorrent? I've gotten 1.8.5 working (after installing 1.8.5 in wine, then running 2.0 beta, then copying the settings.dat that 2.0 generated in appdata to the program files path) all well and good but for a problem that's plagued me with utorrent in wine for a while.

Hard to tell without seeing your config. Like many others, I run an older uTorrent release on Wine and have never had any trouble.

Elias_Maluco posted:

So, is Ubuntu still the best or could I try something else?

Ubuntu is very easy to use if you come from a Windows or Mac environment. If you just want to use apps and forget about what's under the bonnet, Ubuntu is probably the best solution for you, also because there is a large support community. If you want something much closer to the original Unix idea, Slackware is your best bet.

p.s. Check winehq's compatibility database before you install stuff. Also, try to find an article on installing DirectX on Wine, including .dll overrides and O/S spoofing. It makes a world of difference for most graphics-related software, including games.

Underflow fucked around with this message at 16:34 on Nov 5, 2009

Lukano
Apr 28, 2003

Underflow posted:

Hard to tell without seeing your config. Like many others, I run an older uTorrent release on Wine and have never had any trouble.

What version of uTorrent do you run without issue? I'm willing to try an older version to see if it resolves to problem - at the very least it'll help me isolate the issue a bit.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Lukano posted:

What version of uTorrent do you run without issue? I'm willing to try an older version to see if it resolves to problem - at the very least it'll help me isolate the issue a bit.

Version 1.8.1 (build 12639) from 2008.

I run Wine 1.1.10 as Windows 2000, with the March 2008 release of DirectX and lots of .dll overrides - though none of that is important for running uTorrent.

Xenomorph
Jun 13, 2001

JHVH-1 posted:

I believe PAE will be enabled by default in Ubuntu server. On standard Debian you need to use kernel-bigmem but Ubuntu has its own server kernels.
Once you log in just type 'free' or run top and see if it has the full amount or the 3.36 etc.

code:
butts@lmao:~$ free
             total       used       free     shared    buffers     cached
Mem:       4149048    4000360     148688          0     167532    3577016
-/+ buffers/cache:     255812    3893236
Swap:      8305596          0    8305596
Looks like it's darn close to 4 Gigs. Thanks!

Lukano
Apr 28, 2003

Found a way to resolve the upload drop I was getting with utorrent in wine ;

quote:

Try various uTP settings? (Set Preferences > Advanced > bt.transp_disposition to 15 to enable, 10 to force, 5 to disable)

Set mine to 15 (was 13).

Severed
Jul 9, 2001

idspispopd
So I'm trying to install Fedora off of a Live CD, and the installation goes fine until the very end when it has to finalize the partitions. It ends up hanging there until I eventually have to shut down the machine. Is this a known problem with Live CD installs or am I not being patient enough? It hung on that final screen for about 30 minutes before I canned it.

EoRaptor
Sep 13, 2003

by Fluffdaddy

EoRaptor posted:

Okay, so here is a stupid question.

I need to configure an smtp server (I don't care which one) such that mail sent to the the server has it's destination address (to field) re-written, replacing anything (*@*.*) that was there with a fixed set of addresses, and then have the email sent on to the actual email server for delivery to those addresses.

We are doing some side by side testing of some new software, and it has the ability to automatically send out notifications and other emails. I'd like to be able to change just the email server (one config change) rather than the configured addresses that might be there (a bunch of them).

Google has all sorts of ways to do this, but the results I've found only deal with matching a known email address or known domain and replacing it. I just need to replace anything with a set of testing emails.

I don't usually like quoting myself, but is there really no way to do this? Even a way to get started would be nice. As I said, plenty of ways to manipulate sender or recipient if I know the emails addresses ahead of time, but nothing I've found to replace *@*.* with a fixed set of emails.

spiritual bypass
Feb 19, 2008

Grimey Drawer

EoRaptor posted:

I don't usually like quoting myself, but is there really no way to do this? Even a way to get started would be nice. As I said, plenty of ways to manipulate sender or recipient if I know the emails addresses ahead of time, but nothing I've found to replace *@*.* with a fixed set of emails.

Using PHP, it would be simple enough to write a program to replace each part of the email address with explode(). Explode on '@', then explode the second half of the result set on '.' and you'll have all the parts of a typical address available for manipulation.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Severed posted:

So I'm trying to install Fedora off of a Live CD, and the installation goes fine until the very end when it has to finalize the partitions. It ends up hanging there until I eventually have to shut down the machine. Is this a known problem with Live CD installs or am I not being patient enough? It hung on that final screen for about 30 minutes before I canned it.

If you have a very large drive or multiple drives, and the partitioning/formatting routine is set to check for bad blocks, it could take quite a while indeed. When you say it hangs, do you mean there is no sound at all coming from the drive(s)?

You could avoid all this by partitioning your drive(s) yourself, of course. If you need instructions, let us know.

bitprophet
Jul 22, 2004
Taco Defender

EoRaptor posted:

I don't usually like quoting myself, but is there really no way to do this? Even a way to get started would be nice. As I said, plenty of ways to manipulate sender or recipient if I know the emails addresses ahead of time, but nothing I've found to replace *@*.* with a fixed set of emails.

As long as you can get a "wildcard" address working (iirc this is something you can set in Postfix alias maps, i.e. how most systems have a catchall rule forwarding to postmaster or root) you can use Procmail, which is insanely flexible and can be told to forward emails based on any of the headers or the body content or etc.

I.e. get all emails going to one (real) address or local system account, then install Procmail and edit your /etc/procmailrc with whatever rules you need, terminating in "!" action lines meaning "forward the mail to this address or list of addresses.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
This is pretty much the kind of thing that Exim was designed for, no?

EoRaptor
Sep 13, 2003

by Fluffdaddy
From my searching, most of them fall into two categories:

Replace a known address with a another known address (to or from). This doesn't work, because I don't know what the 'to' address will be, just that I want to replace it.

Accept mail for any address at a configured domain, delivering what is known and sending what is unknown to account X. I don't know all the possible domains I could be encountering.

I haven't found a way to process such that the mail system should accept any mail it gets, for any address at any domain from any sender, and replace the 'to' with a set of preconfigured addresses, then pass it on to the actual mail server for delivery.

It should be possible, but googling reveals endless approaches for known addresses or domains, but no hints I can follow toward a sort of 'everything' rule. Normally, I'd be able to winnow it down, but there are just too many results. I'm neutral about the smtp server software, as the system will be doing this and only this as part of our testing setup, so I don't need to configure it outside of that.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Misogynist posted:

This is pretty much the kind of thing that Exim was designed for, no?

No, Exim was designed for crazy email setups that are only possible by running custom perl or some other poo poo at various steps in the processing. This is way below the minimum crazy level for Exim to be needed.

That said, this is really easy in Exim, with a rewriting router:

code:
router_rewrite_everything:
  driver = redirect
  data   = address@destination.domain
That router will accept all emails, rewrite the destination to address@destination.domain, then pass them back down the chain to be delivered.

EoRaptor
Sep 13, 2003

by Fluffdaddy

ShoulderDaemon posted:

No, Exim was designed for crazy email setups that are only possible by running custom perl or some other poo poo at various steps in the processing. This is way below the minimum crazy level for Exim to be needed.

That said, this is really easy in Exim, with a rewriting router:

code:
router_rewrite_everything:
  driver = redirect
  data   = [email]address@destination.doma[/email]in
That router will accept all emails, rewrite the destination to address@destination.domain, then pass them back down the chain to be delivered.

Yeah, Misogynist's exim hint got me started, but I think this just saved me a bunch of googling and/or regex writing.

Thanks everybody.

Severed
Jul 9, 2001

idspispopd
I'm trying to configure a static IP for my debian box.

I've edited the /etc/network/interfaces file with the following info:

code:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
 address 192.168.0.6
 gateway 192.168.0.1
 netmask 255.255.255.0
 network 192.168.0.0
 broadcast 192.168.0.255
And then I restart the init daemon for it, and yet it still returns a DHCP address every single time. Why is it ignoring what I've explicitly defined in the /etc/network/interfaces file???

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Severed posted:

I'm trying to configure a static IP for my debian box.

I've edited the /etc/network/interfaces file with the following info:

code:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
 address 192.168.0.6
 gateway 192.168.0.1
 netmask 255.255.255.0
 network 192.168.0.0
 broadcast 192.168.0.255
And then I restart the init daemon for it, and yet it still returns a DHCP address every single time. Why is it ignoring what I've explicitly defined in the /etc/network/interfaces file???

What init daemon? There isn't really anything under /etc/init.d that you can use to reparse the interfaces file the way you probably want to. You probably want to use ifdown to bring the interface down, then ifup to bring it back up. The ifdown may not kill the already-running DHCP client daemon, though, as the interface description no longer refers to DHCP, so you might need to kill that manually.

nbv4
Aug 21, 2002

by Duchess Gummybuns
I came across this script today: http://myy.helia.fi/~karte/un.html, which seems like a godsend, since I can't seem to ever be able to remember the exact way to extract each and every single archive type linux uses. The only ptoblem is that script doesn't work for me. It just outputs "### Processed:" and nothing else. Can anyone get this to work?

Severed
Jul 9, 2001

idspispopd

ShoulderDaemon posted:

What init daemon? There isn't really anything under /etc/init.d that you can use to reparse the interfaces file the way you probably want to. You probably want to use ifdown to bring the interface down, then ifup to bring it back up. The ifdown may not kill the already-running DHCP client daemon, though, as the interface description no longer refers to DHCP, so you might need to kill that manually.

will a restart of the machine suffice?

Also, for some very odd reason my router is saying that it has assigned a DHCP address to the Debian machine. But the Debian machine now reports that it is manually assigned and is not in any networks. I can't ping the static IP I setup for it, either.

edit - Restart fixed it all.

Severed fucked around with this message at 04:23 on Nov 7, 2009

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

nbv4 posted:

I came across this script today: http://myy.helia.fi/~karte/un.html which seems like a godsend, since I can't seem to ever be able to remember the exact way to extract each and every single archive type linux uses. The only ptoblem is that script doesn't work for me. It just outputs "### Processed:" and nothing else. Can anyone get this to work?

That script looks kind of terrible. If you're on Debian or Ubuntu, just apt-get install unp to get a much more robust alternative. If you can't do that, I've republished it here (licensed under GNU GPL 2 or later, perl script so it is its own source).

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Severed posted:

Also, for some very odd reason my router is saying that it has assigned a DHCP address to the Debian machine.

DHCP servers don't usually get notified when a machine stops using DHCP, so as far as the server's concerned that address will stay in use until it times out, almost always in less than a day.

Severed
Jul 9, 2001

idspispopd
Okay, now this is getting strange.

I am able to connect to my debian box webhost at 192.168.0.6 like I wanted.

I am also able to ping the box.

However, my router's DHCP still says it has assigned it an IP address, when clearly it is not using that address.

I can't FTP into my Debian box anymore since all of this started. I get this error message: "ECONNREFUSED - Connection refused by server"

What the hell is going on?

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Severed posted:

I can't FTP into my Debian box anymore since all of this started. I get this error message: "ECONNREFUSED - Connection refused by server"

Your FTP daemon is not running. Check the logs to see why it didn't start.

Severed
Jul 9, 2001

idspispopd

ShoulderDaemon posted:

Your FTP daemon is not running. Check the logs to see why it didn't start.

Hm, it says its running. I've also restarted it.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Severed posted:

Hm, it says its running. I've also restarted it.

Did it leave any log messages? Does it work if you connect over localhost?

Edit: Also, what is the "it" that says it's running? ps? netstat? The init script that starts it?

Severed
Jul 9, 2001

idspispopd

ShoulderDaemon posted:

Did it leave any log messages? Does it work if you connect over localhost?

Edit: Also, what is the "it" that says it's running? ps? netstat? The init script that starts it?

I just typed in /etc/init.d/vsftpd start to which it responded that it was already started.

So then I restarted it, and the console came back saying the daemon had restarted.

Sorry I'm kinda green to all this.

I have it working now so that I can FTP in on the local intranet, but if I give my public IP with a user/pass to a friend who wants to FTP in, he's getting that same error message I was getting back there. Any ideas?

Xinlum
Apr 12, 2009

Merry Christmas to all, and to all a Dark Knight

No idea where to put this, but here it is. I'm using an old rear end IBM Thinkpad T20 as a backup computer. ts slow as poo poo running XP, and I'd like to give a Linux distro a whirl. What would you guys suggest for such a weak computer? Specifically, I would like it to run reasonably fast, support flash video (it being choppy is ok), somewhat easy for a new Linux user, and able to browse fancy sites like the forums.

Also, being able to somehow support a Netgear WG111v2 wireless G USB adapter would be a huge plus for me.

Severed
Jul 9, 2001

idspispopd
Alright, it's working fine now, thanks guys.

If I want to limit my FTP access at work to just the /var/www/ directory, how would I do that?

edit - I know I'm being a total pill and you guys are awesome, but, I've changed the vsftpd.conf file to allow users to write, yet I can't upload anything or download anything.

Severed fucked around with this message at 05:18 on Nov 7, 2009

HolyDukeNukem
Sep 10, 2008

Xinlum posted:

No idea where to put this, but here it is. I'm using an old rear end IBM Thinkpad T20 as a backup computer. ts slow as poo poo running XP, and I'd like to give a Linux distro a whirl. What would you guys suggest for such a weak computer? Specifically, I would like it to run reasonably fast, support flash video (it being choppy is ok), somewhat easy for a new Linux user, and able to browse fancy sites like the forums.

Also, being able to somehow support a Netgear WG111v2 wireless G USB adapter would be a huge plus for me.

i would try xubuntu. If that doesn't work your probably going to have to install a *box version, i.e. fluxbox or openbox. I'm not completely sure on this since i don't know your precise specs.

JHVH-1
Jun 28, 2002

Severed posted:

Alright, it's working fine now, thanks guys.

If I want to limit my FTP access at work to just the /var/www/ directory, how would I do that?

edit - I know I'm being a total pill and you guys are awesome, but, I've changed the vsftpd.conf file to allow users to write, yet I can't upload anything or download anything.

Easiest way, create a dedicated ftp user for it. Add it as a regular user (you can also set their shell to /sbin/nologin so you can ban ssh access if you want). Then in the vsftpd.conf set chroot_enable=YES, and set the path of the chroot users file. Put the name of the user in the file and restart vsftpd.

By default users will be locked in their home directory, if you want a custom location I think you can do that but don't remember off the top of my head the syntax.

Severed
Jul 9, 2001

idspispopd

JHVH-1 posted:

Easiest way, create a dedicated ftp user for it. Add it as a regular user (you can also set their shell to /sbin/nologin so you can ban ssh access if you want). Then in the vsftpd.conf set chroot_enable=YES, and set the path of the chroot users file. Put the name of the user in the file and restart vsftpd.

By default users will be locked in their home directory, if you want a custom location I think you can do that but don't remember off the top of my head the syntax.

Thank you, working like a charm now.

I want to get rid of all the cords around this box, so I want to setup VNC to be able to log in using my main windows computer. I got vncserver up and running and I've set a password for it. I've tried connecting to the private static IP I've given the box and I've also tried the computers name; neither work. Any ideas?

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe

Severed posted:

Thank you, working like a charm now.

I want to get rid of all the cords around this box, so I want to setup VNC to be able to log in using my main windows computer. I got vncserver up and running and I've set a password for it. I've tried connecting to the private static IP I've given the box and I've also tried the computers name; neither work. Any ideas?

Can you ping the box? Are you working through a router or anything like that? Is iptables on blocking the port, or if it's on are you enabling access? On the subject of VNC, I've found that http://www.nomachine.com/ works really well for these types of things, and it's a bit more "fire and forget" if you would. If you continue to have trouble with setting up VNC, give this a try.

Twlight fucked around with this message at 22:19 on Nov 7, 2009

Severed
Jul 9, 2001

idspispopd

Twlight posted:

Can you ping the box? Are you working through a router or anything like that? Is iptables on blocking the port, or if it's on are you enabling access? On the subject of VNC, I've found that http://www.nomachine.com/ works really well for these types of things, and it's a bit more "fire and forget" if you would. If you continue to have trouble with setting up VNC, give this a try.

Well, the same linux box is hosting websites, which I can view just fine. I have port 5900 open, but I don't think it's required for local hosts. I have enabled the service and given a session. Still nothing.

I'll give Nomachine.com a shot. Thanks.

covener
Jan 10, 2004

You know, for kids!

Severed posted:

Well, the same linux box is hosting websites, which I can view just fine. I have port 5900 open,

connecting to :1 / 5901 if you're running a "real" X server on that box?

Xinlum
Apr 12, 2009

Merry Christmas to all, and to all a Dark Knight

I just got Xubuntu running on my backup laptop. Is there a guide to help me learn some things coming from a Windows background? Also, how do I use my Wg111v2 USB wireless stick?

Severed
Jul 9, 2001

idspispopd

covener posted:

connecting to :1 / 5901 if you're running a "real" X server on that box?

Well, in an interesting twist, it turns out I was activating the wrong service. I was using vncserver, when I should have been using tightvncserver.

So I went and made the change. Now I can connect, but all I get is a gray screen with no errors. Now what?

Adbot
ADBOT LOVES YOU

covener
Jan 10, 2004

You know, for kids!

Severed posted:

Well, in an interesting twist, it turns out I was activating the wrong service. I was using vncserver, when I should have been using tightvncserver.

So I went and made the change. Now I can connect, but all I get is a gray screen with no errors. Now what?

edit ~/.vnc/xstartup or wherever in /etc/ the service-based one cares about and kick off an xterm/gnome-session/icewm.

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