Shell File Changes not Persistent
-
Hi,
When making changes in the shell as root and using vi, the changes remain active for the currently running session only. As soon as you reboot the box the changes are all gone.
An example:
- I added a new user through the webUI
- I logged in via SSH and made a change to the .tcshrc of this new user (I added a line to show the console menu when you log in as this user)
- Everything was working 100%
- After a reboot the line I added to the file was no longer there and the file reverted to its original version
Another example:
- I added the new user to the wheel group
- Everything was working 100% as expected
- After a reboot the user is no longer in the wheel group
Is this expected behaviour? How can I make these changes survive reboots?
Werner
-
In pfSense all users are recreated from the config at everyboot so many changes of that type are lost.
You might try this: https://forum.netgate.com/post/1020967
Steve
-
@stephenw10 I had a look at the post you linked to and that is exactly what I mean... @jimp suggested editing either .profile or .tschrc and adding the line to it.
If you do this then the changes only last during the current session. Everything is reset after reboot.
You mentioned that all users are recreated after every boot... does that mean you won't ever be able to make persistent file changes for a user unless you edit the actual scripts that recreate the users during boot? -
If you want the changes to be present for everyone, you can edit them into
/etc/skel/dot.<blah>
where<blah>
isprofile
,shrc
, ortcshrc
.