inetadm – changing service properties

Today I’ve met a problem which I easily solved with the help of inetadm, and here’s the entry explaining what happened.

When trying to FTP some files off my laptop, I’ve noticed FTP client failing to parse the ls -l output due to Russian weekdays used in listing. It was obvious that such FTP daemon behavior was due to one of its options, which specifically made sure the daemon inherited all the environment variables. Luckily such a behavior was easy to change with inetadm:

To list all the options of a given service, use a command similar to this:

solaris# inetadm -l svc:/network/ftp:default
SCOPE    NAME=VALUE
name="ftp"
endpoint_type="stream"
proto="tcp6"
isrpc=FALSE
wait=FALSE
exec="/usr/sbin/in.ftpd -a"
user="root"
default  bind_addr=""
default  bind_fail_max=-1
default  bind_fail_interval=-1
default  max_con_rate=-1
default  max_copies=-1
default  con_rate_offline=-1
default  failrate_cnt=40
default  failrate_interval=60
default  inherit_env=TRUE
default  tcp_trace=FALSE
default  tcp_wrappers=FALSE

As you can see, there was an inherit_env variable, set to TRUE by default. All I had to do was to switch it off:

solaris# inetadm -m svc:/network/ftp:default inherit_env=FALSE

After this FTP daemon has stopped inheriting environment variables, and, accordingly, switched to using C (English) locale for displaying weekdays in ls listings.

Using similar command line, you can alter any options of any service which is under inetadm control.

Trackbacks

  1. […] inetadm – changing service properties […]

  2. […] inetadm – changing service properties […]

Speak Your Mind

*