$ getent passwd pauld pauld:x:1987:1987:Paul Daniels:/home/pauld:/bin/bashSo after you have made your changes in the server, let's say you want to change pauld's gid to 4000, run the above command again:
$ getent passwd pauld pauld:x:1987:1987:Paul Daniels:/home/pauld:/bin/bashStill the changes are not being reflected there. To solve this, simply restart nscd:
$ sudo /etc/init.d/nscd restart Stopping nscd: [ OK ] Starting nscd: [ OK ]
You should be seeing your change is now updated in the user database:
$ getent passwd pauld pauld:x:1987:4000:Paul Daniels:/home/pauld:/bin/bash
PS: If for some reason you are still not seeing the new data, you can invalidate the nscd database by:
$ sudo nscd --invalidate=passwd
where passwd is the name of the table name in nscd database. You can see all available table name in /var/db/nscd
To look into what is the content of each table, please use strings command:
$ sudo strings /var/db/nscd/passwd
No comments:
Post a Comment