Hi Guys,
I'm having troubles getting Samba to autostart from within a jail. I'll provide you with the following info:
My host rc.conf file:
My host sysctl.conf file
Created a jail using the following method:
- Untar base.txz in to /root/jails/docs/;
- Chroot into the /root/jails/docs/ folder;
- Use sysinstall to update timezone settings and stuff;
- Updated rooted rc.conf, resolv.conf;
- Installed Bash into the rooted environment;
- Installed Samba into the rooted environment.
For the jail the rc.conf looks like:
The problem is when is restart the jail, Samba isn't started. I tried
from within the jail right after it restarted:
It shows:
.
Next I run
from within the jail, just to be sure. It outputs the following:
And the command
shows:
No traces of Samba unfortunately.
After these checks i'm starting Samba manually using:
When i check the status of Samba afterwards I see:
After manually starting Samba from within the jail I am able to connect to the server via IP address. Still, I want the server to autostart and nmbd working.
I can also provice the jail log file from the hosts' end, located at:
It contains the following:
Can anyone point me in the right direction here? Basically what i want to accomplish:
- Have jail with a Samba server in it;
- Have the Samba server start automatically and properly after a host1/jail reboot.
Tia!
Niels
I'm having troubles getting Samba to autostart from within a jail. I'll provide you with the following info:
My host rc.conf file:
Code:
hostname="area50.hilderink"
ifconfig_ale0=" inet 192.168.0.50 netmask 255.255.255.0"
defaultrouter="192.168.0.1"
ifconfig_ale0_alias0="192.168.0.51 netmask 255.255.255.0"
syslogd_flags="-b 192.168.0.50"
sshd_enable="YES"
zfs_enable="YES"
jail_enable="YES"
jail_list="docs"
jail_set_hostname_allow="NO"
jail_docs_rootdir="/root/jails/docs/"
jail_docs_hostname="docs.area50.hilderink"
jail_docs_ip="192.168.0.51"
jail_docs_exec_start="/usr/local/bin/bash /etc/rc"
jail_docs_devfs_enable="YES"
jail_docs_devfs_ruleset="devfsrules_jail"
jail_docs_mount_enable="YES"
My host sysctl.conf file
Code:
security.jail.allow_raw_sockets=1
Created a jail using the following method:
- Untar base.txz in to /root/jails/docs/;
- Chroot into the /root/jails/docs/ folder;
- Use sysinstall to update timezone settings and stuff;
- Updated rooted rc.conf, resolv.conf;
- Installed Bash into the rooted environment;
- Installed Samba into the rooted environment.
For the jail the rc.conf looks like:
Code:
network_interfaces=""
samba_enable="YES"
sshd_enable="YES"
syslogd_flags="-b 192.168.0.51"
The problem is when is restart the jail, Samba isn't started. I tried
Code:
ps -aux
It shows:
Code:
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 4824 0.0 0.0 12184 1404 ?? SsJ 11:56AM 0:00.00 /usr/sbin/syslog
root 4935 0.0 0.1 46876 3752 ?? SsJ 11:56AM 0:00.00 /usr/sbin/sshd
root 4942 0.0 0.1 20380 3308 ?? SsJ 11:56AM 0:00.00 sendmail: accept
smmsp 4946 0.0 0.1 20380 3228 ?? IsJ 11:56AM 0:00.00 sendmail: Queue
root 4952 0.0 0.0 14260 1396 ?? IsJ 11:56AM 0:00.00 /usr/sbin/cron -
root 4977 0.0 0.1 68016 4236 ?? SsJ 11:56AM 0:00.02 sshd: niels [pri
niels 4980 0.0 0.1 68016 4240 ?? SJ 11:56AM 0:00.00 sshd: niels@pts/
niels 4981 0.0 0.1 17580 2404 1 SsJ 11:56AM 0:00.00 -bash (bash)
root 4982 0.0 0.0 41304 1712 1 SJ 11:56AM 0:00.00 su
root 4983 0.0 0.1 17580 2372 1 SJ 11:56AM 0:00.00 su (bash)
root 4985 0.0 0.0 14328 1120 1 R+J 11:56AM 0:00.00 ps -aux
Next I run
Code:
sockstat -4
Code:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS
niels sshd 4980 3 tcp4 192.168.0.51:22 192.168.0.15:51144
root sshd 4977 3 tcp4 192.168.0.51:22 192.168.0.15:51144
root sendmail 4942 3 tcp4 192.168.0.51:25 *:*
root sshd 4935 3 tcp4 192.168.0.51:22 *:*
root syslogd 4824 6 udp4 192.168.0.51:514 *:*
And the command
Code:
service samba status
Code:
nmbd is not running.
smbd is not running.
After these checks i'm starting Samba manually using:
Code:
service samba start
When i check the status of Samba afterwards I see:
Code:
nmbd is not running.
smbd is running as pid 5492.
After manually starting Samba from within the jail I am able to connect to the server via IP address. Still, I want the server to autostart and nmbd working.
I can also provice the jail log file from the hosts' end, located at:
Code:
/var/log/jail_docs_console.log
It contains the following:
Code:
stty: stdin isn't a terminal
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
32-bit compatibility ldconfig path: /usr/lib32
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp (X related).
/etc/rc: ERROR: USAGE: load_rc_config name
Updating motd:.
/etc/rc.d/nscd: line 43: setvar: command not found
/etc/rc.d/nscd: line 43: setvar: command not found
/etc/rc.d/nscd: line 43: setvar: command not found
Starting sshd.
Starting cron.
Can anyone point me in the right direction here? Basically what i want to accomplish:
- Have jail with a Samba server in it;
- Have the Samba server start automatically and properly after a host1/jail reboot.
Tia!
Niels