Re: Sed Help.....
Rod, Take a look at what the shell replacement is actually doing. If you were to write the line manually it would look like this: sed -e 's/\/usr\X11R6\/bin\/xdm/\/usr\/local\/bin\/kdm/g' ... Right? But the shell doesn't escape the path separators (slashes). You need to escape them yourself in the variable assignments. Like this, KDMLINE='\/usr\/local\/bin\/kdm' c And if there is only one occurrence per line, then you don't need the 'g' modifier. Hope that helps. Alex On Nov 10, 2004, at 9:43 AM, Rod Person wrote: I trying to write a script that will make it easier for a friend that I finally talked into trying Freebsd setup a desktop. This part of the script is suppose to change the line in the ttys file to allow kdm to start on boot. Here is the relavent code: KDMLINE=/usr/local/bin/kdm -nodaemon REPLACELINE=/usr/X11R6/bin/xdm -nodaemon sed -e s/$REPLACELINE/$KDMLINE/g /etc/test/ttys /etc/test/new Here is the error I'm getting: sed: 1: s//usr/X11R6/bin/xdm -n ...: bad flag in substitute command: 'X' I can't seem to figure this out and the only things I've found in searching is that sed had a problem with replacing strings over 4096 bytes, but I don't think this is the cause and all those post were years old. This is on FreeBSD 5.3. Rod ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
dns-more than I ever wanted to know...
I've come across a ton of DNS tutorials on the web. Everything I've found so far is very lengthy. I need to setup a simple small office/home office network with DNS so that it resolves my inside network among the machines and hides it from the greater internet. I'm open to suggestions of a quick fix that won't take me a day and half reading full time. Thanks, Alex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: dns-more than I ever wanted to know...
Steve, Thanks a bunch! This is a great help. I'm not clear on the use of allow-transfer. Reading the manpage for named.conf(5), I'm tempted to leave it out. But, I'm not fully understanding the use of it. The manpage says, allow-transfer Specifies which hosts are allowed to receive zone transfers from the server. allow-transfer may also be specified in the zone statement, in which case it overrides the options allow-transfer statement. If not specified, the default is to allow transfers from all hosts. I'm taking which hosts are allowed to receive zone transfers from the server to mean hosts on my local network and the server is the DNS server I'm setting up now. I don't want my zone information going out to the internet (my isp), but I do want to let it in (of course). I failed to mention that the machine acting as DNS inside my network is/will be configured as a gateway. (QUESTION: I have vr0 and vr1. Does it matter which interface I face toward the internet?) Perhaps this doesn't matter as long as the DNS server is pointing to/resolving for the inside (local) network interface (10.0.0.1). Let me make this more clear. I have the following (typical?) small office setup: - ISP--- monopolists + | | | (vr1) --- DHCP'd from ISP -- FreeBSD 4.10 gateway -- (vr0) --- 10.0.0.1 | DNS,ipfw,natd,httpd | | {... local network ...} So, all this just to clarify allow-transfer. :) My questions go deeper than DNS. But, I'm trying to figure out the rest myself. Thanks, Alex On Sep 24, 2004, at 9:57 AM, Steve Bertrand wrote: snip ... and then add a record for a domain. zone domain.com { type master; file domain.com.zone; allow-transfer { 192.168.0.3; }; // This is your secondary DNS allow-update { none; }; }; snip - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: dns-more than I ever wanted to know...
Thanks to everyone who responded to this. I'm working on synthesizing everything. I'm one step closer now. Alex On Sep 24, 2004, at 9:14 AM, mailing lists at MacTutor wrote: I've come across a ton of DNS tutorials on the web. Everything I've found so far is very lengthy. I need to setup a simple small office/home office network with DNS so that it resolves my inside network among the machines and hides it from the greater internet. I'm open to suggestions of a quick fix that won't take me a day and half reading full time. Thanks, Alex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Ssh connection
Are you running a firewall? On Sep 19, 2004, at 8:28 AM, Pota Kalima wrote: I am having trouble connecting TO my base machine which runs release 5.2.1 from 2 other machines (Mac OS X, and Windoz). I can connect to the OS X machine FROM this base machine as well as from the windoz machine. When attempting connection from OS X I get the following message: Yes Master? ssh -v [EMAIL PROTECTED] OpenSSH_3.6.1p1+CAN-2004-0175, SSH protocols 1.5/2.0, OpenSSL 0x0090702f debug1: Reading configuration data /etc/ssh_config debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: Connecting to 192.168.0.5 [192.168.0.5] port 22. debug1: connect to address 192.168.0.5 port 22: Permission denied ssh: connect to host 192.168.0.5 port 22: Permission denied I have checked to see that sshd is running at start-up. When I ps -aux I see that /usr/bin/sshd is one of the processes running. The ssh_config file on both the base machine and Mac OS X appear identical to me. Grateful for any help. Pota ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: how to make an executable run as another user
Rich, Someone else had responded to your post explaining that setuid does not work with shell scripts. Nor does it work with any interpreted input. The following article might help explain this (and others): http://www.evolt.org/article/UNIX_File_Permissions_and_Setuid_Part_2/ 18/263/ QUOTE: In most UNIX kernels there exists what is called a 'race condition' when executing scripts. Scripts are pieces of code which are interpreted by, strangely enough, interpreters. Common examples of interpreters are perl, sed, and awk. So when you have in your perl code #!/usr/local/bin/perl it tells the operating system to start executing the perl interpreter with the current script as input. Between the time that the perl interpreter starts executing and the time that it reads in your script the 'race condition' exists. At this time, a mischievous person could 'win the race' and be able to replace your script with another. And if your script is running as setuid, that person's script would run as your user! So their script could do anything that you could do from the command line. As a result, most UNIX kernels will disable users from running scripts as setuid. The most common way around this is to create a wrapper program around your script. A wrapper, in this context, is a small program, possibly written in C, that when executed will simply run your script. The 'race condition' does not exist for real executables and so you won't be thwarted by the kernel itself. I'm not exceptionally well versed in this stuff. But I think this is what you're after. Alex On Sep 17, 2004, at 3:50 PM, Richard Bradley wrote: Um. I feel silly asking this. But I can't work it out. I want a shell script to run as another user. I always thought this was easy to do with the setuid bit, but never tried it before. I read man chmod and found this: . 4000(the setuid bit). Executable files with this bit set will run with effective uid set to the uid of the file owner. . s The set-user-ID-on-execution and set-group-ID-on-execution bits. And off I went. I wrote a shell script to output the current uid. I chown'ed it to another user. I chmod +sed it. I ran it. It didn't work. - rtb27# cat test #! /bin/sh whoami rtb27# ll test -rwsr-sr-x 1 rich wheel 20 Sep 17 19:34 test rtb27# ./test root Um. Help? Rich ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Apache Installation
This is valid advice. However, since you say your are new to FreeBSD (and, perhaps, *nix?), I would break the process down like this. Use a terminal (xterm) to do run these commands. Otherwise, excuse the simplicity. I'll assume you're using sudo for root privilege. 1. It's easiest to use the ports tree (/usr/ports). Apache is in the www directory under /usr/ports. So, go there. cd /usr/ports/www There are a few versions you could install when it comes to Apache. You can see them with ls -d apache* 'apache13' is the most straight forward to start with. So, go into this directory, cd apache13 2. Fetch, extract, and compile. Check the Makefile for things you can modify to your needs. more Makefile Look for defined(...) or !defined(...). For example, .if (!defined(WITHOUT_APACHE_EXPAT)... In the case of Apache 1.3.x you can specify -DWITHOUT_APACHE_EXPAT. If you're unsure about this, then forget about it. Just compile and install. Or extract, sudo make extract which will usually tell you what you can modify on the command line. Otherwise, sudo make You can do the make and install in one line. sudo make install If your were to exclude expat support, then you would use this sudo make -DWITHOUT_APACHE_EXPAT sudo make install or sudo make -DWITHOUT_APACHE_EXPAT install You can remove the installation and start over by running sudo make deinstall and sudo rm -rf ./work where ./ assumes you are already in /usr/ports/www/apache13/. This gets rid of the work directory that 'make extract' created. You don't have to do it like this all the time. But once you're familiar with the basic process, you will discover your own refined process. Good luck, Alex On Sep 17, 2004, at 3:09 PM, Hugo Silva wrote: Hey, It's very simple! Assuming you have an updated ports tree, just do this as root: cd /usr/ports/www/apache13 make install clean Hey I am a novice at FreeBSD! I want to install apache v 1.3.28 in my FreeBSD 5.21. Can u guys help me? How to proceed? -macuser ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- www.6s-gaming.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: what are the pros and cons of running in single user?
jan, I agree with what you say about tuning the startup scripts. In my relatively limited experience as a system admin., I think this is the 'better' thing to do. Perhaps you would agree. My next step is to understand the kernel security levels and what each one entails. But, that I can, hopefully, look up. thanks, alex On Sep 16, 2004, at 9:56 AM, Jan Grant wrote: On Thu, 16 Sep 2004, Ed Budd wrote: mailing lists at MacTutor wrote: I have a machine running 4.10-STABLE that will be a dedicated gateway with a router/firewall combo and web server plus mysql server (maybe). What would be the pros and cons of running this system single user? Processes that run under their own uid, would they be able to run? Just curious. Any extra thoughts welcome. er...doesn't single user mode mean no networking? My understanding is that this is really only for maintenance (ie. make installworld, etc.), not regular operations. Perhaps you meant something else or I just haven't had enough caffeine yet... snip So to answer the question: you can certainly tune the scripts and services available that launch you into multi-user mode to get a minimum profile on the machine. However if you modify rc to the extent that it turns on everything you need in order to set up bridging, run a few daemons etc then you're effectively duplicating the multiuser startup anyway. jan * modulo securelevel changes which can only be reverted via reboot. -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ The Java disclaimer: values of 'anywhere' may vary between regions. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: what are the pros and cons of running in single user?
Now might be a good time for me to point out that I'm learning some subtle and useful things about system startup that is helping me think about how I might customize system start up if I go that route. Thanks to everyone who's responding. alex On Sep 16, 2004, at 1:31 PM, Sergey Zaharchenko wrote: On Thu, Sep 16, 2004 at 06:01:13PM +0300, Giorgos Keramidas probably wrote: On 2004-09-16 09:11, Ed Budd [EMAIL PROTECTED] wrote: er...doesn't single user mode mean no networking? My understanding is that this is really only for maintenance (ie. make installworld, etc.), Well, you can always bring up the network interfaces manually ;-) Actually, that's what /etc/netstart is for. -- DoubleF Carmel, New York, has an ordinance forbidding men to wear coats and trousers that don't match. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: AudioCD not playing
Q: Are you compiling for the correct processor in your kernel configuration? For example, if you have a i586 you don't want to compile for an i686. abs On Sep 15, 2004, at 7:14 AM, Konstantin wrote: Hello! When I try to play AudioCD with cdplay 0.92 I receive the following message: #cdplay -d /dev/acd0 /* cdplay interface */ acd0: unknow transfer phase acd0: FAILURE - ATAPI_IDENTIFY no interrupt acd0: timeout sending command = a1 Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x6a fault code = supervisor read, page not present instruction pointer = 0x8: 0xc04c5596 stack pointer = 0x10: 0xcdcbb50 frame pointer = 0x10: 0xcdcbb50 code segment= base 0x0, limit 0xf type = DPL 0, pres 1, def 32 1 gran 1 0x1b processor eflags= interrupt enabled, resume, 10PL = 0 current process = 36 (swi7: task queue) trap number = 12 panic: page fault syncing disks .. etc After this computer rebooting. How can I undestend this? How can I listen AudioCD? [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
what are the pros and cons of running in single user?
I have a machine running 4.10-STABLE that will be a dedicated gateway with a router/firewall combo and web server plus mysql server (maybe). What would be the pros and cons of running this system single user? Processes that run under their own uid, would they be able to run? Just curious. Any extra thoughts welcome. Thanks, Alex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Burning OS X .dmg disk images...
Does anyone know of how to burn Mac OS X .dmg images under FBSD? I have .dmg files from an OSX system (10.3.x) that I want to convert to ISO images (if necessary) for burning to cd/dvd. I can't find anything in the list archives about this. Thanks, Alex - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Enabling Serial Console
Marc, Try putting either '-h' or '-D' in /boot.config. I found '-D' worked for me. Personally, I'm wondering if I can put together a serial multiplexer to USB device and write a C or Perl script that will tee the output to respective files that I can 'tail -f' on. For a more thorough treatment in a non-intuitive place checkout the Handbook: http://www.freebsd.org/doc/handbook/serialconsole-setup.html Alex On Sep 3, 2004, at 10:18 AM, Marc G. Fournier wrote: Wish to enable the serial console on my servers so that I can remotely view a reboot when it crashes ... I know to plug the serial cable into COM1 ... and I know I have to add something to /boot.config, but, if I want to set it so that even if the keyboard is plugged in, the serial console works, what do I need to add? I always thought -P, but reading the man page, I'm not so sure :( Also ... I'm going to cross-connect the servers for now ... ServerA/COM1-ServerB/COM2, ServerB/COM1-ServerC/COM2, etc ... what happens if all machines come up at once? I see nothing in the man page about 'detecting serial', so I'm assuming that the serial console will still work, even if there is nothing at the other end 'listening' yet? Thanks ... Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: parts of ports
Checkout /usr/ports/misc/porteasy It might be just what you're looking for. Alex On Sep 1, 2004, at 9:32 AM, messmate wrote: Hi, is there a way to install only parts of the ports tree to set them up ? The ports tree takes 237M up :( Have only 600M hd space available included swap. The purpose is to setup a firewall/router/proxy VERY secured :) Thanks in advance for your help. mess-mate ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Hardware Recommendations (UK)
I recently built a system using a VIA EPIA PD1 motherboard with a VIA C3 (1GHz) processor on it. I've successfully compiled the entire system (buildworld and buildkernel) for 4.10-STABLE and a number of ports. Everything appears to work fine. If you want to build your own kernel, be aware that /etc/make.conf must contain CPUTYPE=i586 while the kernel configuration file must/can contain cpuI686_CPU. This appears to be the only way of getting this to compile as a Pentium class cpu. The whole system cost me $514.10(US+tax) and consisted of 1. case (Morex 668S w/200W p.s.) 2. motherboard (VIA EPIA PD1) 3. 512MB memory module (PC2100/DDR266) 4. 80G Seagate Barracuda hard disk (ST380011A) I was pretty easy to put together and configure. So far, I'm very happy with it. I'll be setting it up as a firewall/router/webserver when I get around to it (firewalling is another issue I'm not prepared for). (At least I don't feel like I am.) I've heard these systems are popular in Europe for low price and low power consumption. You can check out the parts I got at http://www.logicsupply.com/ . HTH, Alex On Sep 1, 2004, at 11:24 AM, Graham Bentley wrote: Hi Can anyone recommend a good solid mobo for building a little web server ? Is it worth paying the extra for Intel manufactured ? Thanks ! Custom PC North West Open Source Solutions http://www.cpcnw.co.uk ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Alexander Sendzimir (owner)802 863 5502 MacTutor: Apple Mac OS X Consulting [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]