3 liens privés
Test if user is not able to open a shell or login
Petite commande pour savoir si un user a accès à un répertoire.
sudo -u www-data ls /home/user
Consommation mémoire par user (RSS resident). Remplacer par $5 pour avoir la taille virtuelle.
for USER in $(ps haux | awk '{print $1}' | sort -u); do ps haux | awk -v user=$USER '$1 ~ user { sum += $6} END { print user " \t" sum" ko" "\t" sum/1024" Mo" "\t"sum/1024/1024" Go"; }' ; done
apache user, group and directories
f only one user is responsible for maintaining the site, set them as the user owner on the website directory and give the user full rwx permissions. Apache still needs access so that it can serve the files, so set www-data as the group owner and give the group r-x permissions.
chown -R eve contoso.com
chgrp -R www-data contoso.com
chmod -R 750 contoso.com
chmod g+s contoso.com
ls -l
drwxr-s--- 2 eve www-data 4096 Feb 5 22:52 contoso.com
If you have folders that need to be writable by Apache, you can just modify the permission values for the group owner so that www-data has write access.
chmod g+w uploads
ls -l
drwxrws--- 2 eve www-data 4096 Feb 5 22:52 uploads
CREATE USER test IDENTIFIED BY test;
GRANT CONNECT,RESOURCE TO test;
GRANT CREATE SESSION TO test;
GRANT UNLIMITED TABLESPACE TO test;
Supprimer l'expiration de password Oracle pour les bases de dev
SELECT PROFILE FROM dba_users WHERE username = 'SCOTT';
SELECT LIMIT FROM DBA_PROFILES WHERE PROFILE='DEFAULT' AND RESOURCE_NAME='PASSWORD_LIFE_TIME';
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
SELECT ACCOUNT_STATUS FROM DBA_USERS WHERE USERNAME='SCOTT';
et aussi :
alter user <username> identified by <password>;