Posts Tagged ‘permissions’

Each user on a unix system is assigned a user id, or uid. You can see your uid by running ‘id -u’. root will have a uid of zero. So to check if the user running a script is root, you can simply check that id -u is equal to zero, like so: if [ […]

If you’re getting a FATAL: Ident authentication failed for user [username] Error when attempting to connect to postgres as a specific user, chances are you need to change some security settings. Postgresql, by default, only allows you to connect to postgres if the postgres username is the same as your username on the operating system. […]