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
Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
How long should the "wtmp" log file go for?

I just did a 'last' on my machine and got this:

wtmp begins Fri Apr 20 13:51:06 2007

Now I probably did an update around then, does that mean that the update may have cleared the last log? I thought it was supposed to go back to the begining of time.

Adbot
ADBOT LOVES YOU

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

teapot posted:

code:
last -f /var/log/wtmp.1

[john@johnix src]$ last -f /var/log/wtmp.1

wtmp.1 begins Fri Apr 20 13:51:06 2007


[john@johnix src]$ last

wtmp begins Tue May 1 05:02:31 2007


Why are you doing this to me fedora? :cry:

I guess I'm used to my sun machines who don't rotate this log. (And its now at a solid 3.5mb)

It just seems like you'd want this information for longer than it keeps it.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Lexical Unit posted:

I just realized I have no idea how to find out what the gateway-IP is for a Linux system. That information doesn't appear to be in ifconfig and apropos gateway doesn't find anything of value. Searching google for "linux gateway" doesn't offer any clear help.

So like, how do you find out what the IP of your gateway is from a Linux box?

Does 'route' tell you what you'd like to know?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I'm Running a dual-monitor setup on ubuntu linux. This is on a compaq nw8240 (ati video) on a docking station.

My problem is that on my right Monitor, the cursor is messed up, and does not "point" to the right location. The actual location of the cursor is more to the bottom right of where the cursor is being displayed on my screen. This is a pain when trying to select text ( which I am doing often. ) Also, the cursor does not change when I go to the end of the windows. Normally it would switch to a "drag the window out" mode, but it just stays as the cursor, but shifts over a little bit.

Please help!

Or at the very least I'd rather have this happen on the left monitor, because that one is hooked up by VGA and is more blurry than the right monitor.


Xorg.conf:
http://rafb.net/p/rOMXgP39.html

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I want to find the hardware address of a machine.

So far I have this:

/sbin/ifconfig eth0 | grep HWaddr

I thought I would pipe that into "cut" but it looks like cut only wants to read from a file, and won't go from stdin. Any other ideas?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

teapot posted:

code:
/sbin/ifconfig eth0|head -n 1|sed -e 's/^.*HWaddr //g' -e 's/ *$//'

Thanks, I guess I was screwing up the syntax somewhere else then.

I used this one, Thanks everyone!

Edit:
Out of curiosity, is there a way to do this all in perl, other than by just calling that command?(which I'm doing right now)

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

DagothUrReturns posted:

Just a quick Ubuntu question here. I'm running Feisty, and I'd like to know if I'll be able to upgrade to Gutsy when it comes out without wiping my partition. Historically, has there ever been an alternative?

There's an update manager that allows you to update to the new version.

Pretty much is just updates your sources to the new "Gutsy" sources and you do an apt-get dist-upgrade and it works. You don't even need to bring your system offline to do it (Like you're supposed to do for Fedora...)

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I'm setting up an openSUSE system and I want to prevent the users from changing the wallpaper. The lab used to be Fedora, and what I did with Fedora is now not working.

I changed the kdesktoprc to have a [$i] after the section I want to prevent overrideing, but now it just makes the background have a blank white background, no image.

Here's the kdesktoprc which I put into /opt/kde3/share/config

code:
[Desktop0][$i]
BackgroundMode=Flat
BlendBalance=100
BlendMode=NoBlending
ChangeInterval=60
Color1=238,238,238
Color2=0,0,0
CurrentWallpaper=0
LastChange=0
WallpaperMode=ScaleAndCrop
Pattern=
Program=
ReverseBlending=false
Wallpaper=/usr/share/wallpapers/suse101-1600x1200.jpg
WallpaperList=
WallpaperMode=scaled

[MiniCli]
CompletionMode=2

[FMSettings]
ItemTextBackground=invalid
NormalTextColor=255,255,255
StandardFont=Sans Serif,11,-1,5,50,0,0,0,0,0
UnderlineLinks=false
# Alternative desktop text shadow
# ShadowParameters=1,1,32.0,139.0,2,4,1

[menus]
DetailedMenuEntries=false

[ScreenSaver][$i]
Enabled=true
Lock=false
Priority=19
Saver=KBlankscreen.desktop
Timeout=300

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I'm trying to get a computer lab set up that is dual booting.

I'd like the machines to remember which OS they last booted into, and reboot into that OS.

