42 votes
Accepted

Is logging in as a shared user a bad habit?

Yes it is a bad habit. It relies on the basic assumption that nobody malicious is (or will be) around and that nobody makes mistakes. Having a shared account makes it trivial for things to happen ...
  • 1,210
28 votes

Creating a windows account only for share access

As the reply of joeqwerty is not clear, I want to put the steps in line. This works for Windows 7, 8, and 10 (I'm on 10), as well as Windows Server 2003, 2008, and 2012. Create the user (if you don't ...
  • 461
28 votes

How do I convince my company to invest in IT - domains, security, etc.?

This is not going to be an IT tech answer, but hopefully useful nonetheless. Speaking from years of experience, you will not be able to convince your boss to do everything differently. The primary ...
  • 40.3k
27 votes
Accepted

Crate a new, read-only user in postgres

Reference taken from this Article ! Script to Create Read-Only user: CREATE ROLE Read_Only_User WITH LOGIN PASSWORD 'Test1234' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION VALID UNTIL '...
  • 674
24 votes

What's the default superuser username/password for postgres after a new install?

In Windows, do the following (IMPORTANT: Use a Windows administrator account): After installation, open <PostgreSQL PATH>\data\pg_hba.conf. Modify these two lines, and change "md5" to "trust": ...
18 votes

How do I convince my company to invest in IT - domains, security, etc.?

You need to focus on how it helps them, not on what you "want." we have coped for years without an issue And you don't want to start now! There have been a number of data breaches lately, ...
17 votes
Accepted

How to apply PostgreSQL "GRANT ALL ON ALL TABLES" to new tables?

A posible solution is to alter default privileges for u user: Eg: alter default privileges in schema public grant all on tables to u; alter default privileges in schema public grant all on sequences ...
16 votes

How can I rename a Unix user?

NOTE: don't try this if your directory is encrypted! If this is your case you might want to check first: https://askubuntu.com/questions/107410/can-you-unencrypt-remove-encryption-from-a-user-home-...
  • 261
15 votes
Accepted

Get login name using email address with Powershell

You can easily accomplish this using: Get-ADUser -Filter {Emailaddress -eq 'Test@email.com'}
  • 5,557
13 votes

How do I access the list of currently logged on users through Terminal Services Manager in Windows Server 2012?

Just open the Users tab in Task Manager. You'll get a full list of user sessions, their states, and running processes. Also you can log them off through the right-click menu. It seems this is the ...
  • 131
13 votes

PowerShell - Limit the search to only one OU

The easiest way to limit the search to one OU is using SearchScope: Get-ADUser -Filter {(Enabled -eq $false)} -SearchScope OneLevel -SearchBase "ou=FirstOU,dc=domain,dc=com"
12 votes

Why might the Jenkins user not have permission to access the Docker unix socket?

I think giving jenkins group privileges to docker unix socket solves the issue. This can be modified with configuring docker daemon startup options in configuration file by adding this line ...
  • 241
11 votes
Accepted

Centos 7 - adding a user to sudoers group - still is not in the sudoers file - why?

My experience is that 'user' needs to log out and in again. Try the 'id' command to see if the system thinks that 'user' is in the wheel group or not.
10 votes

GRANT SELECT to all tables in postgresql

I ended up doing this, and it worked: ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO PUBLIC;
  • 201
10 votes
Accepted

Reset GID/UID auto-increment numbers

According to the man page (http://linux.die.net/man/8/useradd): UID_MAX (number), UID_MIN (number) Range of user IDs used for the creation of regular users by useradd or newusers. I'm pretty ...
  • 161
9 votes
Accepted

"Get-AdComputer -filter" doesnt return anything when looking for Vista Clients

That T in "VistaT" is no T at all - it represents a trademark symbol: ™ (U+2122 or #8482 in Unicode) Try this: Get-Computers -OperatingSystem $("Windows Vista" + [char]8482 + " Business") Why ...
9 votes

How do I convince my company to invest in IT - domains, security, etc.?

The answer to "how PCI compliant" you are is Not Very (edited based on a comment). Your CC terminals might be okay if the tills themselves don't hold any data. Now to pick apart the "not worth it" ...
  • 2,242
9 votes

How to create extra root user?

Premise: using sudo (as suggested by the accepted answer) probably is the correct solution at your problem. That said, if you really need something resembling a second root account, you can create an ...
8 votes
Accepted

Powershell arrays and comparissons

The problem comes with your Format-Table :) $allusers= get-aduser -Filter {Enabled -eq $true} | FT samAccountName $allusers | gm TypeName : Microsoft.PowerShell.Commands.Internal.Format....
8 votes

Easy way to get all user accounts

How to list all users and groups depends on how authentication is configured. The most basic are the /etc/passwd and /etc/group files used for local authentication. Using those files is ...
  • 72.6k
7 votes

useradd with 755 permissions

I know its a quite old post, however: useradd -K UMASK=0077
7 votes

FTP Error 530, User cannot log in, home directory inaccessible

I just hit this issue and for anyone googling the error would like to add the solution that worked on Windows Server 2012 IIS 8.0. It was very simple in the end you have to create a LocalUser folder ...
7 votes

How do I convince my company to invest in IT - domains, security, etc.?

Here are my thoughts: Management very rarely understands technology and its place in business. Most times, management has misconceptions about what technology is and how it affects business. Yes, ...
  • 1,606
7 votes

Is logging in as a shared user a bad habit?

To start with this doesn't shock me, and I work in an extremely secured environment. Everyone has his own user and machine and ssh key, and for working on a server we ssh in, as root or as another ...
  • 3,507
7 votes
Accepted

Is there some way a user with an asterisk as password in /etc/shadow but a correct login shell in /etc/passwd would be able to login via SSH?

A * in the location of the hashed password in /etc/shadow effectively disables all password based logins as no user input will ever result in a hash value of *. But the user can still login with his/...
  • 72.6k
6 votes
Accepted

How does google compute engine create users and how to disable them?

You can prevent a GCE instance from adding accounts by ensuring the google-account-manager service does not run. On CoreOS you can stop this service with sudo systemctl stop google-accounts-manager....
  • 338
6 votes

How does google compute engine create users and how to disable them?

As of March 2017 you can prevent the accounts from being created by disabling the Accounts daemon, that is deployed on all images in GCE. To do that: Create /etc/default/instance_configs.cfg....
  • 1,191
6 votes

What is the minimum annual overhead required to admin an On-Premises Exchange Server

A data point. I manage about 24 Exchange servers for customers now, and spend about 2 hours per month on mail-related issues which may include SSL certificates, user management, managing the ...
  • 195k
5 votes

What's the best way to see logged in users in Windows Server 2012?

"quser" command will give you the active now users the same result will give you the "qwinsta" command
5 votes
Accepted

Is there a way to have puppet create a user's home folder (managehome) but not delete when ensure is 'absent'?

There are a few ways to handle this, you could simply use your ternary check directly in the user declaration like so: user { $user: ensure => $ensure, managehome => $ensure ? { present ...
  • 200

Only top scored, non community-wiki answers of a minimum length are eligible