Sysadmin

warning: Creating default object from empty value in /home1/adchen/public_html/modules/taxonomy/taxonomy.pages.inc on line 33.

Mac ZFS Tip #1: Avoid Prompts for the Admin Password when Writing to ZFS volumes

Avoid Prompts for the Admin Password when Writing to ZFS volumes

When you're creating zpools and ZFS volumes you have to be doing it with root privileges, so naturally any volume you create is going to be owned by root. So if you are trying to write to these volumes as your normal Mac login, it's going to prompt for the admin password every time.

The easy fix is just to make yourself the owner of that volume:


# chown -R UserName:GroupName /Volumes/myzpool

If you have multiple users, then use chmod to allow access to other users.

Flogging your Files

Why Grep When You can Flog?

As a UNIX sysadmin I find myself spending a significant amount of time sifting through log files with grep's, pipes and more grep's. A pretty typical scenario when sifting through log files is usually something like this:

% cat syslog |  grep "Jul 27"

[...hundreds of lines...]
LINE 1234: Jul 27 03:12:19 server2 sendmail[20573]: [ID 801593 mail.info] l6R7BUF0020573: host48-184.pppoe.inetcomm.ru did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
LINE 1235: Jul 27 03:12:19 server2 sendmail[20573]: [ID 801593 mail.info] l6R7BUF0020573: host48-184.pppoe.inetcomm.ru did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
LINE 1236: Jul 27 03:12:22 server2 sendmail[20574]: [ID 801593 mail.info] l6R7BYWq020574: host48-184.pppoe.inetcomm.ru did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
[...still more lines...]

That's usually followed by progressively tacking on more greps to whittle the output down to what I'm looking for:


% cat syslog |  grep "Jul 27" | grep -v 2006 | grep sendmail | grep l6R7BUF0020573
Jul 27 03:12:19 server2 sendmail[20573]: [ID 801593 mail.info] l6R7BUF0020573: host48-184.pppoe.inetcomm.ru did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

Syndicate content