I have this working on my laptop in Ubuntu, but the Computer lab is openSUSE 10.2

Here's the grub menu.lst:
code:
# Modified by YaST2. Last modification on Fri Sep 21 12:58:58 PDT 2007
default saved
timeout 8
gfxmenu (hd0,0)/message
##YaST - activate

title openSUSE 10.2 - 2.6.18.8-0.5
    root (hd0,0)
    kernel /vmlinuz-2.6.18.8-0.5-default root=/dev/sda5 vga=0x31a resume=/dev/sd           a7 splash=silent showopts
    initrd /initrd-2.6.18.8-0.5-default
    savedefault

title Failsafe -- openSUSE 10.2 - 2.6.18.8-0.5
    root (hd0,0)
    kernel /vmlinuz-2.6.18.8-0.5-default root=/dev/sda5 vga=normal showopts ide=           nodma apm=off acpi=off noresume edd=off
    initrd /initrd-2.6.18.8-0.5-default
    savedefault

###Don't change this comment - YaST2 identifier: Original name: windows###
title Windows
    rootnoverify (hd0,0)
    savedefault
    chainloader (hd0,1)+1
Now we just edited that file by hand, I've tried poking around in Yast and I can't figure out the setting anywhere in that GUI. Any Ideas?

Edit: Linux Always boots.

Harokey fucked around with this message at 20:35 on Oct 15, 2007

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

deimos posted:

did you grub-install?

What does grub-install do? Doesn't grub just read off of the menu.lst each time it starts up?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
rm -rf php-5.2.4
rm: Unable to remove directory php-5.2.4/ext/standard/tests: File exists
rm: Unable to remove directory php-5.2.4/ext/standard: File exists
rm: Unable to remove directory php-5.2.4/ext: File exists
rm: Unable to remove directory php-5.2.4: File exists


What the hell does this mean? I'm root.

Those folders all show up as empty when I use ls -l also I can't move the php-5.2.4 file either.

What gives? This is in Solaris 9 on a sparc machine by the way.

EDIT: It means umount the volume and fsck it because its screwed up, problem solved.

Harokey fucked around with this message at 20:58 on Nov 5, 2007

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I want to copy everything in a folder (which is actually the old hard drive's / partition.) into another folder (which is the new hard drive's / partition)

I was trying

cp -r --preserve /mnt/old /mnt/new

But this creates an "old" folder in /mnt/new.

What should I do?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

admiraldennis posted:

Add a trailing slash.
code:
cp -Rp /mnt/old/ /mnt/new/

Thats what I had thought before too but that creates an "old" folder in there as well.

Keep in mind that /mnt/old and /mnt/new are existing folders.

Edit: *sigh* I knew I would do this. I just did an rm -rf /mnt/old Now I have to figure out how to undo that... If I even can.

Edit2: Looks Like It Can't Be done... Oh well, I'll just rebuild the system then.

Harokey fucked around with this message at 21:03 on Nov 7, 2007

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

admiraldennis posted:

:confused::confused::confused:

Lol Exactly,

I was trying to remove the "new" old file that was created in /mnt/new but i did rm -rf old in the wrong terminal window and killed the real "old" folder. So now I have to re-build anything.

