# Outstanding book on Unix system administration - a must have



## Nicola Mingotti (Nov 26, 2018)

Dear friends,

Today I walked at the Stanford library, lazy day. I found there the most beautiful book on system administration
I ever saw in my whole life. The title is "*Unix and Linux system administration handbook*", 5th edition.
By Evi Nemeth, G. Snyder, T. Hein, B. Whaley, D. Mackin.

If i had found this book 20 years ago it would have saved me a LOT of troubles and
hundreds of hours reading partialy reliable stuff on the web.

So, one word to people who is interested in managing Unix systems. Go buy it now.

It covers Linux and FreeBSD. 

Out of enthusiasm I told it to my cousin and he replied he owns the book since the first edition ....
so, I guess many of the more experienced people here already know about it. 

I want to go one step forward, this book is so powerful I guess in shoud be linked somwhere 
into the Handbook. 

bye
Nicola


----------



## ShelLuser (Nov 26, 2018)

Honestly? I am not impressed with this one.

Any book which doesn't even bother to dive into /bin/sh but instead advices people to change their shell to bash right away without any further arguments other than "because we told you so" really has little value to add to regular FreeBSD systems administration.

It's hardly outstanding within a FreeBSD context to advice new users to change their root shell into bash. That's just stupid. (page 340).

And sorry to say but I could go on, there is so much ill-advised stuff in this book it's not even funny anymore.  "MSA", the "Mail Submission Agent". Unsurprisingly enough even the free dictionary doesn't know anything about this:

https://acronyms.thefreedictionary.com/MSA

Now, don't get me wrong.. this acronym was already used in 2014, but it's not the norm which this book wants to make you believe. Heck: port 587 is most often used for an encrypted connection.

But don't you think it's weird how this book doesn't even explain what a MSA is actually supposed to be? The only thing they can show in their "Exhibit A" diagram is that an MSA is...  port 587? Bullshit!

```
peter@zefiris:~/updates# sockstat -4l |grep sendmail
root     sendmail   49509 4  tcp4   *:25                  *:*
root     sendmail   49509 6  tcp4   *:587                 *:*
root     sendmail   1252  4  tcp4   10.0.1.6:25           *:*
```
Wait a second: didn't that same diagram mark Sendmail as a MTA? What gives!

Then the chapter about computer security is really grinchy and plain out gives you bad advice!

For starters: no mention of sockstat(1) within their security chapter (only netstat). And they plain out got the pw command wrong:

```
freebsd$ sudo pw user mod trent -p 2017-09-25 -e 90
```
_Puhlease!_

```
root@psi:~ # pw user mod peter -p 2018-12-25 -e 90
pw: Invalid date
```

Look, if you enjoy this book then all the more power to you. I can definitely agree that it gives a nice general explanation of a Linux system and parts of that can be applied to FreeBSD as well.

But this book is hardly as outstanding as you want to make us believe, this goes double when taken within the context of FreeBSD (see example above). There is a ton of bad advice in there, and its source is easily identified: Linux favoritism.

This one really left me flabbergasted:



> Rsyslog is available for FreeBSD, and we recommend that you adopt it in preference to the standard FreeBSD syslog unless you have simple needs.


What. the. <censored>?!

Convenient advice if you consider that only one paragraph above they mentioned how rsyslogd is a standard on Linux. Is that recommendation really in our best interest or only to help make it easier to prevent more bad FreeBSD advices which this book has been feeding us?

Sorry, but I take some offense to nitwitted remarks like that. There is nothing "simple" about the default syslog daemon and anyone which makes it sound this way obviously doesn't have a clue what they are talking about.

Not to mention that this book doesn't bother at all to explain what major advantages this magical rsyslog has to offer us.

Once again: don't get me wrong... I'm not saying that rsyslog doesn't have any possible advantages, it does. But I *AM* saying that anyone who states that everyone would benefit from these advantages no questions asked in comparison to the default FreeBSD syslog daemon is a narrow minded Linux lunatic who didn't even bother to look into the capabilities of syslogd(8).

Seriously, if you enjoy this book then all the more power to you. But in my opinion it's by far the best book to get if you're interested in learning how to run FreeBSD. Some of their advice is honestly more likely going to harm than benefit you. Definitely don't blindly follow up on that.


----------



## Phishfry (Nov 26, 2018)

ShelLuser what are your real thoughts here? Let it rip.


----------



## Datapanic (Nov 26, 2018)

And it will "rip"


----------



