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
xdice
Feb 15, 2006

sund posted:

I'll start with something easy.

Anyone got a recommendation for a simple terminal emulator to interface with a serial port. I'm looking for something like HyperTerminal, except console based and not a piece of poo poo. I'm using Xfce's Terminal and don't want to install all of gnome or kde's dependencies. I sort of got it working with screen, but I feel like I'm missing some basic program that everyone's been using for 20 years.

So, you guys got anything for me?

minicom. Runs in an xterm, or on a console, and so on and so on. I've used it for console connections to routers and switches over serial for years, and seems to come by default with just about every distro I've looked at in the past couple years.

Adbot
ADBOT LOVES YOU

xdice
Feb 15, 2006

tripwire posted:

I posted this in the Ubuntu thread but it might get a better answer faster in this thread: I only seem to be able to connect to my Creative Zen mp3 player (it uses MTP only) when I am using amarok as root (i.e. sudo amarok). Everytime Amarok searches for the player without root privileges it fails and cannot find the device, although lsusb does in fact show the device as connected on the USB. Any idea how to make amarok detect it without sudo?

I had this exact same problem with my iPod and Amarok.

The solution that worked for me:

(as root)

mount -t vfat -o nosuid,nodev,uid=(your UID here),umask=077 /dev/whatever_disk_device_your_mp3_player_is /mnt/mp3player (or something else you'd rather have it be.).

The options set the owner of the mountpoint to you, once it's mounted, and you're the only user that can do anything with it (the umask=077 translates into a mountpoint with read,write and execute permissions only for you.). You can determine your UID with the 'id' command.

Edit: Looked at my setup, realized I'd done it a better way.

xdice fucked around with this message at 13:32 on Dec 31, 2007

xdice
Feb 15, 2006

hooah posted:


Here's the output of mount:

I didn't see any obvious mp3 candidates in your mount list.

Ok - If your mp3 player is plugged in, unplug it (it's not mounted, so it'll be safe.).

Now, pull up a terminal.

Type 'dmesg' - you'll get a long list of text, and that's cool - note the last line. We're going to type this command again in a moment, and it's good to know what the last line is, so anything added is clear.

Plug in your mp3 player.

Wait about 30 seconds or so, then type 'dmesg' again. At the end of it, you should see stuff that looks similar to this:

code:
usb 1-7: new high speed USB device using ehci_hcd and address 7
usb 1-7: configuration #1 chosen from 2 choices
scsi8 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 8:0:0:0: Direct-Access     Apple    iPod             1.62 PQ: 0 ANSI: 0
sd 8:0:0:0: [sdd] 39075372 2048-byte hardware sectors (80026 MB)
sd 8:0:0:0: [sdd] Write Protect is off
sd 8:0:0:0: [sdd] Mode Sense: 68 00 00 08
sd 8:0:0:0: [sdd] Assuming drive cache: write through
sd 8:0:0:0: [sdd] 39075372 2048-byte hardware sectors (80026 MB)
sd 8:0:0:0: [sdd] Write Protect is off
sd 8:0:0:0: [sdd] Mode Sense: 68 00 00 08
sd 8:0:0:0: [sdd] Assuming drive cache: write through
 sdd: sdd1 sdd2
sd 8:0:0:0: [sdd] Attached SCSI removable disk
sd 8:0:0:0: Attached scsi generic sg4 type 0
What's all that? That my Linux box detecting and mounting my iPod. See the [sdd] in brackets? That means that it is /dev/sdd. That's what you are looking for to see which disk device your mp3 player is being detected as.

The most important line is this one:
code:
sdd: sdd1 sdd2
That means there are two partitions. The music on my iPod lives on /dev/sdd2. Your mp3 player will look similar, but not exactly the same.

The mount type to use for your device will most certainly be 'vfat', which means the mount line in my original answer should still work, once you use the above to determine which device it is.

xdice
Feb 15, 2006

hooah posted:

Here's the only thing I could find that didn't look like networking information (even after I turned networking off?):

code:
[109442.254550] usb 5-7: new high speed USB device using ehci_hcd and address 13
[109442.388481] usb 5-7: configuration #1 chosen from 1 choice

Well, that's a pretty close match to the first two lines of what I posted when I did the example in my last post - what do you see next after that?

xdice
Feb 15, 2006

rugbert posted:

Why doesnt cron run my backup script?

First off, the backup script I got from another thread here wont run from cron.daily for some reason. Other scripts run but my backup one will not run, which is kind of important. Heres the crontab:


and the backup scrpt is in cron.daily


am I just missing something obvious?

edit - heres the script
tar cvpzf /backupmnt/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backupmnt --exclude=/mnt --exclude=/
media --exclude=/sys /

also - can I add anything to that script to add a time stamp to the file name?

code:
/bin/tar cvpzf /backupmnt/backup-`date +%F`.tgz --exclude=/proc --exclude=/lost+found 
--exclude=/backupmnt --exclude=/mnt --exclude=/media --exclude=/sys /
The `date +%F` makes your tarball have the date as part of the filename (that date command is enclosed in backticks, not single quotes, btw.). I added '/bin/tar' to it, rather than just 'tar' as I've run into problems with programs in cron not having a proper search path. You can fix it by declaring it in the script, or just always use full path for commands (both are equally correct, I'm in the habit of the latter.).

