De acordo com man chfn
, você deve conseguir controlar o acesso aos campos de dados do GECOS usando a configuração CHFN_RESTRICT
em login.defs
CONFIGURATION
The following configuration variables in /etc/login.defs change the
behavior of this tool:
CHFN_RESTRICT (string)
This parameter specifies which values in the gecos field of the
/etc/passwd file may be changed by regular users using the chfn
program. It can be any combination of letters f, r, w, h, for Full
name, Room number, Work phone, and Home phone, respectively. For
backward compatibility, yes is equivalent to rwh and no is
equivalent to frwh. If not specified, only the superuser can make
any changes. The most restrictive setting is better achieved by not
installing chfn SUID.