Console Setup
Hi guys ,
do you know any console based application which could replace root shell to allow some tasks ( configuration of ip addresses , etc ) get done by using menus ? -- Armin ranjbar , System Administrator -- To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
Console Setup
On Wed, 7 May 2008 10:23:21 +0430, zoup@zoup.org said:
> do you know any console based application which could replace root shell > to allow some tasks ( configuration of ip addresses , etc ) get done by > using menus ? sudo + $FAVOURITE_SCRIPTING_LANGUAGE? -- Keith Edmunds +-------------------------------------------------------------------------+ | Tiger Computing Ltd | Helping businesses make the most of Linux | | "The Linux Specialists" | http://www.tiger-computing.co.uk | +-------------------------------------------------------------------------+ -- To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
Console Setup
On Wed, May 07, 2008 at 10:23:21AM +0430, Armin ranjbar wrote:
> do you know any console based application which could replace root shell > to allow some tasks ( configuration of ip addresses , etc ) get done by > using menus ? firstly to do the root stuff, you'll need sudo or similar. write wrapper scripts to do specific tasks, and then configure sudo to let particular users run them as root. don't trust the user input too much, just the bare minimum needed to get the job done. actually, don't trust user input at all - sanity check all input data, dont use it directly for command-line args, and transform it or quote it to make it safe. if the scripts are in perl, use taint mode - it will warn you when your code will use unsafe/tainted data to do something potentially dangerous. if they are shell scripts, you'll need to do your own taint checking, and never use bare variable names as arguments to programs or in if/while/case etc statements - instead, wrap them in quotes. e.g. don't do stuff like this: if [ $USERDATA = "bar" ] ; then /bin/foo $USERDATA fi case $MOREUSERDATA in ... ... esac these break if $USERDATA is null or contains more than one "word". and anything could happen if /bin/foo is careless about using its args. do stuff like this, instead: if [ "$USERDATA" = "bar" ] ; then /bin/foo "$USERDATA" fi case "$MOREUSERDATA" in ... ... esac oh yeah, use hard-coded paths when running programs. don't trust the user's PATH or anything else in their environment. in general, hard-code as much as possible into the scripts, and when writing them spend a lot of time thinking about possible ways that your script could be abused/exploited, and then make sure that those exploits don't work. be very wary of running vi (or any program which lets you run other programs) as root. instead copy the file to a temporary location, using tempfile(1) to get a safe temp filename, invoke the user's favourite editor as the logged in user, and then have a sudo script which copies the edited file into place (check the return code of the editor to find out if the user saved or quit first). the sudo copying script should make sure permissions are correct after copying. oh yeah, checking the file into RCS before and after editing it is a good idea - if they screw up, you can revert to any prior version. there's lot of other security issues to think of. these are a reasonable starting point. there are numerous FAQs and HOWTOs and so on available on the net which can help get you into a properly paranoid and cautious frame of mind. overall: be paranoid. once you've done that, you'll need a menu-ing program. there are numerous programs and packages to choose from. here's a sample. about 15 years ago, i set up a simple text menu system using lynx as the front end. it can (or could at the time, dunno if it still can) run external programs. in more recent years, i've written stuff using libcurses-ui-perl[1] (which does a lot more than just menus). i like it. i'll use it again. if you can program at all, this is very easy to learn and use. if for some reason i needed to look for something different, or more focused on menus, i'd probably look at first at pdmenu[2], or maybe libperlmenu-perl[3] just because they're packaged already for debian. never used them, don't know how good they are. there are many other options. try googling for 'curses text +console +menu' or similar. [1] Package: libcurses-ui-perl Priority: optional Section: perl Installed-Size: 852 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org> Architecture: all Version: 0.9603-1 Depends: libcurses-perl, libterm-readkey-perl, perl (>= 5.6.0-16) Filename: pool/main/libc/libcurses-ui-perl/libcurses-ui-perl_0.9603-1_all.deb Size: 239354 MD5sum: 4c91ba9a40e997c04cba996790a89693 SHA1: 0243ddcfa4e4fd7406830335fe4262f718ed7c05 SHA256: 74cea4a8caff49f7c79fb776a20694ff801ad222fa915b0b9c 127e1b0c16873f Description: curses-based OO user interface framework for Perl A UI framework for Perl based on the curses library. Curses::UI contains the standard set of widgets for use in constructing user interfaces, plus the following more advanced widgets: calendar, progress bar, text editor (including word wrapping and undo), and text viewer. It supports a variety of dialog windows, from the standard basic and error dialogs to file browsers, progress bars, and a calendar. Curses::UI also has internationalization support and currently has localization information for several languages. Homepage: http://search.cpan.org/dist/Curses-UI/ Tag: devel::lang:perl, devel::library, implemented-in::perl, interface::text-mode, role::devel-lib, role::shared-lib, uitoolkit::ncurses [2] Package: pdmenu Priority: optional Section: shells Installed-Size: 264 Maintainer: Joey Hess <joeyh@debian.org> Architecture: amd64 Version: 1.2.93 Depends: libc6 (>= 2.6.1-1), libgpmg1 (>= 1.19.6-1), libslang2 (>= 2.0.7-1) Suggests: menu (>= 2.1.29) Conflicts: menu (<< 2.0.0-5) Filename: pool/main/p/pdmenu/pdmenu_1.2.93_amd64.deb Size: 56582 MD5sum: 538911a7cd4a40dfeb6278567c7cdf1d SHA1: 76dcd7f75c87df42896dbb5e4a39c91da7d36e9c SHA256: d59046d184baa66281c050fd57e823b155d0f145ebb584944d 02593b42d900ac Description: simple console menu program A full screen console menu program, intended to be comfortable login shell for inexperienced users. . Pdmenu interfaces with Debian's menu system, to provide automatically-generated lists of installed programs. Tag: interface::shell, interface::text-mode, role::program, scope::utility, suite::debian, uitoolkit::ncurses, use::browsing [3] Package: libperlmenu-perl Priority: extra Section: perl Installed-Size: 220 Maintainer: Deepak Tripathi <apenguinlinux@gmail.com> Architecture: all Version: 4.0-5 Replaces: perlmenu Depends: perl (>= 5.6.0-16), libcurses-perl Conflicts: perlmenu Filename: pool/main/libp/libperlmenu-perl/libperlmenu-perl_4.0-5_all.deb Size: 84292 MD5sum: 46a55e52acf61e739c4089f28f0b66ac SHA1: 62faa7c696e0063fd03914b1d3fe6108a87bb3ab SHA256: a92d54c005ef118bb15ea4dada6e55a03a4fd8c1c329e98fd5 0a82709dda8837 Description: Menu and Template (curses-based) UI for Perl perlmenu is a Perl module that provides your application with access to easy-to-use functions for templates, menus, forms, and the like -- everything needed to put a slick UI on a program without resorting to a GUI. . Homepage: http://search.cpan.org/~skunz/perlmenu/ Tag: devel::lang:perl, implemented-in::perl, role::shared-lib craig -- craig sanders <cas@taz.net.au> There are two types of Linux developers - those who can spell, and those who can't. There is a constant pitched battle between the two. -- From one of the post-1.1.54 kernel update messages posted to c.o.l.a -- To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
Console Setup
On Wed, 7 May 2008 19:28:15 +1000
Craig Sanders <cas@taz.net.au> wrote: > craig > > -- > craig sanders <cas@taz.net.au> > > There are two types of Linux developers - those who can spell, and > those who can't. There is a constant pitched battle between the two. > -- From one of the post-1.1.54 kernel update messages > posted to c.o.l.a BIG-FAT Thanks :) -- Armin ranjbar , System Administrator -- To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Wed May 7 14:30:01 2008 Return-path: <ubuntu-users-bounces@lists.ubuntu.com> Envelope-to: tom@linux-archive.org Delivery-date: Wed, 07 May 2008 13:42:47 +0300 Received: from chlorine.canonical.com ([91.189.94.204]) by s2.java-tips.org with esmtp (Exim 4.68) (envelope-from <ubuntu-users-bounces@lists.ubuntu.com>) id 1Jth6l-0006sj-IP for tom@linux-archive.org; Wed, 07 May 2008 13:42:47 +0300 Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from <ubuntu-users-bounces@lists.ubuntu.com>) id 1Jth5E-0004dU-Ve; Wed, 07 May 2008 11:41:13 +0100 Received: from speutel.de ([213.239.215.137]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from <stephan.windmueller@cs.uni-dortmund.de>) id 1Jth5D-0004dD-6X for ubuntu-users@lists.ubuntu.com; Wed, 07 May 2008 11:41:11 +0100 Received: from windy by speutel.de with local (Exim 4.63) (envelope-from <stephan.windmueller@cs.uni-dortmund.de>) id 1Jth5A-0008OB-6F for ubuntu-users@lists.ubuntu.com; Wed, 07 May 2008 12:41:08 +0200 Date: Wed, 7 May 2008 12:41:08 +0200 From: Stephan =?iso-8859-1?Q?Windm=FCller?= <stephan.windmueller@cs.uni-dortmund.de> To: ubuntu-users@lists.ubuntu.com Subject: [Sparc] SILO is waiting for input after reboot Message-ID: <20080507104108.GB26204@speutel.de> MIME-Version: 1.0 User-Agent: Mutt/1.5.13 (2006-08-11) X-BeenThere: ubuntu-users@lists.ubuntu.com X-Mailman-Version: 2.1.8 Precedence: list Reply-To: "Ubuntu user technical support, not for general discussions" <ubuntu-users@lists.ubuntu.com> List-Id: "Ubuntu user technical support, not for general discussions" <ubuntu-users.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/listinfo/ubuntu-users>, <mailto:ubuntu-users-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/ubuntu-users> List-Post: <mailto:ubuntu-users@lists.ubuntu.com> List-Help: <mailto:ubuntu-users-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/ubuntu-users>, <mailto:ubuntu-users-request@lists.ubuntu.com?subject=subscribe> Content-Type: multipart/mixed; boundary="===============3919510491771163413==" Mime-version: 1.0 Sender: ubuntu-users-bounces@lists.ubuntu.com Errors-To: ubuntu-users-bounces@lists.ubuntu.com --===============3919510491771163413== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QKdGvSO+nmPlgiQ/" Content-Disposition: inline --QKdGvSO+nmPlgiQ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello! I just installed Ubuntu 7.10 (Server) on a T2000. After the installation the system did not boot properly until I set boot-device to "disk" and boot-command to "boot disk Linux" at the ok-prompt. Unfortunately this only works when I am doing a "reset" from ALOM. After running "reboot" in my Ubuntu installation, the boot-command is set to "boot" and the system stops at the SILO prompt. There I have to press Enter to boot the system. My question is: How do I configure the nvram or Ubuntu so I can reboot with the reboot-command? TIA Stephan --QKdGvSO+nmPlgiQ/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIIYdEi8rkj8W4fFURAtf3AJ9KcEVc4cmkWJQQQihG+d G8CLh16gCdGEWT 6KDJCWYC7LKu2s+TthWeCzI= =zoVN -----END PGP SIGNATURE----- --QKdGvSO+nmPlgiQ/-- --===============3919510491771163413== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ubuntu-users mailing list ubuntu-users@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users --===============3919510491771163413==-- |
| All times are GMT. The time now is 11:24 PM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.