Re: Changing location with wlan card

2005-11-21 Thread Christian Jones
On 11/21/05, Simon Kuhnle [EMAIL PROTECTED] wrote:
 I thought of something like:
 first search available APs with ifconfig -M and set nwid and nwkey
 to AP configuration available.
 Or just exit after the first dhclient run succesfully quitted.

I have a fairly simple script that does this part first, setting nwid
and nwkey to a working value, then use that in my hostname.wi0:

! /usr/local/sbin/wiconfig \$if
dhcp NONE NONE NONE

for my dhclient laptops, or

! /usr/local/sbin/wiconfig \$if
inet whatever

for static addressing.  It seems to work fine, as long as the dhcp or
inet lines don't contain nwkey or nwid.  There's no reason you can't
hardcode it into your external script, but I've got an
/etc/wiconfig.conf that keeps various networks and WEP keys;  the
script goes through them in order until it finds a working one, or
sets them back to 'any' and '';  it's worked on the few (relatively
simple) networks I've gone to.

Note that this has nothing to do with roaming from one network to the
other, just adds less work on boot.  There may be easier/more elegant
ways of doing this, but it works for me.

CDJ
--
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: Disable/Passprotect single user mode

2005-08-27 Thread Christian Jones
On 8/27/05, black reaper [EMAIL PROTECTED] wrote:
 Also, a BIOS password can be easily removed if one has physical access to
 the box. The small CMOS battery can be popped out, and put back in (on the
 motherboard), erasing your password.
 
Not always, actually.  I have a Dell laptop that's rumored to store
the password in some kind of ROM.  Whatever the technical aspects,
removing the battery (actually, cutting the leads to it) didn't remove
the password.

Note that I'm not actually suggesting this as an effective security
mechanism, since most of these laptops also have a Master password,
but this one didn't---or at least none of the ones I tried with the
help of a Dell support person worked.  Still, just important to
realize that it may or may not be as easy as popping a battery out and
in.

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: Netgear WG511T on CURRENT: Supported or not?

2005-08-27 Thread Christian Jones
On 8/27/05, Theo de Raadt [EMAIL PROTECTED] wrote:
 The problem you are really having is a financial one.  Someone has
 your money, and has given you a device that has a new chip in it.
 Return it.  This problem has nothing to do with the limited abilities
 that OpenBSD has to track vendors who change their chips revisions
 whenever they feel like it.  In fact, sometimes I wonder why we have
 an Atheros driver at all, considering that Atheros has not gotten any
 less evil.  Still no docs.  And still that push for binary drivers.
 
Understood.  Thanks, Theo, and thanks (as always) for the wonderful work!
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



CURRENT: No mail for root after install

2005-08-25 Thread Christian Jones
Hi, all.  A minor thing, but somewhat surprising:  after an fresh
install of -current (Aug 24 snapshot), the initial root.mail is
uncheckable:

login: root
Password: 
OpenBSD 3.8-beta (GENERIC) #119: Wed Aug 24 01:47:37 MDT 2005

[snip]

You have mail.
Terminal type? [vt220]
# mail
No mail for root
# ls -l /var/mail/root
-rw---  1 root  wheel  4741 Aug 24 00:41 /var/mail/root
# touch newmail
# mail root  newmail
No message, no subject; hope that's ok
# ls -l /var/mail/root
-rw---  1 root  wheel  5309 Aug 25 08:10 /var/mail/root
# mail
Mail version 8.1.2 01/15/2001.  Type ? for help.
/var/mail/root: 1 message 1 new
N  1 [EMAIL PROTECTED]  Thu Aug 25 08:10   13/568


Anyway, you get the idea.  I've noticed this in the last couple of
snapshots, but I don't know when it started.  Hope this helps---please
feel free to ask for more info if necessary.

Thanks!
CDJ
-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: CURRENT and DHCP with Linksys routers--SOLVED (WAS: 8/13 snapshot and DHCP)

