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
Saliva
Jun 3, 2006
Its whats in your mouth
That worked. Thanks! I read somewhere that -R means recursively to the rest of the files, but what does the 775 do?

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003



It allows owner and group full read/write/execute access, and everyone else read/execute so they can traverse the directory.

crab avatar
Mar 15, 2006

iŧ Kë3Ł, cħ gøÐ i- <Ecl8

Saliva posted:

[...] what does the 775 do?

Wikipedia article on octal notation of file system permissions

feld
Feb 11, 2008

Out of nowhere its.....

Feldman

Saliva posted:

That worked. Thanks! I read somewhere that -R means recursively to the rest of the files, but what does the 775 do?

-R, recursive, means it goes deeper (not towards /, the other way ;) ) through the filesystem through the directories. Without the -R you'd only affect files in the current directory.

Megaman
May 8, 2004
I didn't read the thread BUT...
I have another question regarding security. I think I have most of the basics but I was wondering if I could have help determining what I need beyond that for my server I have set up.

I have a router set up with linux tomato and firewall enabled, and only have ssh open to the outside, and my server internally needs only to run ssh and the base services. X11 is not running on my box, I have strong passwords set up for root and the only user account on the machine, all homedir's are set to 700. Also ssh is tightened down so that root cannot login, and 1 fail/5 seconds idle will kill the connection and only 1 connection can be had at a time. Besides these few things, do I need to do anything else to tighten the box or will this keep out most potential intruders?

crazysim
May 23, 2004
I AM SOOOOO GAY
If you're going to tighten it that much, you should check out public key authentication

Megaman
May 8, 2004
I didn't read the thread BUT...

crazysim posted:

If you're going to tighten it that much, you should check out public key authentication

That would be authenticating only with a key? It sounds stupid but that's the only thing I don't want, I want to be able to log in from anywhere, even if I forget the key.

Scaevolus
Apr 16, 2007

Megaman posted:

Besides these few things, do I need to do anything else to tighten the box or will this keep out most potential intruders?

If you're running Ubuntu or Debian, make sure you recreated your SSH keys. :v:

Megaman
May 8, 2004
I didn't read the thread BUT...

Scaevolus posted:

If you're running Ubuntu or Debian, make sure you recreated your SSH keys. :v:

Already done that :)

originalnickname
Mar 9, 2005

tree
I'm trying to install Ubuntu over a pxe netboot, I've got the dhcp and tftp thing figured out but the download that I want to use (the 64 bit build) is giving me file not found errors when it searches in the pxelinux.cfg folder. I got frustrated and tried a netboot install with Debian and it worked fine. Is there a place I can download the proper netboot files so the Ubuntu install works?

The reason why I'm doing it this way is because I don't have a cd-rom for this computer and I can't seem to boot off my flash drive to save my life (evga 680i motherboard)

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

originalnickname posted:

I'm trying to install Ubuntu over a pxe netboot, I've got the dhcp and tftp thing figured out but the download that I want to use (the 64 bit build) is giving me file not found errors when it searches in the pxelinux.cfg folder. I got frustrated and tried a netboot install with Debian and it worked fine. Is there a place I can download the proper netboot files so the Ubuntu install works?

The reason why I'm doing it this way is because I don't have a cd-rom for this computer and I can't seem to boot off my flash drive to save my life (evga 680i motherboard)

If you can get a Debian installer netbooted, then you should be able to run a shell and debootstrap an Ubuntu install from there. You don't get the Ubuntu installer, but it should result in an identical installed system.

Neslepaks
Sep 3, 2003

shopvac4christ posted:

Often I find myself starting a long job in a shell, then wanting to do other things while it works. I can suspend it and start GNU screen, but that job doesn't show up in the new screen terminal, since it's attached to the first shell. Is there any way to move that job to one of the terminals in screen to resume it?

I didn't see this answered. You can't move a running job into screen, but you can put it in the background by typing "bg" after you've suspended it ("fg" to bring it back to the foreground).

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

