I have seen the Windows Agent can be deployed and insert an encrypted password into the agent config file. See here https://github.com/OCSInventory-NG/WindowsAgent/blob/master/OPTIONS.TXT
In the Unix agent, how can we do this? I tried to build the agent with the latest build and use the scripted installation:
env PERL_AUTOINSTALL=1 perl Makefile.PL && make && make install && perl postinst.pl --nowizard --server=https://server/ocsinventory --user=user --password=pasword --realm=realm --logfile=/var/log/ocsinventory-client/ocsinventory-agent.log --now --crontab
Doing this inserts the password as cleartext in the agent config file.