how to create readonly account in centos? - centos

I want to create an account with readonly permission on centos7
Even after googling, there is no way to create an account with readonly permission.
I wonder how to create an account with no write permission to file and only read permission.

Related

REASSIGN OWNED to IAM service account

I have an application with a Postgres CloudSQL instance where the tables were set up by a developer's IAM account. Thus they are owned by that IAM account, and I'd now like to set them so they are owned by a IAM service account instead. However, I'm having a hard time getting REASSIGN OWNED to work, just getting permission issues instead.
I found this somewhat similar documentation entry on how to reassign ownership by doing GRANT "user#domain" TO "serviceaccount#project.iam". However, as soon as I do this, the service account is no longer able to log in, getting FATAL: Cloud SQL IAM user authentication failed for user serviceaccount#project.iam. Revoking the grant allows login again, but I'm then unable to reassign ownership...
When testing on a separate instance, I did get the procedure to work between user accounts, and also from a service account to a user account, but not user account to service account.
Is there a either a way for a service account to be able to log in while GRANTed on the user account, or some other way to do ownership reassignments?

Public network access on Azure batch to be enabled

I have a Azure Batch which by mistake i made "Public network access" as denied. Is there a way to enable it.
You will need to create a new Batch account with public network access enabled. Please see the private Batch account documentation. If you mistakenly created that Batch account, you can delete it.

Can't remove OWNER access to a Google Cloud Storage object

I have a server that writes some data files to a Cloud Storage bucket, using a service account to which I have granted "Storage Object Creator" permissions for the bucket. I want that service account's permissions to be write-only.
The Storage Object Creator permission also allows read access, as far as I can tell, so I wanted to just remove the permission for the objects after they have been written. I thought I could use an ACL to do this, but it doesn't seem to work. If I use
gsutil acl get gs://bucket/object > acl.json
then edit acl.json to remove the OWNER permission for the service account, then use
gsutil acel set acl.json gs://bucket/object
to update the ACL, I find that nothing has changed; the OWNER permission is still there if I check the ACL again. The same thing happens if I try to remove the OWNER permission in the Cloud Console web interface.
Is there a way to remove that permission? Or another way to accomplish this?
You cannot remove the OWNER permissions for the service account that uploaded the object, from:
https://cloud.google.com/storage/docs/access-control/lists#bestpractices
The bucket or object owner always has OWNER permission of the bucket or object.
The owner of a bucket is the project owners group, and the owner of an object is either the user who uploaded the object, or the project owners group if the object was uploaded by an anonymous user.
When you apply a new ACL to a bucket or object, Cloud Storage respectively adds OWNER permission to the bucket or object owner if you omit the grants.
I have not tried this, but you could upload the objects using once service account (call it SA1), then rewrite the objects using a separate service account (call it SA2), and then delete the objects. SA1 will no longer be the owner, and therefore won't have read permissions. SA2 will continue to have both read and write permissions though, there is no way to prevent the owner of an object from reading it.
Renaming the object does the trick.
gsutil mv -p gs://bucket/object gs://bucket/object-renamed
gsutil mv -p gs://bucket/object-renamed gs://bucket/object
The renamer service account will become the object OWNER.

Package permissions of a single user in AEM 6.2

I have a user named readuser, I created from useradmin and I gave few read permissions on content for that user. Why I try to get the package of the user through ACLs, I'm getting the permissions of all users existing in my local.What it doing is basically packaging all the permissions under content of all users.
But I want permissions of only my readuser.
How do I get the permissions of readuser alone.
Thanks
Sharath

How to revoke permission of Windows Administrator user from DB2?

On IBM DB2 v.9 windows, when someone connect to database by Server\Administrator user
DB2 database will automatically accept and grant all the permissions to this user?
But, in some case environment Administrator of server does not need to see every data in the database. So how to prevent Administrator use connect to database?
On 9.5 and older this would not be possible because the account under which your instance runs is SYSADM. Also Administrator can reset at least local account passwords and gain access to them, making changing the instance owner account useless.
However on 9.7 and onwards the instance owner will not have access to the data anymore. One option is to upgrade to 9.7. Furthermore you can set up an AD account for the connections your applications use. Local Administrator is not necessarily able to change into those credentials.
Still, the Administrator ultimately has access to the (usually unencrypted) database files. You can mostly improve the administrative aspect of security.
Umm... For many times I try to revoke with this command but when I connect to database by Administrator account DB2 will automatic grant permission to Administrator again.
I will try again for make sure.
By default, DB2 databases are created with CONNECT authority granted to public. If you want to restrict some users from connecting, you need to do
GRANT CONNECT ON DATABASE TO <user1>, <user2>, ...
Then revoke the CONNECT authority from PUBLIC
REVOKE CONNECT ON DATABASE FROM PUBLIC
I don't think it's possible under normal circumstances simply because Administrator is in the sysadm group.
Options I can think of (but haven't tried) include:
Setting the sysadm group to something else ("db2 update dbm cfg using sysadm_group blah"). Check the docs for caveats and gotchas when doing this, as I'm sure there are some.
Stop using OS authentication. Use a different security plugin (8.2 and higher only). This would move the authentication, and thus groups, to a new location (say an LDAP server). Then you just don't add Administrator to the new location, and especially don't add Administrator to the sysadm group again.
On Windows, the database manager configuration parameter SYSADM_GROUP controls who has SYSADMauthority at the instance level. When SYSADM_GROUP is blank (as is the default on Windows), then DB2 defaults to using the Administrators group on the local machine.
To fix this, you can create a new group in Windows and then modify the value of SYSADM_GROUP to use this new group. Make sure that the ID that the DB2 Service runs under belongs to this new group. After making this change, members of the Administrators group will no longer have SYSADM authority.
As Kevin Beck states, you may also want to look at restricting CONNECT authority on databases, too, because by default the CONNECT privilege is granted to PUBLIC.