You might check /var/log/cron.log and see if there are any errors there related to that cron.daily entry. Personally, I'd put it into root's crontab, and be done with it:

code:
0 3 * * * root /bin/tar cvpzf /backupmnt/backup-`date +F%`.tgz --exclude=/proc --exclude=/lost+found 
--exclude=/backupmnt --exclude=/mnt --exclude=/media --exclude=/sys /
(That would run the command every day at 3am.)

Also - a full backup like you are doing with that command will take up a lot of disk space, depending upon how many you keep on-hand (just something to think about going forward.).

Edit1: Fix code line length to unbreak table.
Edit2: Fix date options in first code block.

xdice fucked around with this message at 01:06 on Jan 3, 2008

xdice
Feb 15, 2006

hooah posted:

That's right at the end.

I went back and read your initial post after that answer, as it wasn't what I expected...

..then I saw the MTP device note in your post, and realized why you weren't seeing the stuff in the logs that I thought you should - your device doesn't present itself to the system as a disk device.

I did some poking around, and found a page that talked about the setup with these devices under /etc/udev/libmtp.rules.

On that page, was a note, and a changed libmtp.rules file. If you go into /etc/udev/rules.d, you'll see a file named "libmtp.rules". This is what is used to setup the permissions for your device.

Your user should be in the 'audio' group. Do 'id', and check, first of all.

If not, then do

code:
sudo usermod -G audio -a your_username
If so (or if you just added your user to the audio group), do this: cp /etc/udev/rules.d/libmtp.rules /tmp
(making a backup copy before we make some changes).

Open /etc/udev/rules.d/libmtp.rules in your favorite editor, and you'll see a bunch of lines, with MODE="660", GROUP="audio" at the end.

Change the MODE="660" to MODE="666" on each line.