2005-08-23 Thread Christian Jones
The problem no longer exists, thanks to a patch entered into cvs
yesterday afternoon.  Huge thanks to Ken Westerback, Theo, and the
rest of the development team.  This may have been a little thing,
but it's the sort of response that keeps me loving OpenBSD.  Time to
save up a little more for pre-orders for me and my friends
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: CURRENT and DHCP with Linksys routers (WAS: 8/13 snapshot and DHCP)

2005-08-22 Thread Christian Jones
On 8/21/05, Kenneth R Westerback [EMAIL PROTECTED] wrote:
 Looks like the OpenBSD client issues a DISCOVER, gets a proper reply
 from the Linksys box, issues the confirming REQUEST, and gets
 garbage back. And around and around it goes.
 
 Can you get a tcpdump of the 3.7 dhclient succeeding? Thanks.
 
I've installed the 3.7-stable dhclient on 3.8.  Interestingly, it
gives some (but not all) of the same errors, but ends up binding an
address properly.  (This is on a wired connection, again, which I
don't usually use, so these warnings may be present in 3.7 itself. 
I'll try that later today.)  A short script of a session follows and
is available at
http://www.aleph0.com/computing/openbsd/bugs/3.8-dhcp-3.7-dhclient-script
The tcpdump from this session is available at
http://www.aleph0.com/computing/openbsd/bugs/3.8-dhcp-3.7-dhclient-tcpdump

Hope that helps!
CDJ

Script started on Mon Aug 22 06:58:30 2005
# tcpdump -i sis0 -s 1000 -w 3.8-dhcp-3.7-dhclient-tcpdump 

[1] 14939
# tcpdump: WARNING: sis0: no IPv4 address assigned
tcpdump: listening on sis0, link-type EN10MB
sh /etc/netstart

DHCPDISCOVER on sis0 to 255.255.255.255 port 67 interval 8
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPOFFER from 192.168.1.1
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPACK from 192.168.1.1
bound to 192.168.1.101 -- renewal in 43200 seconds.
# pkill tcpdump


# 12 packets received by filter
0 packets dropped by kernel
^D

[1] + Done tcpdump -i sis0 -s 1000 -w 3.8-dhcp-3.7-dhclien

Script done on Mon Aug 22 06:59:22 2005


-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



CURRENT and DHCP with Linksys routers (WAS: 8/13 snapshot and DHCP)

2005-08-21 Thread Christian Jones
 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
sis0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500
lladdr 00:11:43:44:86:42
media: Ethernet autoselect (100baseTX full-duplex)
status: active
pflog0: flags=0 mtu 33224
pfsync0: flags=0 mtu 1348
enc0: flags=0 mtu 1536
# cat /etc/hostname.sis0

dhcp NONE NONE NONE
# tcpdump -i sis0 -s 1000 -w 3.8-dhcp-tcpdump 

[1] 25897
# tcpdump: WARNING: sis0: no IPv4 address assigned
tcpdump: listening on sis0, link-type EN10MB
sh /etc/netstart

DHCPDISCOVER on sis0 to 255.255.255.255 port 67 interval 5
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPOFFER from 192.168.1.1
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
DHCPDISCOVER on sis0 to 255.255.255.255 port 67 interval 4
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPOFFER from 192.168.1.1
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
DHCPDISCOVER on sis0 to 255.255.255.255 port 67 interval 3
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPOFFER from 192.168.1.1
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
^C
# pkill tcpdump


# 32 packets received by filter
0 packets dropped by kernel
^D

[1] + Done tcpdump -i sis0 -s 1000 -w 3.8-dhcp-tcpdump 

Script done on Sun Aug 21 18:26:10 2005


-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: 8/13 snapshot and DHCP

2005-08-20 Thread Christian Jones
 On 8/17/05, Christian Jones [EMAIL PROTECTED] wrote:
 I had similar (nearly identical) problems about a month ago using a
 then-current snapshot, also with a Linksys router, with a wi(4) card,
 a problem I didn't see in 3.7.  I further would recieve a console
 message Discarding packet with invalid hlen at each (I think)
 DHCPOFFER.

Okay, I've installed CURRENT again for testing (the 19 August
snapshot).  This problem does not occur in 3.7-STABLE.  Below is a
script of the behavior using a laptop, a wi(4) card, and a Linksys
BEFW11S4 ver. 2 Wireless Access Point and Cable/DSL Router with
4-port switch.  The raw tcpdump is available for download at
http://www.aleph0.com/computing/machines/dave/OpenBSD-3.8-dhcp-bug-tcpdump

