Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2013 23:38:43 -0700 (PDT)
From:      Bill Tillman <btillman99@yahoo.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Diskless question
Message-ID:  <1379227123.52657.YahooMailNeo@web165004.mail.bf1.yahoo.com>
In-Reply-To: <523490C0.9060609@bananmonarki.se>
References:  <201309140905.r8E955xE062761@fire.js.berklix.net> <523467A5.6020902@bananmonarki.se> <523490C0.9060609@bananmonarki.se>

next in thread | previous in thread | raw e-mail | index | archive | help





________________________________
 From: Bernt Hansson <bah@bananmonarki.se>
To: Bernt Hansson <bah@bananmonarki.se> 
Cc: Julian H. Stacey <jhs@berklix.com>; freebsd-questions@freebsd.org 
Sent: Saturday, September 14, 2013 12:37 PM
Subject: Re: Diskless question
 

On 2013-09-14 15:41, Bernt Hansson wrote:
> On 2013-09-14 11:05, Julian H. Stacey wrote:
>> Hi, Reference:
>>> From:        Bernt Hansson <bah@bananmonarki.se>
>>> Date:        Sat, 14 Sep 2013 09:36:58 +0200
>>
>> Bernt Hansson wrote:
>>> Hello list!
>>>
>>> I have a setup with a diskless machine and working, but I can not log in
>>> as root on the diskless. How to proceed?
>>
>> Log in as non root & see what /var/log shows
>> Mount the media elsewhere then either
>>     give a good look at what might be wrong,
>>     relax some restrictive permissions
>>     create some temporary back doors.
>>     rlogin, ssh, no or simple password on toor etc
>>
>> Cheers,
>> Julian
>
> I solved it. Root did not have a password as strange as it may be.

Unsolved. Root do not have a password, pressing enter at the passwd 
prompt gives "sorry"
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



It's been a long time since I did this but there was some command for passwd for root which I had to do as well. The initial diskless boot will login you in with root without a password as I recall. Aha, here it is...

cd /etc
cp passwd master.passwd /pxeroot/conf/default/etc/
cd /pxeroot/etc
pwd_mkdb -d /pxeroot/etc master.passwd

You may need to adjust this based on your setup. I found lots of good info on diskless booting at this site:

http://www.nber.org/sys-admin/FreeBSD-diskless.html
From owner-freebsd-questions@FreeBSD.ORG  Sun Sep 15 06:47:23 2013
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTP id 13A1EF01
 for <freebsd-questions@freebsd.org>; Sun, 15 Sep 2013 06:47:23 +0000 (UTC)
 (envelope-from freebsd@edvax.de)
Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id CC37D21A1
 for <freebsd-questions@freebsd.org>; Sun, 15 Sep 2013 06:47:22 +0000 (UTC)
Received: from r56.edvax.de (port-92-195-74-65.dynamic.qsc.de [92.195.74.65])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx02.qsc.de (Postfix) with ESMTPS id EB14D278DD;
 Sun, 15 Sep 2013 08:47:13 +0200 (CEST)
Received: from r56.edvax.de (localhost [127.0.0.1])
 by r56.edvax.de (8.14.5/8.14.5) with SMTP id r8F6l55d003879;
 Sun, 15 Sep 2013 08:47:05 +0200 (CEST)
 (envelope-from freebsd@edvax.de)
Date: Sun, 15 Sep 2013 08:47:05 +0200
From: Polytropon <freebsd@edvax.de>
To: Gary Kline <kline@thought.org>
Subject: Re: howto kill x if x is running?
Message-Id: <20130915084705.d41b6141.freebsd@edvax.de>
In-Reply-To: <20130915062046.GA12535@ethic.thought.org>
References: <20130915062046.GA12535@ethic.thought.org>
Organization: EDVAX
X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org>
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Polytropon <freebsd@edvax.de>
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>,
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>,
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Sep 2013 06:47:23 -0000

On Sat, 14 Sep 2013 23:20:46 -0700, Gary Kline wrote:
> 	say that I have a utility xxx running sometimes.  xxx is
> 	soaking up a chunk of my load.  I have to use top to find if
> 	xxx is running, then kill -9 to kill xxx and have a steady load of,
> 	say, between 0.10 and 0.15.  what's the script that can do this?

Quick and dirty, needs adjustments. Repeat the following
(endless loop, depending on the shell you're using):

	top -n | awk '/%/ { load=$11; sub("%", "", load); sub("\\.", "", load); if(load > 1000 && load < 1500) print $1 }' | xargs kill -9

The margin is coded in the conditional: 1000 means 10.00% WCPU
(load 0.10), 1500 means 15.00% WCPU (load 0.15). You will have
to set the "valid load" accordingly.

Done some minor testing, killed my media player (as expected).
I'm sure someone will present a much better, less dirtier
approach to accomplish the requested task. :-)



--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1379227123.52657.YahooMailNeo>