Megaman posted:

Besides these few things, do I need to do anything else to tighten the box or will this keep out most potential intruders?
There's always more you can do.

Check your hosts.allow/deny, and make sure any running apps are using tcpwrappers. SSH does by default, and this can be pretty useful.
Use pam_limits to limit users' and daemons' open files, memory use, etc.
Change logging permissions to be as restrictive as possible on the logs.
Whatever daemons are listening, make sure they're firewalled or otherwise restricted.
Stop, disable, and even uninstall any services you're not using.
Enable quotas.
Install a log monitor, and actually monitor it.
Lock down suid files.

etc etc etc.

Antimony
Oct 29, 2006

I have an external hard drive connected to my Ubuntu 8.04 server, used for backups. When I reboot the drive seems to be appearing in lsusb, but cannot be accessed by it's mount point. I seems that it is being mounted - then unmounted straight away. When browing to /mnt/ and issuing an ls command, I get the following error:

code:
rob@vhost:/mnt$ ls
ls: cannot access Backup: Input/output error
Backup  Exchange  test  vhd  VMs
But then if I unmount the drive, and remount it again it works fine.

I have changed the fstab entry for the drive to use the UUID instead of it's device name, but I don't know whether this will have an effect.

There have been occasions where I have booted the server, and the drive wasn't even listed in lsusb, so I had to unplug it then plug it in again. I tried installing evms, which was suggested elsewhere - but that rendered the whole thing unbootable by locking the root partition while fsck was trying to check it, I believe. Anyway, I removed evms and it's booting fine again but this drat hard drive is still causing me problems.

I have added a few commands to /etc/init.d/rc.local to remount it, and it seems to work now - but it's a terrible hacky fix. Is there anything else I can do? I have a feeling it might just be the drive being slow to spin up/check (it's an NTFS file system).

Boody
Aug 15, 2001

Antimony posted:

I have an external hard drive connected to my Ubuntu 8.04 server, used for backups. When I reboot the drive seems to be appearing in lsusb, but cannot be accessed by it's mount point. I seems that it is being mounted - then unmounted straight away. When browing to /mnt/ and issuing an ls command, I get the following error:

What kind of external drive is it? It's not a seagate freeagent is it? Some of them handle spinning up and down totally independent of the OS which causes linux to poo poo itself as it doesn't know the drive has spun down. There are some work-arounds if you do a quick google search such as: http://www.nslu2-linux.org/wiki/FAQ/DealWithAutoSpinDownOnSeagateFreeAgent

Antimony
Oct 29, 2006

Boody posted:

What kind of external drive is it? It's not a seagate freeagent is it?

It's a Freecom, which has a Samsung drive (or controller) in it. Basically it shows up as a Samsung device, but is branded Freecom. Cheapo piece of crap and I think it might actually be the drive's fault - linux has just reported a load of bad blocks so I did a chkdsk from Vista, which came up clean. Every time I plugged it in though, I'd get a "This device could perform faster" message, until after the check, when it was working fine. Then it went back to being picky when I plugged it into the server.

Ah well, they're getting really cheap nowadays so I might pick a new one up, but I just wondered if anyone had had the same issue. I'll certainly check out that link though.

6174
Dec 4, 2004
I'm using GNU screen to log the output of some programs (in particular lftp). This works great except the log file is full of control codes. LFTP writes out partial information about each file (ie what percent uploaded/downloaded). To do this it issues a control code (looks like carriage return) and overwrites the line. The screen log captures everything, the over written line, the control codes etc.. The problem is I can't print out the log files since it confuses the printer and results in having something like five lines printed on top of one another. This is of course illegible.

To complicate matters slightly more, if I'm typing a command that gets logged, and hit backspace, the logfile records the incorrect typo, the backspace control code and the correct letters. So unfortunately a simple removal of all the control codes won't work.

Is there some simple way I can strip out these control codes that will result in a readible log for printing?