If there's any concern about what I expect to see (instead of what I
did see), or any other information I can provide which might be
helpful, please let me know.

Question:  should I go ahead and submit an official problem report, or
just expect to talk about it here?

Final note:  This is with a wireless card, since that's the only thing
convenient to test with, but I have an almost identical problem with
onboard ethernet and DHCP:  the output of dhclient looks like (copied
by hand):
DHCPDISCOVER on sis0 to 255.255.255.255 port 67 interval 3
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
DHCPOFFER from 192.168.1.1
DHCPREQUEST on sis0 to 255.255.255.255 port 67
ip length 576 disagrees with bytes received 580.
accepting packet with data after udp payload.
Discarding packet with invalid hlen.
[repeat ad infinitum]

Okay, onto the full script (using wi(4)):

Script started on Sat Aug 20 17:13:29 2005
# dmesg

OpenBSD 3.8-beta (GENERIC) #108: Fri Aug 19 02:32:32 MDT 2005
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Mobile Intel(R) Celeron(R) CPU 2.20GHz (GenuineIntel 686-class) 2.20 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,CNXT-ID
real mem  = 232300544 (226856K)
avail mem = 205090816 (200284K)
using 2861 buffers containing 11718656 bytes (11444K) of memory
User Kernel Config
UKC disable apm0
265 apm0 disabled
UKC quit
Continuing...
mainbus0 (root)
bios0 at mainbus0: AT/286+(e5) BIOS, date 03/04/05, BIOS32 rev. 0 @ 0xfd830
apm at bios0 function 0x15 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd830/0x7d0
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf40/160 (8 entries)
pcibios0: PCI Interrupt Router at 000:02:0 (SIS 85C503 System rev 0x00)
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc/0xc000 0xcc000/0xa000 0xd6000/0x800!
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 SIS 650 PCI rev 0x80
ppb0 at pci0 dev 1 function 0 SIS 86C201 AGP rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 SIS 650 VGA rev 0x00: aperture at
0xe800, size 0x40
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 2 function 0 SIS 85C503 System rev 0x25
pciide0 at pci0 dev 2 function 5 SIS 5513 EIDE rev 0x00: 650: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
wd0 at pciide0 channel 0 drive 0: IC25N030ATMR04-0
wd0: 16-sector PIO, LBA48, 28615MB, 58605120 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: QSI, CDRW/DVD SBW242C, UQ81 SCSI0
5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
SIS 7013 Modem rev 0xa0 at pci0 dev 2 function 6 not configured
auich0 at pci0 dev 2 function 7 SIS 7012 AC97 rev 0xa0: irq 5, SiS7012 AC97
ac97: codec id 0x41445374 (Analog Devices AD1981B)
ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
ohci0 at pci0 dev 3 function 0 SIS 5597/5598 USB rev 0x0f: irq 9,
version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: SIS OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 3 ports with 3 removable, self powered
ohci1 at pci0 dev 3 function 1 SIS 5597/5598 USB rev 0x0f: irq 10,
version 1.0, legacy support
usb1 at ohci1: USB revision 1.0
uhub1 at usb1
uhub1: SIS OHCI root hub, rev 1.00/1.00, addr 1
uhub1: 3 ports with 3 removable, self powered
ehci0 at pci0 dev 3 function 2 SIS 7002 USB rev 0x00: irq 3
usb2 at ehci0: USB revision 2.0
uhub2 at usb2
uhub2: SIS EHCI root hub, rev 2.00/1.00, addr 1
uhub2: 6 ports with 6 removable, self powered
sis0 at pci0 dev 4 function 0 SIS 900 10/100BaseTX rev 0x91: irq 4,
address 00:11:43:44:86:42
rlphy0 at sis0 phy 1: RTL8201L 10/100 PHY, rev. 1
cbb0 at pci0 dev 10 function 0 Texas Instruments PCI1510 CardBus rev
0x00: irq 9
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12

