Ubuntu PATH gets auto reset please help

Hi Team

I have recently installed one Ubuntu 16.04 LTS server edition , after creating a user with useradd command it is not creating default home directory for user. I am creating with user add -d option.

Also I am copying /etc/skel contents to newly created users home directory.
My issue is that .Profile file or .bashrc in users home dont save user PATH permanently.
It gets reset after logout. Every time user has to export PATH. So please suggest me how to resolve this error.

Thanks in advance

1 Like

Use adduser command in Ubuntu to create a user.


My friend had the same problem. Unfortunately, I did not help him, because I do not understand it very well.

You can put it in Init script so it will be automatically initialized even after the reset.
It’s a momentary solution bt I think it will work.