edit: If there is not a simple way, can someone point me to some documentation that clearly describes exactly what these control codes should be doing in this context?

edit2: I found a suitable enough solution. Basically using sed I first replace carriage returns with line feeds, followed by another trip through sed to remove lines that are empty or only white space. It turns out for my situation this works well enough, but it might not completely work with different input files.

6174 fucked around with this message at 21:20 on Jul 9, 2008

almostkorean
Jul 9, 2001
eeeeeeeee
I have a shell scripting question. Can someone tell me why this script doesn't go into the if block?

code:
sudo ifconfig en0 lladdr 01:02:03:04:05:06 
output=$(ifconfig en0 | grep ether) 

if [ "$output" = "ether 01:02:03:04:05:06" ] 
  then echo "MAC address successfully changed to: 01:02:03:04:05:06" 
fi
If I echo $output, it outputs "ether 01:02:03:04:05:06" so I dono whats up. Does it have to do with spacing or something? I tried making it:

if [ "$output" = " ether 01:02:03:04:05:06" ]

but that didn't work either. Can someone fix this for me?

yippee cahier
Mar 28, 2005

almostkorean posted:


I think grep returns newline characters after every match. Try appending one to your "ether 01:02:03:04:05:06" string.

Casimirus
Mar 28, 2005
Yes.
How realistic is booting from a software raid 5 array for someone who isn't a kernel hacker?

Also, why are 95% of the linux software raid documents online written in like 2002 and mention mdadm as some kind of up-and-coming utility?

Boody
Aug 15, 2001

6174 posted:

Is there some simple way I can strip out these control codes that will result in a readible log for printing?

edit: If there is not a simple way, can someone point me to some documentation that clearly describes exactly what these control codes should be doing in this context?

The control codes are typically 8 bit ascii characters either above 128 or below 30 or so which are classed as unprintable but tell the terminal when to clear the screen, scroll up a line, etc. If you know the exact ranges you can filter them out with a short script or sed as your doing.

The following tr (translate) command can be used to easily remove any unprintable characters from a file before printing or whatever.

tr -d -c [:print:]

The tr man page is pretty helpful, there are a selection of :modifiers: that would allow you to just keep numbers, alphanumeric data, whatever.

nbv4
Aug 21, 2002

by Duchess Gummybuns
http://127.0.0.1/website/home.php

this works, but:

file:///var/www/website/home.php

does not work. How can I configure apache (or maybe my browser?) to recognize this? When I load the second URL, it brings up a download dialog. The first URL executes the php script as intended. The reason I want to use "file:///" is because the google maps API will not work with the "127.0.0.1" method.

Lagos
Mar 17, 2004

Hates Loud Noise

nbv4 posted:

http://127.0.0.1/website/home.php

this works, but:

file:///var/www/website/home.php

does not work.

You can't (easily, anyway). http://127.0.0.1 is a url that instructs your browser to make an http connection to your machine. file:// describes the location of a file on your local machine, without specifying the protocol that should be used to retrieve it. In the general case, however, it won't be retrieved by connecting to a local webserver, because a webserver is not running locally for many users and there would not be a general way to translate a file:// url to an http request in any case, since every web server may store their documents in different locations.

Mr. Eric Praline
Aug 13, 2004
I didn't like the others, they were all too flat.

nbv4 posted:

http://127.0.0.1/website/home.php

this works, but:

file:///var/www/website/home.php

does not work. How can I configure apache (or maybe my browser?) to recognize this? When I load the second URL, it brings up a download dialog. The first URL executes the php script as intended. The reason I want to use "file:///" is because the google maps API will not work with the "127.0.0.1" method.

You have to process the PHP into valid HTML first, cause your browser can't process PHP. So you'd have to run
code:
$ php /var/www/website/home.php > /tmp/home.html
And then open file:///tmp/home.html (and I have no idea if this will still work with an AJAX type deal.)

