parsed.org

Tips by tag: user

Adding a Database and a User by xinu on Dec 18, 2005 01:43 PM

To create a Postgres user sam and a database samdb that is owned by the sam user:

$ su - postgres
$ createuser -P -A -D sam
$ createdb -O sam samdb

(Change the -A, and -D options to affect the new user's abilities.)

Edit the user's password with:

template1=# alter user username_here with password 'password_here';
accountcommandscreatedbcreateuserpermissionspostgresqluser
Find the Hog by xinu on Sep 10, 2005 12:00 AM

If you need to find the process hogging your CPU, try this:

$ ps aux | awk '!/root|nobody/ { if ($4>2) {print $2}}'
awkcpuownerpipeprocessrootshelluser
RSS