Save the file, then reboot (this will force your changes to be re-read, and udev will setup everything with our new permissions.

After your system is back, run Amarok as non-root, and see if you can access your Zen device. If it's still not working as non-root, there's another change we can make - but I'm a firm believer in making changes one-step-at-a-time.

xdice
Feb 15, 2006

hooah posted:

Alright, here's the new dmesg | tail output:

code:
[  538.924577] usb 5-7: USB disconnect, address 8
[  559.360045] usb 5-7: new high speed USB device using ehci_hcd and address 9
[  559.493937] usb 5-7: configuration #1 chosen from 1 choice

Because the device is accessed via libmtp, the dmesg output just tells us that it's connected, and that's all.

Try doing a 'mtp-detect' as your regular user, and post the output, if you could.

xdice
Feb 15, 2006

hooah posted:

Attempting to connect device(s)
Detect: No Devices have been found

Hmm, not what I expected to see.

Could you post the first couple lines from /etc/udev/rules.d/libmtp.rules that contain the MODE stuff I had you edit earlier, and the output of the 'id' command for your local user you're trying this as.

xdice
Feb 15, 2006

hooah posted:

Here's all of the lines that have "Creative" in them:

code:
# Creative Zen Vision
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="411f", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
# Creative Portable Media Center
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4123", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
# Creative Zen Xtra (MTP mode)
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4128", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
# Second generation Dell DJ
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="412f", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
# Creative Zen Micro (MTP mode)
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4130", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"
# Creative Zen Touch (MTP mode)
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="4131", SYMLINK+="libmtp-%k", MODE="666", GROUP="audio"

Well, you can try removing the GROUP="audio" from each of those lines, then rebooting, run Amarok as you, and then connect up your device and see if Amarok can detect it. Beyond that, I'm out of ideas for now.

xdice
Feb 15, 2006

Tap posted:

Well I've FINALLY decided to try out Ubuntu and I've got a slight problem. I'm currently running windows XP, and I've burned a copy of Ubuntu onto DVD. I load the DVD and it gets to the Ubuntu start screen. I choose the option "Start or install Ubuntu" and it sits with a progress bar for a while, then the progress bar eventually finishes and I get lines going up and down my screen. Is this a graphics driver problem?

Without any more details to go with, I'm going to guess yes - what kind of computer, what kind of graphics card are you using (you might also try looking around the ubuntu forums with that info, you may find a solution quicker over there.).

xdice
Feb 15, 2006

schzim posted:

herman@hptestserver:/usr/local$ file j2eesdk-1_4_03-linux.bin
j2eesdk-1_4_03-linux.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped


Which version of the linux kernel is running on that server? I'm guessing it's not 2.2.5?

I followed the link to the page you're working from, and noticed that it's a 5 year old writeup (the first page of the article is dated February 17, 2003), and the link they give to the jdk takes you to a Sun end-of-life page.

If I had to guess, I would say that the .bin file you're trying to run cannot find the libraries it was linked with (because your system has newer libraries), and will fail in the manner you've shown in a prior message.

If you need the 1.4.2 SDK, here's a link to Sun's download page: http://java.sun.com/j2se/1.4.2/download.html (click through their menus and such, you should get to a screen that has j2sdk-1_4_2_17-linux-i586.bin as an option, which is the one you want.).


Edit2: Tomcat is available on my ubuntu laptop (8.04 installed, and checked for Tomcat via Synaptic), so I'd bet you can simply 'sudo apt-get tomcat5.5 tomcat5.5-admin'

xdice fucked around with this message at 22:56 on Jun 6, 2008

xdice
Feb 15, 2006

schzim posted:

I'm not an experienced user of package managers will that get all the dependancies right? Install Java for me set a $JAVA_HOME etc?

If so :cool:

I've not installed it myself, so I can't say for certain. However, if I'm installing it from a package manager, I hope it would do all that ancillary junk as well as install the application.

Try it and see. Worst case, you have to uninstall it, which is also easy because you can use the package manager to do that too.

Edit: Yep, I fired up the laptop again and looked at the info in Synaptic. It does look like it installs the required dependencies as well.

xdice fucked around with this message at 03:40 on Jun 7, 2008

xdice
Feb 15, 2006

Xenomorph posted:


Something I'm fighting with now: changing Windows AD user passwords from Linux systems. On Ubuntu:

code:
$ passwd
Current Kerberos password: *****
Enter new Kerberos password: *****
Retype new Kerberos password: *****
Password change rejected
passwd: Authentication token manipulation error
passwd: password unchanged
code:
$ kpasswd
Password for [email]user@DOMAIN.EDU[/email]: *****
Enter new password: *****
Enter it again: *****
Password change rejected
Many users do not have a Windows desktop to log into to change their password, so Linux is the only network login access they have. I'd like to allow them to change their password on their own.

None of Ubuntu's or Windows' logs show any errors.

Is the connection to the LDAP server (AD in your case) encrypted or not? If not, password changes may not be allowed. You generally have to be going over LDAPS or LDAP+TLS for that to work.

xdice
Feb 15, 2006

Crush posted:

If I were to use a program like sar to see loads during a certain time, is there a way I could try to see what processes were causing the high load at that time? Sort of like top, but historical.

Check out dstat. It's handy for checking on things like this (I've used it for similar tasks at work.).

