1. Goal
Isolate application processes with dedicated accounts without interactive shells or unnecessary privileges.
2. Files and components involved
/etc/passwd
/etc/group
/sbin/nologin
/srv/app
3. Operational flow
groupadd appsvc
useradd -r -g appsvc -d /srv/app -s /sbin/nologin appsvc
mkdir -p /srv/app
chown -R appsvc:appsvc /srv/app
4. Operational verification
getent passwd appsvc
ls -ld /srv/app
ps -o user,group,cmd -u appsvc
5. Practical notes
Document every persistent change and keep a copy of the original files, especially when working on remote servers.
Operational procedures matter as much as commands: if they are not repeatable and documented, you will waste time on the next intervention.
Quick checklist
[ ] Backup or copy of the existing configuration completed
[ ] Files and commands updated as expected
[ ] Local test completed successfully
[ ] Logs or final output verified
[ ] Rollback procedure documented