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
Ashex
Jun 25, 2007

These pipes are cleeeean!!!
Anyone have experience using ntfsundelete?
I was trying to recover a folder that I removed by accident and on all actual files it kept saying "Record in use by the mft"

Adbot
ADBOT LOVES YOU

crab avatar
Mar 15, 2006

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

dj.TAKA posted:

Anyone have a recommendation for an archive program that handles .rar and .7z, preferably with a GUI? Is it possible to get Archive Manager to work with those extensions?
Install unrar and p7zip, Archive Manager (file-roller) will pick them up.

covener
Jan 10, 2004

You know, for kids!

dj.TAKA posted:

Anyone have a recommendation for an archive program that handles .rar and .7z, preferably with a GUI? Is it possible to get Archive Manager to work with those extensions?

I think file-roller speaks both of those

edit: Like previous poster said several hours ago :)

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf
I have troubling understanding ssh :(

I have someone that wants to run a script that does some sftp stuff between their machine and mine. However the way the script works, it can't enter in a password.

I think what I need is ssh key based authentication, where the guy can log in once and give a passphrase, and then never have to do it again on successive logins (right?)

What do I need to do to get this working (including commands, I need hand-holding) and what can I do to make sure this won't affect anyone else that logs into my box remotely? (or opens up security risks etc)

Puck42
Oct 7, 2005

NZAmoeba posted:

I have troubling understanding ssh :(

I have someone that wants to run a script that does some sftp stuff between their machine and mine. However the way the script works, it can't enter in a password.

I think what I need is ssh key based authentication, where the guy can log in once and give a passphrase, and then never have to do it again on successive logins (right?)

What do I need to do to get this working (including commands, I need hand-holding) and what can I do to make sure this won't affect anyone else that logs into my box remotely? (or opens up security risks etc)

key based authentication is more secure than password, so don't worry about security unless you go around giving out your private key to people.

What you have to do is generate a public and private ssh key. Then add the public hash to a file name authorized_keys in your ~/.ssh folder on the server.


$ ssh-keygen -q -f ~/.ssh/id_rsa -t rsa
(Enter nothing for a password*)

Will generate two files in ~/.ssh, id_rsa and id_rsa.pub

id_rsa is your private key, keep this private
id_rsa.pub is your public key

Now just copy the contents of id_rsa.pub into the ~/.ssh/authorized_keys file on the server. It should be setup now.

If you have any problems check your /etc/ssh/sshd_config and make sure "PubkeyAuthentication yes" is in there.

* You can enter a password if you want, and it would be more secure but you would still have to enter a password to connect.

Puck42 fucked around with this message at 01:51 on Dec 18, 2008

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf

Puck42 posted:

key based authentication is more secure than password, so don't worry about security unless you go around giving out your private key to people.

What you have to do is generate a public and private ssh key. Then add the public hash to a file name authorized_keys in your ~/.ssh folder on the server.


$ ssh-keygen -q -f ~/.ssh/id_rsa -t rsa
(Enter nothing for a password*)

Will generate two files in ~/.ssh, id_rsa and id_rsa.pub

id_rsa is your private key, keep this private
id_rsa.pub is your public key

Now just copy the contents of id_rsa.pub into the ~/.ssh/authorized_keys file on the server. It should be setup now.

If you have any problems check your /etc/ssh/sshd_config and make sure "PubkeyAuthentication yes" is in there.

* You can enter a password if you want, and it would be more secure but you would still have to enter a password to connect.

I'm confused as to how that works.

Who's ~ folder do I put it into? they will be logging in under a login called cars, so would I put that into /home/cars?

How does having a key in their home folder on my server suddenly allow them to log in without a password from their server?

Other users already ssh into this server, this won't have any affect on them at all right?

I've inherited this server, and found that I already have dsa keys in my /etc/ssh folder (apparently what they do on other servers uses dsa), though I have no idea if they were made with a passphrase or not (yay inherited undocumented servers!) Does this change anything?

Puck42
Oct 7, 2005

NZAmoeba posted:

I'm confused as to how that works.


Who's ~ folder do I put it into? they will be logging in under a login called cars, so would I put that into /home/cars?

Which ever user is going to be logging in using the key. So yes, /home/cars.

Make sure the the user connecting to you gives you their public key. You can't generate it your self on the server.

NZAmoeba posted:

How does having a key in their home folder on my server suddenly allow them to log in without a password from their server?

The connection is encrypted using the publc key, and can only be decrypted by whomever has teh private key. Same way PGP works pretty much.

NZAmoeba posted:

Other users already ssh into this server, this won't have any affect on them at all right?

Nope, they should be fine.

NZAmoeba posted:

I've inherited this server, and found that I already have dsa keys in my /etc/ssh folder (apparently what they do on other servers uses dsa), though I have no idea if they were made with a passphrase or not (yay inherited undocumented servers!) Does this change anything?

DSA should also work, I don't believe it's broken. Just change the -t rsa to -t dsa on the ssh-keygen command. You really just need the user that wants to connect to give you their public key, or they can even do it themselves if they are able to login with a password.

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf

Puck42 posted:

Which ever user is going to be logging in using the key. So yes, /home/cars.

Make sure the the user connecting to you gives you their public key. You can't generate it your self on the server.

Wait, so I don't actually have to do anything? (apart from editing sshd_config to PubkeyAuthentication yes), they should log in normally to my server and generate the keys that way themselves?

man I hate anything to do with crypto, I understand lots of things but never crypto!

epswing
Nov 4, 2003

Soiled Meat
They can do it themselves if they know how, AND can currently log in (with their password). Otherwise, ask them to run the above keygen command, and send you the public key (which you'll stick in their ~/.ssh/authorized_keys file for them).

Edit: To be a bit more clear, assuming you're on the server, and you have their id_rsa.pub file (which they've generated and sent you) in the current directory:

code:
$ cat id_rsa.pub >> /home/cars/.ssh/authorized_keys
This will append (concatenate) the contents of id_rsa.pub to authorized_keys.

epswing fucked around with this message at 03:26 on Dec 18, 2008

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf
Yes they can currently log into my server through ssh and do things, they just didn't want the password prompt for scripting reasons.

I'll get them to try and run it tomorrow after I comment out that pubkeyauthentication yes line. Any other settings I might want to check? It's an internet facing server so I'm mostly concerned about security.

fnordcircle
Jul 7, 2004

PTUI
Back in the day on my Windows 95 box there was an application I had that would automatically startup a system at a given time.

I'm sure I can cron up a job to shutdown -r now my linux box, but I can't come up with any software packages or ideas on how to start it up automatically. Even if it was just a timed standy/hibernate that would be fine. Any ideas?

It's an EEE PC running Ubuntu 8.04. It's mainly function is as a remote-controllable mp3/pandora player.

Peanutmonger
Dec 6, 2002

NZAmoeba posted:

I've inherited this server, and found that I already have dsa keys in my /etc/ssh folder (apparently what they do on other servers uses dsa), though I have no idea if they were made with a passphrase or not (yay inherited undocumented servers!) Does this change anything?

I didn't see this made clear and it's rather important. DO NOT hand out the private key in /etc/ssh. It won't have a passphrase because it's the key used for sshd, the server. When you ssh to a box for the first time, you're seeing the fingerprint of the key in that directory. Whoever holds that private key can masquerade as that server. You really don't want to use that for anything else, especially not for a user.

epswing's tips should work, but a basic understanding of public key cryptography, especially when toying with ssh, is incredibly useful.

StrikerJ
Oct 8, 2001

Most new graphics cards can handle hardware decoding of things like mpeg2, mpeg4 and h.264 with a very low CPU useage, but from what I understand this isn't possible in Linux because of some driver issue? Is that correct and in that case, is it something that will be fixed?

Is the situation the same for all the hardware makers (Nvidia, ATI, Intel)? I guess I haven't really grasped the problems Linux usually seem to have with 3d acceleration. Is it because the vendors doesn't provide any drivers or just not open source drivers?

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf
Dude with SSH problems again, here's the email I got from the guy, someone point out what I'm doing wrong:

code:
[carsftp@ce-bastion ~]$ ssh-keygen -q -f ~/.ssh/id_dsa -t dsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
[carsftp@ce-bastion ~]$ cd ~/.ssh
[carsftp@ce-bastion .ssh]$ cat id_dsa.pub >> ~/.ssh/authorized_keys
[carsftp@ce-bastion .ssh]$ exit
logout
Connection to 10.111.128.19 closed.
[carsaite@sf2266]> (/appl/cars_ite/cars)
 
[carsaite@sf2266]> (/appl/cars_ite/cars)
sftp carsftp@10.111.128.19
Connecting to 10.111.128.19...
carsftp@10.111.128.19's password:
Permission denied, please try again.
carsftp@10.111.128.19's password:
and from my sshdconfig file:
code:
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys
Is me having RSAAuthenication in there causing it to not work with DSA?

Modern Pragmatist
Aug 20, 2008

NZAmoeba posted:


code:
[carsftp@ce-bastion ~]$ ssh-keygen -q -f ~/.ssh/id_dsa -t dsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
[carsftp@ce-bastion ~]$ cd ~/.ssh
[carsftp@ce-bastion .ssh]$ cat id_dsa.pub >> ~/.ssh/authorized_keys
[carsftp@ce-bastion .ssh]$ exit
logout
Connection to 10.111.128.19 closed.
[carsaite@sf2266]> (/appl/cars_ite/cars)
 
[carsaite@sf2266]> (/appl/cars_ite/cars)
sftp carsftp@10.111.128.19
Connecting to 10.111.128.19...
carsftp@10.111.128.19's password:
Permission denied, please try again.
carsftp@10.111.128.19's password:

You have to run keygen on carsaite@sf2266 and then copy the public key to carsftp@ce-bastion and add it to authorized_keys on carsftp@ce-bastion. Keep the private key on carsaite@sf2266.

Above you created the key on carsftp@ce-bastion and putting it in authorized_keys on carsftp@ce-bastion, thus giving it access to itself.

Modern Pragmatist fucked around with this message at 03:28 on Dec 19, 2008

Puck42
Oct 7, 2005

NZAmoeba posted:

and from my sshdconfig file:
code:
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys
Is me having RSAAuthenication in there causing it to not work with DSA?

I don't believe those lines should be commented out.

bitprophet
Jul 22, 2004
Taco Defender

Puck42 posted:

I don't believe those lines should be commented out.

In most Unix config files, something commented out implies that the specified value is the default. Thus, he probably doesn't need to touch them at all. If you need to do a sanity check, the default values for those options (and their descriptions) can be found in man sshd_config.

Puck42
Oct 7, 2005

bitprophet posted:

In most Unix config files, something commented out implies that the specified value is the default. Thus, he probably doesn't need to touch them at all. If you need to do a sanity check, the default values for those options (and their descriptions) can be found in man sshd_config.

True, good point.

I just wanted to make sure that isn't the issue.

Alowishus
Jan 8, 2002

My name is Mud

StrikerJ posted:

Most new graphics cards can handle hardware decoding of things like mpeg2, mpeg4 and h.264 with a very low CPU useage, but from what I understand this isn't possible in Linux because of some driver issue? Is that correct and in that case, is it something that will be fixed?
Yes, nVidia's latest driver release for Linux has hardware decoding capabilities. I believe Intel is also making progress on drivers that enable ClearVideo on their newer chipsets. I don't know what ATI's status is.

quote:

Is the situation the same for all the hardware makers (Nvidia, ATI, Intel)? I guess I haven't really grasped the problems Linux usually seem to have with 3d acceleration. Is it because the vendors doesn't provide any drivers or just not open source drivers?
Most vendors are pretty good about their Linux support these days. Of the three you mentioned, Intel is tops with fully open source drivers. There are also open DRI drivers for older ATI chipsets, but for anything cutting edge from nVidia or ATI you're going to have to use their binary drivers. They work, the problem has just long been installation. ATI used to only provide RPMs that were built for a specific version of X11. nVidia was a little better about multi-distro support, but they insisted that you use their installer. These days, as long as you don't mind enabling non-free repositories, most modern distributions have repackaged versions of the proprietary drivers available for relatively easy installation. The newer versions of X11 are also getting much better at hardware detection and automatic configuration without requiring funny config file tweaking, so the situation is definitely improving.

NZAmoeba
Feb 14, 2005

It turns out it's MAN!
Hair Elf
Thanks for the help, I haven't heard from the other party yet so it's either working or he went home for the weekend.

hacksawkiller
Sep 30, 2008

fnordcircle posted:

Back in the day on my Windows 95 box there was an application I had that would automatically startup a system at a given time.

I'm sure I can cron up a job to shutdown -r now my linux box, but I can't come up with any software packages or ideas on how to start it up automatically. Even if it was just a timed standy/hibernate that would be fine. Any ideas?

It's an EEE PC running Ubuntu 8.04. It's mainly function is as a remote-controllable mp3/pandora player.

Does your EEE PC support wake-on-lan? you can switch a computer on with that

Lucien
May 2, 2007

check it out i'm a samurai ^_^

fnordcircle posted:

Back in the day on my Windows 95 box there was an application I had that would automatically startup a system at a given time.

I'm sure I can cron up a job to shutdown -r now my linux box, but I can't come up with any software packages or ideas on how to start it up automatically. Even if it was just a timed standy/hibernate that would be fine. Any ideas?

It's an EEE PC running Ubuntu 8.04. It's mainly function is as a remote-controllable mp3/pandora player.
$ shutdown -r takes more arguments than now

$ man shutdown

maskenfreiheit
Dec 30, 2004
Edit: Double Post

maskenfreiheit fucked around with this message at 20:38 on Mar 13, 2017

Ashex
Jun 25, 2007

These pipes are cleeeean!!!
depends on what you mean by stream. do you just want to watch it on your computer and have the files stored on the file server? If that's the case, just setup samba on it.

maskenfreiheit
Dec 30, 2004
Edit: Double Post

maskenfreiheit fucked around with this message at 20:41 on Mar 13, 2017

fnordcircle
Jul 7, 2004

PTUI

hacksawkiller posted:

Does your EEE PC support wake-on-lan? you can switch a computer on with that

Unfortunately it doesn't, but it's using a wireless connection anyways which I don't believe supports wake-on-lan, but I could be wrong.

Lucien posted:

$ shutdown -r takes more arguments than now

$ man shutdown

I'm not looking to do a timed shutdown, I'm looking to do a timed startup. I can cron it to shutdown/standby/hibernate (I had a typo of shutdown -r instead of shutdown -h there). Specifically I want it to wake up at noon everyday.

I looked through the BIOS and there is no timed startup option so I think this pipedream is over.

Magicmat
Aug 14, 2000

I've got the worst fucking attorneys
What's the best way to set the MTU on a DHCP'ed interface in Ubuntu 8.10? I tried making my /etc/network/interfaces look like this
code:
auto eth0
iface eth0 inet dhcp
        pre-up /sbin/ifconfig $IFACE mtu 1492
but it didn't work; doing a sudo ifdown eth0 && ifup eth0 resets the MTU to comcast's ridiculous 500-something (which causes all sorts of problems just browsing the net, like GMail not working, Flickr not loading images, etc.)

I also tried adding the line "option interface-mtu 1492" to the end of /etc/dhcp3/dhcpd.conf, but that just gives me an error like "missing 'code' after option declaration" (paraphrasing from memory) and spits out my new line with a carat pointing right before '1492' when I reset the interface.

I've also heard of creating a boot script to run 'ifconfig eth0 mtu 1492', but that doesn't help if the interface gets restarted after boot; dhcpd will set it back to Comcast's dhcp-set mtu.

Edit: And Murphy's law dictates that I solve it minutes after posting, even though I spent a good few hours researching prior. Anyway, I had to remove the keyword 'interface-mtu' from the command 'request' in /etc/dhcp3/dhcpd.conf. That apparently asks the DHCP server to recommend a MTU, which dhcpd gladly takes and overrides all other attempts to manually set MTU. So, don't ask the server for it and dhcpd won't use it.

However, if there's a better way out there, I'd love to hear it.

Magicmat fucked around with this message at 07:50 on Dec 22, 2008

covener
Jan 10, 2004

You know, for kids!

Magicmat posted:

What's the best way to set the MTU on a DHCP'ed interface in Ubuntu 8.10? I tried making my /etc/network/interfaces look like this
code:
auto eth0
iface eth0 inet dhcp
        pre-up /sbin/ifconfig $IFACE mtu 1492

pre-up sure looks bogus. That runs before DHCP which is setting your MTU. Suggest post-up.

moros
Dec 18, 2005

the power of love is a curious thing
I've never messed with linux at all before, but am home for the holidays and came across an old box that runs fine with one major problem: it used to run Windows ME, and whenever my dad tried to upgrade it to XP it got stuck in an endless reboot sequence. I powered it on, and it's still stuck in that loop.

So my box does not have a stable OS from which to install linux, which leads me to my questions:

-Is there a way to install linux on there? I was thinking I could connect the HD to a working XP box and wipe the HD and then install linux to it, but don't know if that's possible or not.

-I want to use this box mainly as a web server for development purposes and was planning on installing Ubuntu. Is there a better distro I should look at?

Accipiter
Jan 24, 2004

SINATRA.

moros posted:

So my box does not have a stable OS from which to install linux, which leads me to my questions:

-Is there a way to install linux on there? I was thinking I could connect the HD to a working XP box and wipe the HD and then install linux to it, but don't know if that's possible or not.

Why do you believe that Windows is required to install Linux? It's its own operating system, not an application.

You should probably do a little research into what Linux is and does before you even consider installing it.

moros
Dec 18, 2005

the power of love is a curious thing

Accipiter posted:

Why do you believe that Windows is required to install Linux? It's its own operating system, not an application.

You should probably do a little research into what Linux is and does before you even consider installing it.

I don't beleive that, I just have a box that endlessly reboots when I turn it on and I'm not sure what to do.

waffle iron
Jan 16, 2004

moros posted:

I don't beleive that, I just have a box that endlessly reboots when I turn it on and I'm not sure what to do.
You need to tell us if the computer reboots before or after it POSTs. If it's after, you should be fine.

Sock on a Fish
Jul 17, 2004

What if that thing I said?

waffle iron posted:

You need to tell us if the computer reboots before or after it POSTs. If it's after, you should be fine.

Since it coincided with dad trying to install XP I'm betting it's just BSODing and then rebooting because that's the default behavior for STOP errors.

waffle iron
Jan 16, 2004

Sock on a Fish posted:

Since it coincided with dad trying to install XP I'm betting it's just BSODing and then rebooting because that's the default behavior for STOP errors.
Then burn a linux install DVD and go nuts.

crazysim
May 23, 2004
I AM SOOOOO GAY
Do a memtest first though. The error could lie in some other device but a memtest boot option is present on the Ubuntu CD.

If your hardware is bad, even Linux won't do. It'll kernel panic which is like a BSOD.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!
So, I've decided that I should brush up on my bash/perl and write some more scripts.
Current one I'm looking do is a simple media move/rename based off id3 tags script.
So far I know I'm going to use id3v2 to read out the tags along with awk to pull out the needed information.
Is there anything I'm missing or are those the two main things?

capitalcomma
Sep 9, 2001

A grim bloody fable, with an unhappy bloody end.
-snip-

capitalcomma fucked around with this message at 04:29 on Jun 10, 2014

Ashex
Jun 25, 2007

These pipes are cleeeean!!!
Were you still able to boot to ubuntu? As from what you just described, this is what you did to Grub:


Before:

Sounder posted:


|-----------xp------------||ubuntu||swap|


XP partition: HD 0,0
Ubuntu Partition: HD 0,1

After:

quote:

|--------xp-------||-ntfs-||ubuntu||swap|

XP Partition: HD 0,0
NTFS Partition: HD 0,1
Ubuntu Partition: HD 0,2

You altered the locations of the partitions that Grub sees, so /boot/grub/device.map is now incorrect, which I believe chainloader uses for XP. You need the GRUB rescue disc.

capitalcomma
Sep 9, 2001

A grim bloody fable, with an unhappy bloody end.
-snip-

capitalcomma fucked around with this message at 04:29 on Jun 10, 2014

Adbot
ADBOT LOVES YOU

capitalcomma
Sep 9, 2001

A grim bloody fable, with an unhappy bloody end.
-snip-

capitalcomma fucked around with this message at 04:29 on Jun 10, 2014

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