If 127.0.0.1 doesn't work, can't you call your local machine's name or IP? You might have to have the web server listening on the IP.

nbv4
Aug 21, 2002

by Duchess Gummybuns

chryst posted:

You have to process the PHP into valid HTML first, cause your browser can't process PHP. So you'd have to run
code:
$ php /var/www/website/home.php > /tmp/home.html
And then open file:///tmp/home.html (and I have no idea if this will still work with an AJAX type deal.)

If 127.0.0.1 doesn't work, can't you call your local machine's name or IP? You might have to have the web server listening on the IP.

The problem is that embedded google maps will only work from a domain you have a key for. I have a key, but it only works on my domain. using it on 127.0.0.1 will bring up an "invalid key" error. Up to now I've had to do development on the live site because the maps wouldn't show up on my local machine. This is a huge pain in the rear end. I just recently found out that google maps will without a key, as long as the page is accessed by "file:///", but as posters have said in this thread, PHP won't be executed via file:/// so I guess I'm kinda screwed unless I execute the code first, but that kinda defeats the purpose. My development technique is make a change on the code, ctrl + s, switch to browser and hit F5. I can do this up to 10 times a minute.

hybr1d
Sep 24, 2002

I am running Ubuntu server 8.0.4.1 on a small Geode-class machine having trouble getting wireless going. This machine does not have a GUI running, and will be wireless-only (no ethernet). All of the guides I see are for UI-based approaches, and I have an open AP to associate to. It looks like I connect ok to the AP, but cannot get an IP. The command I am running is:

code:
sudo iwconfig ath0 essid "cheapskate"
Can someone tell me how to do this right or point me to a shell-only howto?

Thanks

dont skimp on the shrimp
Apr 23, 2008

:coffee:

hybr1d posted:

I am running Ubuntu server 8.0.4.1 on a small Geode-class machine having trouble getting wireless going. This machine does not have a GUI running, and will be wireless-only (no ethernet). All of the guides I see are for UI-based approaches, and I have an open AP to associate to. It looks like I connect ok to the AP, but cannot get an IP. The command I am running is:

code:
sudo iwconfig ath0 essid "cheapskate"
Can someone tell me how to do this right or point me to a shell-only howto?

Thanks
Run dhclient ath0 or dhcpcd ath0. One of those should get you an IP. iwconfig doesn't ask for an IP. You can also just run iwconfig to check the signal level of the connection, if you're unsure that you're connected.

hybr1d
Sep 24, 2002

That worked great, thanks! It would appear that the network connection does not activate on boot, and when activated does not join the same network again. How is this done?

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

hybr1d posted:

That worked great, thanks! It would appear that the network connection does not activate on boot, and when activated does not join the same network again. How is this done?

Edit /etc/network/interfaces, add the following stanza:

code:
auto ath0
iface ath0 inet dhcp
  pre-up iwconfig ath0 essid cheapskate

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

nbv4 posted:

The problem is that embedded google maps will only work from a domain you have a key for. I have a key, but it only works on my domain. using it on 127.0.0.1 will bring up an "invalid key" error. Up to now I've had to do development on the live site because the maps wouldn't show up on my local machine. This is a huge pain in the rear end. I just recently found out that google maps will without a key, as long as the page is accessed by "file:///", but as posters have said in this thread, PHP won't be executed via file:/// so I guess I'm kinda screwed unless I execute the code first, but that kinda defeats the purpose. My development technique is make a change on the code, ctrl + s, switch to browser and hit F5. I can do this up to 10 times a minute.
Just add "127.0.0.1 https://www.yourdomain.com" to the C:\WINDOWS\system32\drivers\etc\hosts file. After that when you try to access yourdomain it will be directed to your own computer.

hybr1d
Sep 24, 2002

