...making Linux just a little more fun!
While it might be overkill for your situation, this is a perfect place to use cfengine ( http://www.cfengine.org ).
Perhaps I should write up an article for Linux Gazette?
[Thomas] You're more than welcome to do so. Author submission guidelines can be found in the FAQ, found here:
I run Samba 2.2.3a on RH Linux 7.3 as the Domain Controller. I have all my Windows clients connecting fine to it but have trouble with Mac clients, no idea how to log them on. I also attempted to have the Mac client connect to the Linux POP3 and SMTP server (Sendmail) to no avail probably because the Mac is not welcome on the network. I am connecting the Mac using wired ethernet to a Network switch.
[Thomas] You need to ensure that you're using the 'appletalk' protocol. This has to be enabled in the kernel. There are also userspace programs that are needed for this.
might be of interest.
Hope That Helps
[Breen] You don't use AppleTalk to connect to a POP or SMTP server. That's pure TCP/IP.
If we're talking about a Mac OS X client, that comes with Windows filesharing built in. Classic Mac OS is of course a different problem.
Actually, MacOS X knows how to speak Samba/mswin sharing now too; their client side tool is called DAVE, and it used to be third party software for MacOS 9. If you want to install Mac style sharing on your Linux box, the app you're looking for is called netatalk. I used it years ago and it was a breeze to setup - had 'em working faster than their mswin cousins in the same office. -- Heather
[Breen] If you're using OS X you can call up a connect dialog with Cmd-K and enter the address smb://<ip_of_server>. You'll need an IP address, of course -- check your network preferences pane to make sure.
Beyond that, you're probably looking at a Mac client issue. You might try asking for help at a Mac specific site. (I recommend http://forums.macosxhints.com, if you're using X.)
I installed RedHat Linux 9 via the cd-rw, successfully, but the cdrom was not seen. I know the cdrom is still connected internally as I haven't interfered with the system's insides (which came with a a cdrom and cd-rw) internally. The cd-rw is understood to be the cdrom and there is now NO /mnt/cdrom1 but there IS a /mnt/cdrom.
The cdrom door does not open, yet the light of the cdrom is on.
[Thomas] "The lights are on but there's no one home". /mnt/cdrom is the mount-point location of your cdrom drive. It is arbitrary and you can use anything you like. These are defined (or should be) in /etc/fstab.
If you look in that file, you should have a line similar to:
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0
Here, /dev/cdrom is in turn a symlink that points to my main cdrom device: /dev/hdd. This then gets mounted to /cdrom, when I issue the command:
I suspect your troubles come from you missing an entry in /etc/fstab. If you wanted to mount the second drive as /mnt/cdrom1, then look at the existing line in the /etc/fstab file, and modify it to reflect the new drive.
The device name (/dev/xxx) can be got from viewing:
dmesg | less
Possibly there's not a sysadmin around who hasn't needed to do a host lookup now and then, to make sure they know what addresses are really being found when a DNS lookup is made.
nslookup is deprecated, host can be confusing, dig is the nice tool for the job - regardless of attempts to claim it is old too, it will be around a long time. But who really wants to get a long listing full of semicolon comments and things?
; <<>> DiG 9.2.3rc4 <<>> linuxgazette.net ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 605 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;linuxgazette.net. IN A ;; ANSWER SECTION: linuxgazette.net. 86400 IN A 22.214.171.124 ;; AUTHORITY SECTION: linuxgazette.net. 86400 IN NS ns1.linuxmafia.com. linuxgazette.net. 86400 IN NS ns1.genetikayos.com. ;; ADDITIONAL SECTION: ns1.linuxmafia.com. 61864 IN A 126.96.36.199 ns1.genetikayos.com. 61864 IN A 188.8.131.52 ;; Query time: 153 msec ;; SERVER: 184.108.40.206#53(220.127.116.11) ;; WHEN: Wed Mar 31 01:39:18 2004 ;; MSG SIZE rcvd: 144
Unless I'm tracking the path of authority rather than just checking the address, I don't care either.
(jimd@phobos) ~$ dig +short a linuxgazette.net 18.104.22.168
Short, sweet, and to the point. Replace "a" with "mx" or "ns" as you please, but this is a lot handier for scripting; I don't have to invoke my talent for awk and grep one-liners on DNS checks anymore.
I had an annoying little problem: My home network has grown to 3 PC's -- one directly on the phone line, the others connected via WLAN. Usually I would pick one dial-up provider and stick with that. Unfortunately the German ISP's are a big mess of call-by call providers with constantly changing tarifs.
The directly connected box is only the dial-in and firewall/NAT Router, the other two are my Laptop and desktop.
The annoying problem: Everytime I change the provider I had to change the resolv.conf on all systems according to the new nameservers as transmitted via [i]ppp protocol.
It serves as a proxy/cache for DNS lookups. It uses regular sys-calls for namelookups and reacts instantly (no kill -HUP or similar) to new entries in /etc/resolv.conf. This is on the router of course and everytime pppd changes the resolv.conf for the new provider it simply uses the new values.
The other two machines have the router as the nameserver and always get the correct information (even offline, so a connection is of course not possible). No manual changing anymore.
Sometimes, despite our best eforts with "unzip -L", we end up with a bunch of files the names of which are ALL IN CAPS. The easy way to deal with these is with a simple utility that I call "lc". (Also, should you ever need such a thing, creating a complementary "uc" would be an obvious modification.)
#!/usr/bin/perl -w # Created by Ben Okopnik on Fri Jul 25 09:13:22 EDT 2003 die "Usage: ", $0 =~ /([^\/]+)$/, " <FILE[S]_TO_LOWERCASE>\n" unless @ARGV; rename $_, lc for @ARGV
Note that you can specify multiple files or even shell wildcards at the command line; it's perfectly happy to chew on whatever you supply.
I've found a useful side effect of running smartd on my drives at home which I've used for a while now to monitor the temperature in my apartment. A lot of newer IDE drives, especially IBM/Hitachi's and SCSI hard disks monitor the drive temperature. I've found this to be a useful way to figure out how hot it is in my computer room at home :D
Assuming you've already installed smartmontools, this was tested with version 5.26:
# smartctl -a /dev/hda | grep 194 194 Temperature_Celsius 0x0002 161 161 000 Old_age Always - 34 (Lifetime Min/Max 20/37)
As you can see the drive is a toasty 34 degrees celsius. Of about 5-7 degrees above ambient, it's about 27-29C or 80-85F in that room right now. Not great for the equipment but survivable. Anyway, not terribly useful, but interesting nonetheless :D
There are times when the mail just won't go through, for any of a host of reasons. Your ISP's server may be down, your own mail programs don't work, whatever - and of course, this happens at the most critical times, "when it absolutely, positively has to be there." Well, assuming that your recipient's mail server is working, you can bypass most of the chain - at least your end of it. This can also be a good testing tool. It lacks a few refinements (e.g., there's no subject and the address you supply is actually used as the normally hidden "From" header rather than the friendlier and visible "From:"), but it will at least get the content across.
ben@Fenrir:~/Docs$ telnet badabing.com 25 Trying badabing.com... Connected to badabing.com. Escape character is '^]'. 220 badabing.com ESMTP Postfix (Debian/GNU) HELO myserver.net 250 badabing.com MAIL FROM: email@example.com 250 Ok RCPT TO: firstname.lastname@example.org 250 Ok DATA 354 End data with <CR><LF>.<CR><LF> Hi, Joe - it's me! . 250 Ok: queued as D1F8F160B4 QUIT
To recap - I connected to port 25 (SMTP) at badabing.com, identified my server via HELO ("hello"), to which the server responded with its own name. I then told it who the MAIL was FROM: and who the recipient (RCPT) is supposed to be, and asked it to stand by for the actual DATA, which it told me to end with a return, a period, and a return. When I was done, I typed "QUIT" to exit.
This is not for everyday use, but can be a very handy tool for those times when you've just got to get your mail across despite problems.
In my consulting I find myself running into an awful lot of systems booting off of 'vmlinuz' in the root directory. What kernel is that? How the heck would I know?
I'll tell you how I ask it :D
[root@somebox] /# strings vmlinuz | grep 200 2.6.0-test7-1-386 (herbert@gondolin) #1 Sun Oct 12 10:29:56 EST 2003
Why does this work? Because now that we're a few years into the century, nearly all the kernels contain something with a year 2000 or later, and we'll have 200n year numbers for a while yet. On an older system, try 199 - Linux isn't old enough to have kernels from 1980 unless someone is playing serious games with their clock. You could probably look for the @ sign, but chances are too good of finding one alone somewhere in the binary portion of the code.