Re: 8/13 snapshot and DHCP

2005-08-17 Thread Christian Jones
On 8/17/05, Emmett Pate [EMAIL PROTECTED] wrote:
 I successfully installed the 8/16 snapshot at the office (which uses a
 different DHCP server) and dhclient acquires a lease with no problem.
 However, at home (using a Linksys router as the DHCP server), dhclient
 fails to get a lease.  As noted earlier, dhclient from 3.7 works fine at
 both locations.
 
I had similar (nearly identical) problems about a month ago using a
then-current snapshot, also with a Linksys router, with a wi(4) card,
a problem I didn't see in 3.7.  I further would recieve a console
message Discarding packet with invalid hlen at each (I think)
DHCPOFFER.

It's been a while, but I switched to static addressing and didn't
follow up (though it's on my list of bugs to report/ask about after
I have the time to put together a real report).  There's been
discussion before that some features of Linksys routers/access points
are fairly broken, and more than likely the OS won't be changed to
work with something nonstandard and unfriendly.

I'll try to get to a tcpdump and a real bug report this weekend, if
anyone else will find it helpful.
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: mozilla-firefox problem, was: kdeinit problems in 3.7-current

2005-07-17 Thread Christian Jones
On 7/17/05, Bruno Delbono [EMAIL PROTECTED] wrote:
 How does mozilla-firefox perform on OpenBSD? Are there any differences
 in performance compared to Linux/Windows?
 
pkg/DESCR says that extensions don't work.  Has anyone had any luck
with changing that?
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



'no link' ethernet and dhcp in -current

2005-07-16 Thread Christian Jones
Hi, all.  I've got a laptop with wi(4) and sis(4) network interfaces. 
While installing 3.6, I could configure them to use dhcp to obtain
their addresses, even if neither was actually connected to a network
(i.e., no wireless in range and no ethernet jack close by).  When I
installed 3.7, I found this was no longer true of the wireless---my
sis0 would note 'no link .. giving up' and write its
hostname.sis0 to use dhcp anyway, but wi0 wouldn't configure;  once
configuration failed, it would keep going back to the Which one do
you wish to initialize? (or 'done') [wi0]  prompt.

That's all well and good, as it was a minor item to create a
hostname.wi0 file (but who knows what else I was leaving out?) by
hand.  In CURRENT, however (as of 12 July snapshot), the same happens
for sis0 when a dhcp server can't be reached.

I'm all for doing it the right way, but that's why I tell it what
configuration to use during installation---should it really keep
ignoring my answers, even if they seem like they don't work?  Is there
any chance of reverting (or coming close) to the previous behavior? 
Yes, I realize it's a very minor issue, but it would be nice not to
have to write my own network configuration into install.site, and not
to have to be connected to a network to install properly.

Thanks, and thanks in advance for any pointers (as well as for any
take a long walk... messages, of course ;-) )
CDJ
-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Disk On Key under 3.6

2005-06-25 Thread Christian Jones
On 6/25/05, Mayuresh Kathe [EMAIL PROTECTED] wrote:
 Following is what I did and what the system showed me in response:
 # mount_msdos /dev/sd0a /mnt/
 mount_msdos: /dev/sd0a on /mnt: Device not configured
 # newfs_msdos /dev/sd0a
 newfs_msdos: /dev/sd0a: Device not configured

 Which device in /dev should I use to mount/format the drive?

