On Wed, Mar 27, 2002 at 09:08:50AM +0000 I heard the voice of Dave Smith, and lo! it spake thus: > On Tue, Mar 26, 2002 at 08:31:07PM +0100, [EMAIL PROTECTED] wrote: > > > Just logged into a solaris box. Having set my prompt to 'user@machine' > > it says that only root may run 'uname'. My response: 'exit'. > > That could just be a local configuration issue. > tabby(21)% uname -a > SunOS tabby 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
I think he actually means 'hostname', not 'uname'; hostname, on any sane system, displays the hostname when called with no args, and tries to set it (requiring root at THAT point) when it has args. Solaris assumes that you're always trying to set it, even to nothing. Personally, I use tcsh, so I have a shell builtin for setting it in my prompt. However, in my uber-.tcshrc, I end up having to work around Solaris' braindamage in a number of ways. For instance, on every OTHER OS (including pre-Solaris-renaming SunOS, HP/UX 9, NeXT Mach), I can use "id -u" to get the EUID. Solaris? setenv EUID `id | sed "s/[a-z\(\)\=]//g" | awk '{print $1}'` Yippie. Yeah, I could use cut(1) and do it a bit more efficiently probably, but... -- Matthew Fuller (MF4839) | [EMAIL PROTECTED] Unix Systems Administrator | [EMAIL PROTECTED] Specializing in FreeBSD | http://www.over-yonder.net/ "The only reason I'm burning my candle at both ends, is because I haven't figured out how to light the middle yet"