## Nicola Mingotti (Nov 26, 2018)

ShelLuser said:


> Honestly? I am not impressed with this one.
> ....



Chapeaux ShelLuser, you red the book, i just skimmed it over.
I really appreciate you hilight some of the shortcomings.

But to me, just at first sight, I can' think of a single book that is nearly comparable
to this one as a compact summary of the Unix system from the point of view
of system administration. Expecially, from the point of view of somebody 
who does not know it all already. 

Do you know any comparable book ? 

With this book + Handbook + manpages I guess anybody 
has all tools to get started studying FreeBSD. (Or Linux if so inclined)

salut
n.


----------



## Nicola Mingotti (Nov 26, 2018)

I checked some of your statements,  here is what i found. 
Consider my book is new. 5th edition. Maybe you are talking of an old edition.



ShelLuser said:


> It's hardly outstanding within a FreeBSD context to advice new users to change their root shell into bash. That's just stupid. (page 340).


This does noe exist anymore, at page 340 now  topics are Drivers and kernel.
I do not agree with you on this point but that is another story. 



ShelLuser said:


> And sorry to say but I could go on, there is so much ill-advised stuff in this book it's not even funny anymore.  "MSA", the "Mail Submission Agent". Unsurprisingly enough even the free dictionary doesn't know anything about this:


Not really, check this , Wikipedia knows it. 



ShelLuser said:


> Now, don't get me wrong.. this acronym was already used in 2014, but it's not the norm which this book wants to make you believe. Heck: port 587 is most often used for an encrypted connection.
> 
> But don't you think it's weird how this book doesn't even explain what a MSA is actually supposed to be? The only thing they can show in their "Exhibit A" diagram is that an MSA is...  port 587? Bullshit!
> 
> ...


At page 597 there is written "Note that these functional divisions are somewhat abstract.
Real world mail systems break out these roles into somewhat different packages".
That is what you see, sendmali takes both ports. The description of MSA
on the book agrees with that of Wikipedia. 



ShelLuser said:


> Then the chapter about computer security is really grinchy and plain out gives you bad advice!


This is too generic, i can't check.



ShelLuser said:


> For starters: no mention of sockstat(1) within their security chapter (only netstat).


"sockstat" is never mentioned in the Handbook as well. 
(I use it and i like it. But i guess i discovered it here in the forum.)



ShelLuser said:


