# PXE login



## balanga (Aug 15, 2015)

I'm trying to set up a FreeBSD PXE Server and have got as far as getting a system booting up remotely from it. After booting up I am presented with a BSDINSTALL menu where the options are <Install> <Shell> <Live CD>.

If I select Live CD I am presented with a Login prompt. How do I determine the correct Login/password?

And how do I specify what program is run when FreeBSD boots up?


----------



## tingo (Aug 17, 2015)

Doesn't login as root (no password) work?


----------



## balanga (Aug 28, 2015)

The FreeBSD Handbook says it does,  but that doesn't work for me.


----------



## cpm@ (Aug 28, 2015)

balanga said:


> And how do I specify what program is run when FreeBSD boots up?


See rc.conf(5) man page.



> The FreeBSD Handbook says it does,  but that doesn't work for me.


Are you completely sure? Please, be more verbose and try to provide more details.

https://www.freebsd.org/doc/handbook/using-live-cd.html


----------



## balanga (Aug 28, 2015)

cpm said:


> See rc.conf(5) man page.



What I  was looking for was to see how *BSDINSTALL* was invoked when FreeBSD started up. I didn't see anything in rc.conf(5) which shed any light on that.



> Are you completely sure? Please, be more verbose and try to provide more details.
> 
> https://www.freebsd.org/doc/handbook/using-live-cd.html



I had read that previously, that's why I didn't understand why it wouldn't work.

I have now upgraded the PXE image to *FreeBSD 10.2-RELEASE*

Now I get the following msgs when I try and login as 'root' - they didn't occur previously.


```
login: root
Aug 28 11:10:53   login: in openpam_load_file(): /etc/pam.d/login: Permission denied
Aug 28 11:10:53   login: pam_start(): system error
```

I can only assume the some permissions on the PXE image are incorrectly set or that root login is disabled...


----------



## cpm@ (Aug 28, 2015)

Check out bsdinstall(8) man page and the BSDInstall wiki.


```
login: root
Aug 28 11:10:53 login: in openpam_load_file(): /etc/pam.d/login: Permission denied
Aug 28 11:10:53 login: pam_start(): system error
```
Did you see anything suspicious in /var/log/messages?


----------



## balanga (Aug 28, 2015)

cpm said:


> Check out bsdinstall(8) man page and the BSDInstall wiki.
> 
> 
> ```
> ...



If I'm logging in to a PXE booted system, I'm not sure where any logging is held... There is nothing in /var/log/messages on the PXE server, although I don't know if any logging should be done to /tftpboot/var/log... Maybe I don't have the permissions set correctly on '/tftpboot'.


----------



## cpm@ (Aug 28, 2015)

Try `chmod 755 /etc/pam.d`

Furthermore you can try to reinstall the world and merge the pam(3) configuration in /etc/pam.d. You can check the pam modules '.so' also in /usr/lib/pam_*.so


----------



## balanga (Aug 29, 2015)

cpm said:


> Try `chmod 755 /etc/pam.d`
> 
> Furthermore you can try to reinstall the world and merge the pam(3) configuration in /etc/pam.d. You can check the pam modules '.so' also in /usr/lib/pam_*.so



I expected to be able to login as per handbook using the Live CD option, without having to mess around with the system. If the handbook is correct then I must have installed the PXE distribution incorrectly..


----------