It's quite possible you'll need to check the disklabel for sd0 to
determine which partition is recognized as fat;  on many (but not all
I've seen), it will be /dev/sd0i or /dev/sd0j .  As always, I'd
strongly suggest looking at the FAQ:  In this case, 14.17:
http://www.openbsd.org/faq/faq14.html#flashmem

--
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: Laptop CD Audio

2005-06-13 Thread Christian Jones
On 6/12/05, Yosep Fery Wibowo [EMAIL PROTECTED] wrote:
 Better to check your soundcard BIOS setting.
 With 'trial and error' on various settings beetwen irq and/or dma usually will
 help this problem.
 
This laptop has *very* limited BIOS configuration---nothing at all for
Integrated Peripherals, Audio, or anything else which might be
even tangentially related.  No Plug  Play, interrupts, or so forth.
 It doesn't even let you disable APM or ACPI.  So no luck there, but
thanks.
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Laptop CD Audio

2005-06-12 Thread Christian Jones
Hi, all.  I've been putting a laptop (Dell Inspiron 1000) through the
motions in order to submit its status to the OpenBSD i386 laptops
page.  In doing so, I've tested out a bunch of things I've never used
before, and I've hit a snag with playing audio CDs (from the raw
device, not mounting and/or ripping them).

I thought I had this one all figured out---I can play audio just fine,
but not from the CD.  Everything's unmuted and maxed out in volume in
mixerctl (below);  I haven't changed any settings in audioctl (also
below).  cdio seems to read and play just fine (status below), but I
get no actual sound.  Even DVDs play great in ogle.

From the FAQ and the archives I'm guessing it's the classic lack of an
audio cable from the CD-ROM to the sound card, but as this a laptop
it's not particularly easy to check such a thing---and I can't imagine
it would look like the desktop cable anyway.  Does anyone have any
advice for checking to see if this is the problem, or if anything else
might be?  Does anyone know if this lack of cable is a common
situation for (budget) laptops?  And finally, any advice other than
just ripping the music?

Thanks, as always,
CDJ
(some output follows)

$ mixerctl -a
outputs.master=255,255
outputs.master.mute=off
outputs.mono=255
outputs.mono.mute=off
outputs.mono.source=mixerout
outputs.headphones=255,255
outputs.headphones.mute=off
outputs.bass=255
outputs.treble=255
inputs.speaker=255
inputs.speaker.mute=off
inputs.phone=255
inputs.phone.mute=off
inputs.mic=255
inputs.mic.mute=off
inputs.mic.preamp=on
inputs.mic.source=mic0
inputs.line=255,255
inputs.line.mute=off
inputs.cd=255,255
inputs.cd.mute=off
inputs.video=255,255
inputs.video.mute=off
inputs.aux=255,255
inputs.aux.mute=off
inputs.dac=255,255
inputs.dac.mute=off
record.source=mic
record.volume=255,255
record.volume.mute=off
record.mic=0
record.mic.mute=off
outputs.loudness=off
outputs.spatial=off
outputs.spatial.center=0
outputs.spatial.depth=0
outputs.surround=255,255
outputs.surround.mute=off
outputs.center=255
outputs.center.mute=off
outputs.lfe=255
outputs.lfe.mute=off

$ audioctl -a
name=SiS7012 AC97
version=0xa0
config=auich0
encodings=ulinear:8,mulaw:8*,alaw:8*,slinear:8*,slinear_le:16,ulinear_le:16*,slinear_be:16*,ulinear_be:16*
properties=full_duplex,mmap,independent
full_duplex=0
fullduplex=0
blocksize=9600
hiwat=6
lowat=1
monitor_gain=0
mode=
play.rate=48000
play.channels=2
play.precision=16
play.encoding=slinear_le
play.gain=127
play.balance=32
play.port=0x0
play.avail_ports=0x0
play.seek=9600
play.samples=7719552
play.eof=0
play.pause=0
play.error=1
play.waiting=0
play.open=0
play.active=0
play.buffer_size=65536
record.rate=8000
record.channels=1
record.precision=8
record.encoding=mulaw
record.gain=255
record.balance=32
record.port=0x1
record.avail_ports=0x7
record.seek=0
record.samples=0
record.eof=0
record.pause=0
record.error=0
record.waiting=0
record.open=0
record.active=0
record.buffer_size=65536
record.errors=0

