Matthew, et al --

...and then Matthew D. Fuller said...
% 
% 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'.
...
% 
% 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

I agree so far, but ...


% it (requiring root at THAT point) when it has args.  Solaris assumes that
% you're always trying to set it, even to nothing.

Really?  I've never heard of that.

  nfs5{43} uname -a
  SunOS nfs5 5.8 Generic sun4u sparc
  nfs5{44} id
  uid=1236(dthorbur) gid=1012(u_it)
  nfs5{45} hostname
  nfs5
  nfs5{46}


% 
% 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}'`

Yes, some of the tools are just a bit broken.  At least it isn't AIX :-)
This is why you have the GNU utils in your ~/local tree anyway, though.


% 
% Yippie.  Yeah, I could use cut(1) and do it a bit more efficiently
% probably, but...

No argument there; we still have lots of cats to go :-)


% 
% -- 
% 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"


:-D
-- 
David T-G                      * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg26264/pgp00000.pgp
Description: PGP signature

Reply via email to