Thanks for the wireless help! I am trying to get gphoto2 working, and while I installed it fine with apt, the documentation makes it clear I need to do some work with USB for it to work- they make mention of HAL, udev, hotplug, etc. but the documentation is from 2003-2005, and doesn't cover any current distros, especially ubuntu. Is there someone that has gphoto2 working that can point me in the right direction? My camera is supported, my usb ports work fine for keyboards, etc. I am just looking for a linux app that can trigger photos on my Canon camera.

Agapetos
Jul 12, 2007

by Earwicker
I'm thinking of converting my desktop pc into a linux pc and I have a question: I haven't used linux in about 7 years, and I was wondering if Debian Stable is still a good option to consider.

Back in the day when RPMs were a nightmare, and slackware was for people that didn't like the convenience of FreeBSD's system, Debian was loving awesome.

Nowadays, I'd just like to have a super-stable system that I would only have to upgrade (for free) once every couple of years.

edit: I could use my desktop for mission critical documents whereas my secondary would be used for games.

Agapetos fucked around with this message at 17:02 on Jul 12, 2008

Scaevolus
Apr 16, 2007

Agapetos posted:

I'm thinking of converting my desktop pc into a linux pc and I have a question: I haven't used linux in about 7 years, and I was wondering if Debian Stable is still a good option to consider.

Nowadays, I'd just like to have a super-stable system that I would only have to upgrade (for free) once every couple of years.

Debian is still excellent, although Ubuntu is even easier (and is based on Debian). The main repository is essentially Debian Stable.

vvv "essentially" :v:, although I suppose you are correct.

Scaevolus fucked around with this message at 21:24 on Jul 12, 2008

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Scaevolus posted:

Debian is still excellent, although Ubuntu is even easier (and is based on Debian). The main repository is essentially Debian Stable.

I may be wrong, but I think Ubuntu is based on a freeze of testing, not stable. And while it's been steadily improving, Ubuntu's upgrade process is still not as perfectly seamless as Debian's oldstable->stable processes have been. For long-term stability I'd choose Debian stable, especially if the user in question already has experience with Debian.

Agapetos
Jul 12, 2007

by Earwicker
Has Debian ever gotten around to making a graphical installer?

I remember that being a big subject of discussion 7-8 years ago, but for reasons I'm not going to get into, I strongly suspect that a graphical installer was not put into the system.

Anyhow, is aptitude still the way to go or is there now an alternative that I can use with X?

Also, anyone know of a place where I can find a list of compatible ethernet devices? I plan on grabbing the most recent stable version, and hopefully it will support my current device, but you never know...

Supposedly, linux on the desktop has become quite decent in recent years, and with the exception of the games issue, could more or less replace windows.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Agapetos posted:

Has Debian ever gotten around to making a graphical installer?

Well, there's a gtk frontend to debian-installer, but absolutely no-one uses it because it's identical to the text installer except for being slower and not working on as many systems. To be honest, I've never really understood why people criticized Debian for having a text-based installer. In fairness the old installer asked some stupid and nonintuitive questions, but graphics wouldn't have made those better. Nowadays installing Debian consists of hitting enter about a dozen times, and setting a hostname, username, and password when prompted. The graphical installer is slightly harder, because you have to type the magic to start it instead of just hitting enter at the boot prompt, and as I recall sometimes it doesn't set the focus right so you have to use the mouse to click OK, or tab one or two times before hitting enter.

Edit: Use this for a fancy-pants installer that bootstraps from Windows so you don't even need to burn a CD.

Agapetos posted:

Anyhow, is aptitude still the way to go or is there now an alternative that I can use with X?

Synaptic might be up your alley. Personally, I use apt-get, because aptitude is too fancy and intelligent for my tastes.

Agapetos posted:

Also, anyone know of a place where I can find a list of compatible ethernet devices? I plan on grabbing the most recent stable version, and hopefully it will support my current device, but you never know...

It's nearly unheard-of for a wired ethernet device to not work; off the top of my head, I can't think of anything that you can buy today and won't have at least minimal functionality in a current Debian kernel image. If you can post what your card is, I can confirm rather quickly that there's support.

