Hi,

On Wed, Mar 27, 2002 at 06:49:32:AM -0600 Matthew D. Fuller wrote:
> 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';

Verified this one: hostname. I used to use 'hostname -s' rather than
something like 'hostname | cut ...' to get the short name. If I - on
Solaris - run 'hostname -s' it tells me: 'uname: not super user'. So I
use a switch in my .profile to find wether this is Solaris or not.

> 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.

Solaris.

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

Looks nice. ;-)

Rocco

Attachment: msg26480/pgp00000.pgp
Description: PGP signature

Reply via email to