Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Program fails to run if uid=0 and shell is /bin/tcsh

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36326] Program fails to run if uid=0 and shell is /bin/tcsh
  • From: "Dr. David Kirkby" <drkirkby at ntlworld.com>
  • Date: Mon, 2 Sep 2002 04:08:33 -0400 (EDT)
  • Organization: None, but lots of entropy
  • Sender: owner-wri-mathgroup at wolfram.com

I know its not a good idea to run programs as root on a Unix machine and don't
normally do so. However, can anyone tell me what is happening here? 

A mathematical program 'Mathematica' has been installed in /usr/local on this
Sun Ultra 60. The correct password was entered and it all runs fine with my
normal login (davek), which has a shell of /bin/tcsh. 

If I switch user to root, which has the normal /sbin/sh shell, Mathematica runs
fine. However, if I switch user to 'roottcsh', which as a uid of 0, but a shell
of /bin/tcsh, Mathematica fails to run, saying the password file is invalid. 

I can't understand while executing a program that works fine as root, fine as a
normal user, yet does not when run when execution is attempted as another user
with root privileges. 

*** Runs fine as a formal user 'davek'******
wren /export/home/davek % math
Mathematica 4.0 for Solaris
Copyright 1988-1999 Wolfram Research, Inc.
 -- Motif graphics initialized -- 
In[1]:= Quit

***Mathematica is run from /usr/local/bin/math, which is a symbolic link****
wren /export/home/davek % which math
/usr/local/bin/math
wren /export/home/davek % ls -l /usr/local/bin/math
lrwxrwxrwx   1 root     other          53 Jun 16 08:18 /usr/local/bin/math ->
/usr/local/mathematica-4.0.2/Executables/Solaris/math


***Mathematica runs fine as root****
wren /export/home/davek % su
Password: 
# /usr/local/bin/math
Mathematica 4.0 for Solaris
Copyright 1988-1999 Wolfram Research, Inc.
 -- Motif graphics initialized -- 
In[1]:= Quit

***Switch to a user with uid=0, shell =/bin/tcsh ***
wren /export/home/davek % su - roottcsh
Password: 
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002
You have new mail.

***Now Mathematica does not run***
wren / # /usr/local/bin/math
Mathematica 4.0 for Solaris
Copyright 1988-1999 Wolfram Research, Inc.
/usr/local/mathematica-4.0.2/Configuration/Licensing/mathpass:1:
   Incomplete password entry.
No valid single-machine password entry for Mathematica found.
Machine name:   wren
MathID: [deleted by moderator]
You will need a valid license ID and password in order
to proceed. Go to http://register.wolfram.com or
consult your Getting Started documentation.
Enter the name of your organization: 

***Here are the contents of the password files****
***with the contents of /etc/shadow changed for security resons***

wren / # cat /etc/passwd | grep root
root:x:0:1:Super-User:/:/sbin/sh
roottcsh:x:0:1:Dr. David Kirkby:/:/bin/tcsh
wren / # cat /etc/shadow | grep root
root:TA9addfsfsdsdfdddMTxHU:11266::::::
roottcsh:dgddsdfsdffsdnSw:11198::::::



-- 
Dr. David Kirkby PhD,
email: drkirkby at ntlworld.com 
web page: http://www.david-kirkby.co.uk
Amateur radio callsign: G8WRB


  • Prev by Date: Re: L2 inner product. Integrate and Conjugate?
  • Next by Date: Re: Re: Re: An interesting math problem
  • Previous by thread: RE: GraphicsArray, scaling and AspectRatio
  • Next by thread: Re: Re: Re: An interesting math problem