You can run this in a screen'd process on the server, and let it collect data until you see the issue again (depending on how quickly you update, the file you save to shouldn't grow too much.).

xdice
Feb 15, 2006

Crush posted:

I'm just trying to understand how to use the route object within the ip command :)

Edit: Just realized that I may have not been clear. The route seems to work just fine, but I am trying to make 192.168.1.48 a static IP for the box. I noticed that when using ip address add and then doing ip route show that it showed the IP for the box that I specified in the aforementioned ip address add command so I figured that I might be able to specify it in the route-eth0 file. DOing a bit more digging thanks to a previous reply, it looks like the answer may lie in the ifcfg-eth0 file. Looks like I will be playing with it some more :)

Paste in a copy of your ifcfg-eth0 file, should be a simple issue to identify. Generally, you'd specify "IPADDR=192.168.1.48" and "BOOTPROTO=static". I think this would work even with NetworkManager enabled (I don't know for sure, I have NM turned off on my RHEL 6 vm's.)

xdice fucked around with this message at 17:06 on Oct 13, 2012

xdice
Feb 15, 2006

Molten Boron posted:

I've got a RHEL 6 server with a broken RPM database. None of my attempts to rebuild the DB have worked, so I've been steeling myself for an OS reinstall. Can I get by with an in-place upgrade, or will nothing short of a full install fix the problem?

I'm assuming you've tried "rpm --rebuilddb" - can you paste in the error(s) you're seeing?

xdice
Feb 15, 2006

FISHMANPET posted:

I'm trying to puppetize something, and I just can't wrap my head around a "best practices" way to do this, and it's frustrating me and making me want to just configure it by hand because I can't figure out what the hell I'm "supposed" to do with it.

We have a Samba server. It has a samba config. Sometimes people request new samba shares, so we modify the smb.conf file to include the new share and restart the samba server. It's just one server doing this, and the config file changes sometimes. I have no idea where to begin to figure out what the best way to manage this through samba, or how of it I should even be putting into puppet. There seems to be so much documentation on how to make puppet do things, but very little on what you should be doing with puppet to not create an awful rat's nest.

I've been working on something related, and found that smb.conf has a couple handy options that might help you with this.

From the samba.org docs you might check out the 'include' and 'copy' directives - they've allowed me to make my shares (and the config) a bit easier to deal with.

xdice
Feb 15, 2006

Experto Crede posted:

How risky, in practice, is moving /home from a folder to its own partition on an already setup system? Is it worth the hassle or would it just be better to backup, start clean and restore the backup?

Not that risky, I've done this before using one of these two ways:

Reboot into single-user mode, then do the move. This makes sure nothing in /home is open.

Can't, or don't want to go to single-user mode? Login as root, make sure nothing in /home is open (lsof, fopen), then do the move.

Either way, it's pretty simple.

Edit: e;fb

xdice
Feb 15, 2006

Experto Crede posted:

Thanks guys, so realistically I can just boot from a live disk, shrink the root partition, make one for /home and move the users folders into there?

Yes.

Shrinking the root partition does introduce a little more risk, but nothing I'd worry too much about (especially if you have backups.).

Adbot
ADBOT LOVES YOU

xdice
Feb 15, 2006

RFC2324 posted:


It was a long time ago but I saw oomkiller kill pid 1 once, and that absolutely should not have been possible

Suddenly, I'm reminded of PSDoom.

https://www.cs.unm.edu/~dlchao/flake/doom/chi/chi.html

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