SUMARY II: Startup script as non-root user.

From: Oscar Arranz <oscar.arranz_at_consors.es>
Date: Wed May 23 2001 - 11:20:59 EDT
This is a multi-part message in MIME format.

------=_NextPart_000_024A_01C0E3AC.BBE80900
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks to Alexandre Perematko who gave me a solution based on suid =
permissions (suggested but not explained by Nick Hindley). This is his =
reply:
  You may make the script suid for specific user. It works in Solaris 7 =
, sguid does not though.=20

  echo "id -a" > script
  chown non_root_user:group script=20
  chmod 6755 script=20
  ./script=20

  Replace id with your code. It will show your script access rights if =
you just run the code above.
Both solutions work fine.

 ----- Original Message -----=20
  From: Oscar Arranz=20
  To: sunmanagers@sunmanagers.org=20
  Sent: Wednesday, May 23, 2001 3:12 PM
  Subject: SUMARY: Startup script as non-root user.


  Thanks to:=20

  Nick Hindley, Florian Schlaich, Bertrand Hutin, Noah Alvarez Jr. and =
Ronal Loftin

  All of them said this is the simplest way (su - user -c 'script.sh').=20

  Oscar.
    ----- Original Message -----=20
    From: Oscar Arranz=20
    To: sunmanagers@sunmanagers.org=20
    Sent: Wednesday, May 23, 2001 11:44 AM
    Subject: Startup script as non-root user.


    Hi Sunmanagers.

        I'm trying to run a script at startup with a non-root user =
privileges. I think I could do it using "su - user -c 'script.sh' " but =
I was wondering if there is another way to do it.

        I'm using Solaris 7 Sparc edition.

    Thanks in advance.


------=_NextPart_000_024A_01C0E3AC.BBE80900
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thanks to Alexandre Perematko who gave =
me a=20
solution based on suid permissions (suggested but not explained by Nick=20
Hindley). This is his reply:</FONT></DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV><FONT face=3DArial size=3D2>
  <DIV><FONT face=3DArial size=3D2>You may make the script suid for =
specific user.=20
  It works in Solaris 7 , sguid does not though. </FONT></DIV>
  <DIV></FONT>&nbsp;</DIV></DIV><FONT face=3DArial size=3D2>
  <DIV><FONT face=3DArial size=3D2>echo "id -a" &gt; script</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>chown non_root_user:group script =
</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>chmod 6755 script </FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>./script </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Replace id with your code. It will =
show your=20
  script access rights if you just run the code =
above.</FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=3DArial size=3D2>Both solutions work fine.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</FONT>----- Original Message ----- </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:oscar.arranz@consors.es" =
title=3Doscar.arranz@consors.es>Oscar=20
  Arranz</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  href=3D"mailto:sunmanagers@sunmanagers.org"=20
  title=3Dsunmanagers@sunmanagers.org>sunmanagers@sunmanagers.org</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, May 23, 2001 =
3:12=20
  PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> SUMARY: Startup script =
as=20
  non-root user.</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Thanks to: </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Nick Hindley, Florian Schlaich, =
Bertrand Hutin,=20
  Noah Alvarez Jr. and Ronal Loftin</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>All of them said this is the simplest =
way (su -=20
  user -c 'script.sh'). </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Oscar.</FONT></DIV>
  <BLOCKQUOTE=20
  style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; =
MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
    <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV=20
    style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
    <A href=3D"mailto:oscar.arranz@consors.es" =
title=3Doscar.arranz@consors.es>Oscar=20
    Arranz</A> </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
    href=3D"mailto:sunmanagers@sunmanagers.org"=20
    title=3Dsunmanagers@sunmanagers.org>sunmanagers@sunmanagers.org</A> =
</DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, May 23, 2001 =
11:44=20
    AM</DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Startup script as =
non-root=20
    user.</DIV>
    <DIV><BR></DIV>
    <DIV><FONT face=3DArial size=3D2>Hi Sunmanagers.</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; I'm trying to =
run a script=20
    at startup with a non-root user privileges. I think I could do it =
using "su=20
    - user -c 'script.sh' " but I was wondering if there is another way =
to do=20
    it.</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; I'm using =
Solaris 7 Sparc=20
    edition.</FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>Thanks in advance.</FONT></DIV>
    <DIV>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_024A_01C0E3AC.BBE80900--
Received on Wed May 23 16:20:59 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:55 EDT