> And they plain out got the pw command wrong:
> 
> ```
> freebsd$ sudo pw user mod trent -p 2017-09-25 -e 90
> ...


This is the only true bug you found and it still persists in my edition. 
Indeed for format for the date is wrong it should be "dd-mm-yy[yy]", as man page says.
I would say this bug is really minor.



ShelLuser said:


> identified: Linux favoritism.


I can't check it, too generic, maybe after a few week i can tell.




ShelLuser said:


> Convenient advice if you consider that only one paragraph above they mentioned how rsyslogd is a standard on Linux. Is that recommendation really in our best interest or only to help make it easier to prevent more bad FreeBSD advices which this book has been feeding us?
> 
> Sorry, but I take some offense to nitwitted remarks like that. There is nothing "simple" about the default syslog daemon and anyone which makes it sound this way obviously doesn't have a clue what they are talking about.
> 
> Not to mention that this book doesn't bother at all to explain what major advantages this magical rsyslog has to offer us.


The book says: "rsyslog ... extends the capabilities of original syslog
but manitains backward API". If they reccomend it is personal taste, we are free to choose.
Anyhow looking at 
`cat /usr/ports/sysutils/rsyslog8/pkg-descr`
The message tone is the same the book pushes, rsyslog is syslog on steriods. 

good night
n.


----------



## twllnbrck (Nov 26, 2018)

What about Michael Lucas‘ 3rd ed. of „Absolute FreeBSD“? Isn‘t it a good starting point to dive into FreeBSD administration ?


----------



## drhowarddrfine (Nov 26, 2018)

Lanakus Yes.


----------



## scottro (Nov 26, 2018)

I think just about everyone will agree Mr. Lucas's book is good for both the novice and advanced user.  He makes the complex understandable, IMHO.


----------



## Nicola Mingotti (Nov 26, 2018)

Lanakus said:


> What about Michael Lucas‘ 3rd ed. of „Absolute FreeBSD“? Isn‘t it a good starting point to dive into FreeBSD administration ?



Yesterday I bought also last edition of Absolute Freebsd by Lucas. I skimmed through it, but I red his book on OpenBSD some time ago. They are very similar, mutatis mutandis.

Whils it is a good book, and very specific about FreeBSD, if you are novice, if you don't know well how e.g. DNS works, how the network works, how the whole thig is functioning then go for Nemeth book, hands down. I would read Lucas in a second phase. 

If you are really interested I can send the the picture of a few page of both on a the same topic. Contact me privately.


----------



## ShelLuser (Nov 26, 2018)

Nicola Mingotti said:


> Consider my book is new. 5th edition. Maybe you are talking of an old edition.


Also 5th edition, got it as a birthday gift earlier this year.

(About changing the root shell)



Nicola Mingotti said:


> This does noe exist anymore, at page 340 now  topics are Drivers and kernel.


Chapter 7.2, 'Shell basics'. I have drivers & kernel on page 540 (Chapter 11).

The problem is that advising people to always change their root shell into bash is a dumb suggestion for FreeBSD. It can work without incidents, but if you don't know what you're doing (which is why you'd read such a book I think) then it can cause a lot of problems. Especially on environments where /usr sits on a separate filesystem. Not to mention the question of why root would need an "easier" shell in the first place considering that it's bad practice to excessively use the account.

(regarding MSA)



Nicola Mingotti said:


> Not really, check this , Wikipedia knows it.
> 
> At page 597 there is written "Note that these functional divisions are somewhat abstract.
> Real world mail systems break out these roles into somewhat different packages".
> ...


Problem being that outgoing local mail on a Unix system is normally handled by the sendmail executable, not a daemon listening on port 587. The executable then provides said e-mail to the MTA which then further processes it.

Using port 587 to handle outgoing e-mail is seldomly done. Notice how the Wikipedia article can't give any examples of dedicated MSA's and has already been flagged as "_citation needed_"? Fact of the matter is that you'll hardly come across the term MSA, even when looking up MTA.

I can understand that a book wants to cover the topic, but there's not that much to cover since this abstraction doesn't really exist. Sendmail listens to port 587 but does so for incoming e-mail which is to be processed on an encrypted channel. A setting with Postfix doesn't even use port 587 at all.

My problem is that the book makes it look as if an MSA is always used, which is simply wrong. Usually it's simply the MTA handling the mail which got provided directly from the MUA.



Nicola Mingotti said:


> "sockstat" is never mentioned in the Handbook as well. (I use it and i like it. But i guess i discovered it here in the forum.)


Could be, but it is documented somewhere.

Still, my point is that a book which explains FreeBSD networking basics really can't ignore sockstat, and my criticism comes from the fact that on Linux netstat is normally used. Ergo: the authors approach FreeBSD as if it were Linux here, which is about the dumbest thing you can do.



Nicola Mingotti said:


> This is the only true bug you found and it still persists in my edition.
> Indeed for format for the date is wrong it should be "dd-mm-yy[yy]", as man page says.
> I would say this bug is really minor.


There's also the issue of breaking up the command even though the documentation only speaks of whole commands. It's not wrong perse because pw accepts this, but it's still bad practice considering how the documentation only uses whole commands; usermod, userdel, etc.

The reason why I deem this bad is because such a keyword would be something you'd use with apropos to look it up if you forgot about the pw command. Teaching people to split the command for no reason only makes that search a whole lot more difficult.



Nicola Mingotti said:


> The book says: "rsyslog ... extends the capabilities of original syslog
> but manitains backward API". If they reccomend it is personal taste, we are free to choose.
> Anyhow looking at
> `cat /usr/ports/sysutils/rsyslog8/pkg-descr`
> The message tone is the same the book pushes, rsyslog is syslog on steriods.


Sure, but does that make it a preferred option to learn all this stuff?

If you really want to teach people how to administrate FreeBSD then you should teach them everything syslogd can do (which is _a lot_) and then optionally refer them to other alternatives.

Which is basically my main gripe with the whole book: it's a good read to learn how to use Linux, but it's seriously bad when you try to apply this on a real Unix-like environment such as FreeBSD. Telling people "Don't use /bin/sh, install bash instead" and "Better replace syslogd with rsyslog right away" doesn't teach people anything useful about FreeBSD, all it does is trying to persuade them to treat FreeBSD as if it were Linux, and that can come to haunt you real quick.

This is why it's usually best not to try cover everything which this book is trying but only focus yourself on one specific topic. FreeBSD isn't Linux and vice versa, and trying to cover it like this won't work.


----------