Agapetos posted:

Supposedly, linux on the desktop has become quite decent in recent years, and with the exception of the games issue, could more or less replace windows.

Well, I'm a crazy person who's preferred Linux to Windows since '99 or so...

ShoulderDaemon fucked around with this message at 22:54 on Jul 12, 2008

Agapetos
Jul 12, 2007

by Earwicker

ShoulderDaemon posted:

It's nearly unheard-of for a wired ethernet device to not work; off the top of my head, I can't think of anything that you can buy today and won't have at least minimal functionality in a current Debian kernel image. If you can post what your card is, I can confirm rather quickly that there's support.

Realtek RTL8101E Family PCI-E Fast Ethernet NIC (NDIS 6.0)

Also, would my bluetooth/usb Logitech keyboard and mouse work with debian?

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Agapetos posted:

Realtek RTL8101E Family PCI-E Fast Ethernet NIC (NDIS 6.0)

Looks like it's supported by the r8169 module, which should autoload during the install and just work.

Agapetos posted:

Also, would my bluetooth/usb Logitech keyboard and mouse work with debian?

Ooh, this is tricky... If you have a little USB fob that you got with the keyboard, then there's a way to convince that fob to act like a normal wired USB keyboard and mouse, which will work up until the point when Debian loads the bluetooth drivers and helpfully disables that feature in favor of a full bluetooth endpoint. At that point, you'll have to get the userspace bluetooth tools installed and reassociate the keyboard and mouse with the computer. So, you probably shouldn't count on being able to use them during the install process, because the bluetooth tools won't be installed but the kernel will probably autoload the drivers anyway. And you'll probably have to either reassociate the keyboard and mouse every time you boot into a different operating system than you last used (because they won't be using the same link key, but they will have the same bluetooth MAC, so the keyboard can't just remember two different link keys).

I'd suggest getting Debian installed with a non-bluetooth keyboard, then get someone to help you extract the link key that Windows is using for your keyboard (which is probably hidden in the registry somewhere) and provide that to Linux so it can use the keyboard without reassociating. After that's done, everything will work perfectly - I regularly use a bluetooth keyboard in Debian with no problems at all.

Agapetos
Jul 12, 2007

by Earwicker

ShoulderDaemon posted:

Ooh, this is tricky... If you have a little USB fob that you got with the keyboard, then there's a way to convince that fob to act like a normal wired USB keyboard and mouse, which will work up until the point when Debian loads the bluetooth drivers and helpfully disables that feature in favor of a full bluetooth endpoint. At that point, you'll have to get the userspace bluetooth tools installed and reassociate the keyboard and mouse with the computer. So, you probably shouldn't count on being able to use them during the install process, because the bluetooth tools won't be installed but the kernel will probably autoload the drivers anyway. And you'll probably have to either reassociate the keyboard and mouse every time you boot into a different operating system than you last used (because they won't be using the same link key, but they will have the same bluetooth MAC, so the keyboard can't just remember two different link keys).

I'd suggest getting Debian installed with a non-bluetooth keyboard, then get someone to help you extract the link key that Windows is using for your keyboard (which is probably hidden in the registry somewhere) and provide that to Linux so it can use the keyboard without reassociating. After that's done, everything will work perfectly - I regularly use a bluetooth keyboard in Debian with no problems at all.

Wow, I remember when using regular USB keyboards and mice was a headache with most linux distros.

It's nice to see that linux in general has improved so much, and debian...well, debian didn't really need to improve that much. 7-8 years ago, it was already well ahead of the competition.

Most of my potential issues seem to relate more to the kernel than with debian, it seems.

Adbot
ADBOT LOVES YOU

Outrespective
Oct 9, 2007
Probation
Can't post for 10 years!
Just wanted to add, this was exactly the sort of thread I was looking for when I entered this forum and I'm disappointed it wasn't stickied.

Now installing Ubuntu on the SO's laptop.

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