SUMMARY2: how to avoid a password with shutdown

From: Christophe DIARRA (diarra@ipno.in2p3.fr)
Date: Fri Jan 17 1997 - 09:37:46 CST


Greetings,

I have now found the way to use ufsdump from the crontab. Some people
from the net gave me the good solution. Four persons explained how
to do. Their mails are added to the end of this message and their
suggestions were to put the backup script in one of the /etc/rcX.d
directories and name it Sxxxx. The good answers begin after the line
"GOOD ANSWERS" in this message. I included too the files which were attached
to their mails.

I tried all the suggestions to shutdown the computer but finally it is
sure that no command under Solaris can bring the computer in single user
mode without the root password. 'init 6' or 'reboot' don't require a
password but were not helpfull in my case.

Raju Krishnamurthy <raju@ecologic.net> tells that amanda can help for
this kind of problem (ftp.cs.umd.edu/pub/amanda). amanda seems to be simple
to configure and allows ufsdumps in multi-user mode.

Since my first summary I received many mails from people giving
me suggestions and sharing with me their experiences.

Thanks to the following persons who replied (hope no one is forgotten).

Iván Villalobos Hernández <denp@acnet.net>
Kuldell <bf566z9@is000913.BELL-ATL.COM>
Raju Krishnamurthy <raju@ecologic.net>
James Chapman <james.chapman@iee.org>
"Xu, Guo Miao (Hui, Kwok Miu)" <huikomix@dt.com.hk>
Ed Poorbaugh <poorbaugh@norcross.mcs.slb.com>
Val Popa <vpopa@dss.mc.xerox.com>
Chris Marble <Chris_Marble@hmc.edu>
Ross Stocks <ROSS.STOCKS.PSD36651@nt.com>
Jack Reiner <jjr@edi-nola.com>
Rob Pieters <ropieter@ba3sun01.eitc.eds.com>
"Brian T. Wightman" <wightman@sol.acs.uwosh.edu>
Dan Penrod <penrod@wcnewmedia.com>
"Feeney, Tim" <Tim.Feeney@FMR.COM>
Karlheinz Pischke <kpischke@cadence.com>
Ravindra N Nemlekar <ravindra@airmail.hobl.lucent.com>
Kenn Owen <kowen@aip.org>
Scott McDermott <scottm@kcls.org>
James Lin <james.lin@gs.com>

My first summary was:

>
> Greetings,
>
> I have to 'ufsdump' disks in single user mode under Solaris 2.5. The backup
> script is executed from the crontab. The problem is that shutdown
> requires a password. Is it possible to shutdown a Solaris machine without
> giving a password ? This should be helpfull for me.
>
 
Maybe my explanations were not clear, and all the answers that I
received didn't solved my problem.
 
Under Solaris, if you run shutdown from the crontab (even from the root
crontab), you will be asked for the root password ('for system
maintenance'). The command I use (and which doesn't work from the crontab)
is: 'shutdown -y -g0'.
Untill I found a good solution, I will continue running my backup script
by hand.
 
Thanks for the people who replied:
 
Xu, Guo Miao (Hui, Kwok Miu) <huikomix@dt.com.hk>
Claude Charest <charest@chou.CANR.Hydro.Qc.Ca>
John Bradley <john.bradley@sunman>
Michael McGeown <mcgeown@bbn.com>
Frank Pardo <fpardo@tisny.com>
Rob Pieters <ropieter@ba3sun01.eitc.eds.com>

----------------------------------------------------------------------------
GOOD ANSWERS - GOOD ANSWERS - GOOD ANSWERS - GOOD ANSWERS - GOOD ANSWERS
----------------------------------------------------------------------------

ANSWER 1
---------

Date: Thu, 16 Jan 1997 18:37:54 +1100 (EST)
From: Peter Marelas <maral@phase-one.com.au>
To: Christophe DIARRA <diarra@ipno.in2p3.fr>
Subject: Re: SUMMARY: how to avoid a password with shutdown
This script performs backups in single user mode.
 
Try it..
 
As for your shutdown password problem, has your shutdown command been modified?
 
Peter Marelas

Begin of the backup script (exadump)
------------------------------------
#!/sbin/sh
# Level-n Dump of the local disk(s) of a Solaris-2.x workstation to an
# Exabyte drive at either the local host or a specified dumphost. The
# dump level defaults to 0 (full dump), for which single user mode is
# enforced unless the option -m (for multiuser) was given. (Multiuser
# mode for level 0 dumps is only recommended for inactive, e.g. read-
# only, filesystems.) The tape device defaults to /dev/rmt/0mn for
# dumps to a Solaris machine and to /dev/nrst1 for dumps to a SunOS 4
# machine.

# After a number of consistency checks, the user is asked if the dump is
# to be done now or later. In the latter case it is scheduled with "at"
# or "cron". A level 0 dump is done in a safe phase during a reboot.
# (Thanks to Everett Lipman <lipman@isi9.ssl.berkeley.edu> for pointing
# out how to do this.) At the scheduled time the reboot is started,
# then the dump is done, and finally the machine is brought up to multi-
# user mode. Scripts for the reboot and dump are automatically
# installed. For incremental dumps (level > 0), which are done in
# multiuser mode, it does also make sense to be run during the night
# when the machine is not busy. (Do a crontab -l as root to find a time
# when the machine is least busy; here at KIS the best start time seems
# to be 3:45.)

# The file systems (raw partitions) to be dumped must be listed in a
# file. Its name can be specified with the option -f; if this is not
# done, it defaults to /etc/$prog.dat, where $prog is the basename of
# this program. In the data file, empty lines and comment lines
# starting with # are ignored. In each of the other lines, the first
# word is considered to be the full name of a raw disk partition to be
# dumped. The remainder of the line is again ignored and may be used for
# comments.

# For identification purposes, the contents of the data file and other
# relevant information are written to the tape as the first file (in tar
# format). Next follow the dumps of the various partitions in the order
# as listed in the data file. Finally a log file is appended to the
# tape (in tar format).

# The entire dump takes about 1 h per GB when dumping over the net;
# slightly less (45 min per GB) for a local tape drive.

# See Usage below.
# Examples: at KIS, we initiate dumps on the local Exabyte of our main
# server for
# 1. a level 0 dump of /home with
# cd /etc; ./exadump -f homedump.dat
# 2. a level 5 dump of /home with
# cd /etc; ./exadump -f5 homedump.dat
# 3. full level 0 dumps of the other local disks with
# cd /etc; ./exadump
# 4. a full level 0 dump for transport between our main site and our
# observatory on Tenerife, without updating /etc/dumpdates, so
# that the relationship between local full and incremental dump
# tapes stays intact:
# cd /etc; ./exadump -n

# (C) R. Hammer 1995 - 96
# May be redistributed and modified. No warranties; use at your own risk.
# Released: Fri Mar 31 20:47:09 1995 hammer@kis.uni-freiburg.de
# Last change: Thu Aug 31 23:42:52 1995 hammer@kis.uni-freiburg.de
# Fri Mar 1 20:07:18 1996 hammer@kis.uni-freiburg.de Vers 2.0
oldpath=$PATH
PATH=/sbin:/usr/bin:/usr/sbin; export PATH # set a safe PATH
umask 022
prog=`basename $0`

# Configuration section
# ---------------------

dftdata=/etc/${prog}.dat # default data file with list of partitions
                         # to be dumped
localpath=/opt/local/bin # path to editors which might be invoked by



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:43 CDT