I saw a thread where some guys would wear a sombrero or something whenever someone did something stupid. I should start this policy at my work and take first shift wearing it :(

Most of the stuff was backed up, and I mostly just wanted to use what was on there as a reference, oh well I'll just have to set it all up from scratch, not a big deal.

EDIT: But back to the point:

code:
cp -Rp ~/test/old/* ~/test/new/
Won't work because it won't copy over any dot("hidden") files.

Harokey fucked around with this message at 06:03 on Nov 8, 2007

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
Does anyone know of a good location for creating RPMs?

What I am interested in is packaging proprietary software into an RPM format for easy automated install. Before I had just tared up the directory, and this worked fine, but I was interested in doing this the right way. Most of what I have seen for building RPMs is building it from source.

I'm used to solaris's packaging system where you give it a list of files to put into the package.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
My computer locked up and I had to switch of the power supply. I knew something bad was going to happen, but I had no other way to access it.

When it came back up it rebuilt the journal (ext3) on my external drive and on my raid array. The raid array appears to be okay, but the external drive doesn't have anything on it anymore, but the space shows up as used with df.

I tried to run fsck on the drive, but it runs out of memory and stops. Apparantly it tries to load all the inodes into memory or something. I thought, okay, and hooked up a spare external drive, and set it to be swap. I now had 80 gigs of swap space, it can't run out of memory.

Well, when i ran it again it did run out of memory. So I did some googling and it looks like there's a limit to how much memory one process can allocate on an i386 system, and fsck is reaching that.

My plan is to bring the drive into work where I have linux machines with x86_64 os. This should work right? Is there an easier way for me to repair this drive?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Ericcorp posted:

I don't mean prompts with in asterisk, but just command line prompts. For example:

apt-get install -y gcc

returns

Please insert the Ubuntu CD Version Flippity Flop 6.08
Press [enter] to continue...

Well, I don't have the Flippity Flop disk. But, it did infact download the package, but that's beside the point. It's waiting for me to push enter, but I don't have the disk. When I press enter, it just keeps asking over and over. I just need a way to quit the prompt and get back to a root shell or whatever the basic command prompt is.

Ctrl+C will usually terminate the process (unless it catches it, but this usually isn't the case.)

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
So I'm about 3 days into a fsck on a 500 gig drive with an ext3 filesystem. Is this normal? Should I be using a different file system maybe? Whats the best filesystem for an external drive?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
Here's all that was in dmesg:

code:
sd 8:0:0:0: Attached scsi disk sdb
sd 8:0:0:0: Attached scsi generic sg2 type 0
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
EXT3 FS on sdb1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Also this disc is brand new so it shouldn't be bad... right?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I've set up a bunch of lab machines. Right now we don't have any logins, so the machines are basically open to anyone with a username/password "user" "user".

One of the students is complaining that using these computers its "trivial" to take down the campus email server, because all of these systems are running email servers ( as is the norm with linux ) My question is: Is there any problem to just disabling postfix? I.e. removing it from the startup programs. I know that there's a lot of stuff that uses email which makes me hesitant of just disabling postfix. Any thoughts?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

teapot posted:

Yes, but then no one will be able to read reports sent to local root, what usually is the reason why MTA is installed in the first place.

Why not? Doesn't this software allow mail sent to local accounts. I like this idea because it won't break anything internal. There's no reason why email should be going out of the machine anyway.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

teapot posted:

No sane admin will log in locally to every machine in the student lab just to read email -- at best he will make ssh/rsync/... push updates and configuration changes and never bother touching those boxes, and never manually log in to anything but a few of them choosen for testing/staging.

True but I don't read the root emails on these machines anyway. We re-install the OS at least every quarter.


Edit: Is there any reason to care about independent lab machines that don't really matter all that much? I understand watching servers...

Harokey fucked around with this message at 06:59 on Dec 12, 2007

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I've never used postfix, but is there some sort of configuration I can hit that will only send emails to itself?

Edit: A student told me that its possible that someone might get pissed at a professor and write a script to send tons of email to that professor through the lab.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

The Remote Viewer posted:

Is there an easy way to do a JBOD type setup in software? I know Linux natively puts all hard drives into one big filesystem, but not the way I want it. If I take an empty drive and partition it with a mountpoint of '/' will that make extra space available to whatever needs it? I want all my hard drives to be one big seamless blob of diskspace.

You want to look into using LVM.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
Whats the best USB wireless card for compatibility and reliability in linux?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Olzi posted:

I've been looking into installing linux to an external usb drive, with XP already installed on the internal drive. When the external drive isn't connected I want to keep the linux installation completely stealth, without any bootmanagers. My BIOS recognizes the usb drive, so here's what I'm thinking:

1. Install the linux distribution on the external drive.
2. Install either LILO or GRUB on the MBR of the external drive.
3. Set my bios booting order as CDROM - USB DRIVE - INTERNAL DRIVE.

When the usb drive isn't connected, bios doesn't find a bootable OS from the first two choices, so it loads up XP. When it is connected, the bootmanager is loaded from the usb drive and I can choose between the two systems.

Does this make sense ?

This should work just fine. Be careful when installing Linux though, sometimes (I'm thinking the Ubuntu Live Installer, and several others) will install grub to the MBR of hd0 (your internal drive) without asking you for clarification. If Ubuntu is the way to go, make sure you use the alternative installer. (I think you can install grub other places with it.)

Edit:
At my work we pretty much have a setup like this where we use a thumbdrive to start a re-installation process, and we used to have the machines boot to USB first, so we just stuck the USB drive in and re-booted.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I have an Nvidia Card that is hooked up to a TV. Right now I have the TV hooked up as a second monitor with twinview. However, I would prefer it to just display any video on the monitor, and not be able to put anything else on it. (Right now I can drag windows over to the TV, which I don't really want to do.) To watch videos I use VLC that creates a second video in a window, which i just maximize on the TV monitor.

Is there any way to just have the video mirror onto my TV without having the TV set up as a second monitor that takes up desktop space? This is the way my Laptop works in Windows.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

do it posted:

For some reason, when I ssh into my server, I can't use backspace in apps like nano, pico, or even vim. Backspace does work at the command line though. Any ideas?

Look through this:

http://ubuntuforums.org/archive/index.php/t-244168.html

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Harokey posted:

I have an Nvidia Card that is hooked up to a TV. Right now I have the TV hooked up as a second monitor with twinview. However, I would prefer it to just display any video on the monitor, and not be able to put anything else on it. (Right now I can drag windows over to the TV, which I don't really want to do.) To watch videos I use VLC that creates a second video in a window, which i just maximize on the TV monitor.

Is there any way to just have the video mirror onto my TV without having the TV set up as a second monitor that takes up desktop space? This is the way my Laptop works in Windows.

anyone have any ideas here?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

TheHeadSage posted:

Ok, I've got the most retarded UPS alive, and no money to replace it. So I've now got to create the most convoluted shutdown system.

Pretty much, I run a Linux server with VMware Server on it, and it can't talk to my UPS. But not through lack of trying. However, the Win2k3 guest OS can talk to it. So I've got the UPS software installed and it's all working.

I know how to issue commands to a remote server via ssh (Putty and it's ilk) however, for the sake of security, I don't want to use my root account.

So, I created a new account "remshut" and configured ssh so it can log in remotely using a key.

How do I setup sudo so that the user "remshut" can run the command shutdown -h now without it asking for a password? Putting "remshut ALL= NOPASSWD: /sbin/shutdown -h now" into /etc/sudoers does sweet gently caress and all.

Maybe the version on sudo in your linux is different, but When i did something like this I had to have the hostname of the server in that line as well. (Of course this was sudo on a Sun system.) Take a look at the man pages.... But I'd guess the syntax of that line is just wrong.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Hughmoris posted:

Ok, I installed Ubuntu a few days ago and am trying to find my way around some basic terminal commands. I'm making some progress, but I'm stuck on something that is almost too embarrassing to ask... How in the hell do you handle spaces in folders and file names?

Ex. I have a music folder, with a Jack Johnson folder inside that, and several albums inside that. I've tried cd /music/Jack Johnson and it won't recognize the command. I've tried seemingly ever combination of odd characters to fill the space and can't figure it out.

What simple step am I missing?

you can also do

cd "/music/Jack Johnson"

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I have an external 500 gig drive that I have connected to a fedora 7 box. This is only used on this box, so I don't need to share it with windows or anything?

What's the best file system for this set up? I had been using ext3, but It has gotten corrupted so many times now if the power goes out or something like that. Would XFS be better?

Also how should I mount it? I had just entered in the fstab, is there some better way ?

Thanks.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Alowishus posted:

Is power failure on the drive or system common? No filesystem is going to react well to hard power-off. XFS and ext3 (by default) only journal metadata - changes to filesystem structure - not user data. If the power goes out in the middle of a file write, you will wind up with a corrupt file, even though its location on disk won't be in question. :)

How do you mean corrupted? Just that it had to go through a lengthy re-check upon boot? Or did you have actual data loss? If you're only talking about occasional power failures and your complaint with ext3 was that it took too long to do a full re-check for consistency, then yes XFS is an excellent alternative. It's no less likely to get corrupt, but it will fix itself up more quickly.

If you are expecting regular power failures, then actually your best choice *is* ext3, but with the optional full data journaling turned on. This will slow your write performance somewhat, but it will cause every bit of data that gets written to the disk to be journaled, and thus make it recoverable (or reversible) without risk of corrupt files or long re-check times. As far as I know, ext3 is the only filesystem for Linux that can do full data journaling.

That's generally the right way to do it. If you don't necessarily want it mounted all the time, you might want to consider putting it under the care of autofs, which will automount it when you need and then dismount it when it's not in use. This may also help alleviate some of the problems discussed above.

Well I have a speaker that when it falls onto my computer my computer locks up. I'm not really sure why it happens but its happened a couple times. Power failures aren't a regular thing no, but I've lost data on the external drive several times now. (The first time the drive turned out to be bad, and this is what the RMA returned.)

Once I got this drive I formatted it and it was going strong, but recently I saw that all my data was not showing up on the filesystem. So I unmounted the drive and ran a fsck on it. When it finished and I tried to mount it I got this:

code:
[john@johnix ~]$ sudo mount /dev/sde1
Password:
mount: wrong fs type, bad option, bad superblock on /dev/sde1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
This is the same thing that has happened before. I've never had this problem on anything but these external USB drives.


Edit: I'm running a test on the drive on my windows machine now to test to see if this drive isn't dead too.

Harokey fucked around with this message at 06:09 on Apr 16, 2008

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

chryst posted:

Really, is this a mystery to you? The problem isn't your filesystem, the problem is that a speaker keeps falling on your computer.

Seriously, a falling speaker is going to jar the disk heads, and that's not good, ever. Your computer is locking up when it happens because it realizes that something got seriously hosed up. Maybe some piece of hardware was jarred loose. It locks itself to protect from writing anything in hosed-up-state. Anything that's in the middle of writing is going to get corrupted.

fsck isn't a magic fix-all tool. In fact, I've had it take a usable-but-inconsistent disk, and orphan every file to lost+found because it didn't know what the gently caress. It's meant to fix typical filesystem crap that happens in normal use. Corruption during a power failure (or speaker falling) can easily be more than fsck can handle.

I meant I'm not sure why the speaker falls onto the computer. I just find it strange that the filesystem on my external drive has failed several times now when the filesystem on the internal drives have been just fine, and they have gone through the same things.

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
I had moved my hard drive over to a radically different hardware setup, and everything worked without any problem. It would be worth a try to just dd the drive over to the new one and see if it just works.

Edit: Of course when I just moved the drive over it was my personal computer not a server that a company depended on :)

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!
So should I wait to upgrade to Fedora 9 since I use an nvidia card with dual monitors using twinview?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Harokey posted:

So should I wait to upgrade to Fedora 9 since I use an nvidia card with dual monitors using twinview?

Anybody have any opinion on this?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Obsolete posted:

I've converted my old desktop PC into an Ubuntu file server that I've thrown in my closet, and I was wondering if there was an easier/better way to administer the files.

Right now, I've got a 20gb home partition, and then two 400gb drives that I'm using to store media on. Every time I want to copy or moves files to or from these drives, I need to use sudo, because I'm not the owner (root is) of the drive. I've since chown'd both drives to be me, and used chmod to make all files 777. However, every time a new file gets added to the drive(s), it makes the owner root. I don't want to have to sudo every single time I want to copy/move/delete something, and I don't exactly feel especially comfortable with having everything chmodded to 777. Is there an easier way to maintain this system?

What are you using to copy the files over to the drive?

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Obsolete posted:

Even when I download files with wget (without using sudo) when I'm logged in via SSH, the file defaults to being owned by root. I've gotten pretty used to the situation by now, as bizarre as it is, and I nearly always use a sudo command, but that just doesn't sound like that's the way it should be working. If it matters, my home partition, and the two mounted 400gb drives are all formatted as ext3, so there's no weird NTFS gibberish going on.

I've never used sudo with a dash before. I don't think I've ever even seen that before? I don't use "su," I always use "sudo." Any ideas? Thanks!

So you're not copying files over the network from another machine? I assumed you were because you said you were using it as a file server. I just want to make sure this is not the case, and you're just using this machine standalone.


Edit:
It may be useful to see the contents of /etc/fstab.

Adbot
ADBOT LOVES YOU

Harokey
Jun 12, 2003

Memory is RAM! Oh dear!

Obsolete posted:

I do both. Files download (via rTorrent or some such) to one of the drives, then I copy those to the other drive into specific folders. However, even when using the machine standalone, and logged in as me, and downloading to my home directory, or copying something from my home directory to someplace else, I always have to either use sudo or chown the file to move the file to a drive outside my home directory, despite the drives all being chown'd, chgrp'd, and chmod'd to me.

Wait, the drive or the drive's mount point? ie /dev/sdb1 or /media/sdb1

It sounds like you chowned /dev/sdb1 ?

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