$ cdio -f cd0 status
Audio status = 17playing, current track = 1, current position = 0:21.48
Media catalog is active, number 0101002157480\^
Left volume = 255, right volume = 255



Re: /etc/skel/.profile export PATH HOME TERM

2005-05-12 Thread Christian Jones
On 5/12/05, Marcus Popp [EMAIL PROTECTED] wrote:
 /etc/skel/.profile isn't used at the login.
 Read man adduser. The /etc/skel/* could be copied to a new users homedir.
 
That's correct---and it's copied by default, so that it ends up being
accessed by a non-root user who uses ksh or sh as his shell.

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: /etc/skel/.profile export PATH HOME TERM

2005-05-12 Thread Christian Jones
On 5/12/05, Andreas Kahari [EMAIL PROTECTED] wrote:
 These are variables typically used by processed started from the shell
 session.  Without exporting the variables, they would not be seen by
 new processes.

That's true---but login(1) already exports them (see below, or man 1 login).

 The fact that you don't see a difference when you remove that line
 (from your own ~/.profile I presume) is probably an indication of that
 you either export them elsewhere within the session, or that you did
 not know what this meant or how to test it.

I understand exporting environment variables or not;  try the
following:  use the skel .profile as your ~/.profile.  Comment out the
export line.  Add a new line:  sh ~/test-export .  Finally, add the
below script:
~/test-export:
#!/bin/sh

echo PATH=$PATH
echo HOME=$HOME
echo TERM=$TERM

You'll see that any changes (such as the PATH) which take place in
~/.profile are properly propagated into the environment, because the
variables have already been placed there by login(1).  (This can be
tested manually after logging in, as well.)

 I do not believe that login(1) actually does anything more than just
 sets the variables, e.g. it does not export them.

From man 1 login:
 login enters information into the environment (see environ(7)) specifying
 the user's home directory (HOME), command interpreter (SHELL), search
 path (PATH), terminal type (TERM), and user name (both LOGNAME and USER).

--
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: /etc/skel/.profile export PATH HOME TERM

2005-05-12 Thread Christian Jones
On 5/12/05, Will H. Backman [EMAIL PROTECTED] wrote:
 What about when sshd is set to not use login?
 
This is exactly the sort of thing I was hoping to hear, something I
hadn't thought of.  However, it looks like it's still unnecessary. 
sshd_config has UseLogin No as the default, and running the same tests
shows that everything still works as expected (even changing PATH from
what's on the local machine).  This is a bit interesting, as man sshd
makes little mention of the environment;  according to man ssh, ssh
itself sets the environment, including HOME and PATH.  Excellent
idea---I wonder if there's some esoteric use of ssh/sshd that doesn't
set the environment properly itself.

Thanks,
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones



Re: /etc/skel/.profile export PATH HOME TERM

2005-05-12 Thread Christian Jones
On 5/12/05, Nick Holland [EMAIL PROTECTED] wrote:
 Unnecessarily code != evil code. :)
 
Always very, very good to remember ;-)

You're absolutely right, Nick---these stylistic and pragmatic issues
are certainly ones I hadn't thought of.  Though I was initially
looking for some specific reason these were there, I think this may be
an even more important one:  it *seems* right, and it does no harm.

Thanks again, Nick, and everyone else who responded.
CDJ

-- 
Christian Jones
[EMAIL PROTECTED]
http://www.aleph0.com/~chjones