41
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 ...
33
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 ...
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 '...
11
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;
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.
11
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 ...
10
votes
systemd, per-user cpu and/or memory limits
Starting with systemd v239, you can use drop-ins
https://github.com/systemd/systemd/commit/5396624506e155c4bc10c0ee65b939600860ab67
# mkdir -p /etc/systemd/system/user-.slice.d
# cat > /etc/...
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 ...
7
votes
7
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....
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/...
7
votes
Accepted
pg_hba.conf - psql local login without password
local all all md5
local all postgres trust # ident
Remember that the entries in pg_hba are processed in the order they given.
"local all postgres trust" ... should ...
6
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 ...
6
votes
Is using the AD home directory attribute to map the home drive really no longer a best practice?
The HomeDrive attribute is not deprecated and will probably not ever be removed. The reason it's popular is because it was the first attribute that removed the requirement of using logon scripts to ...
6
votes
GRANT SELECT to all tables in postgresql
I ended up here because my DB user saw only a few tables and not the newer ones. If this is your case, this has helped me.
Grant privileges to all existing tables:
GRANT SELECT ON ALL TABLES IN ...
6
votes
Unable to get the SSH access for a new user
On Ubuntu 18.04 I had simply neglected to add my client's public key to the authorized keys file (this post got me thinking about the authorized_keys file: https://superuser.com/a/1337741/413936).
...
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 ...
6
votes
Removing install user with Packer
I found another way that works with packer 1.7 for QEMU, VMware, and VirtualBox. You can remove the user in the shutdown command. This method assumes the user has sudo access.
shutdown_command = &...
6
votes
Accepted
systemd, per-user cpu and/or memory limits
UPD: I'll keep my solution for the sake of history, but systemctl set-property should be called at login time, using pam_exec, see https://github.com/hashbang/shell-etc/pull/183. In this approach, ...
6
votes
Accepted
How to su non-interactively?
You could either use the echo :
echo <otherpwd> | su - otheruser -c "my command line"
or expect:
expect -c 'spawn su - otheruser -c "my command line"; expect "Password :"; send "<otherpwd&...
6
votes
Setting a Windows Non-Interactive User Account
With a Group Policy.
Go to Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment and put your user account into the "Deny log on Locally" and "...
5
votes
Unable to get the SSH access for a new user
Stumble to this thread after create a new user and cannot SSH to the new user.
I managed to fix it after looked for the group and user of .ssh folder and authorized_keys file. They were set to root:...
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
Removing install user with Packer
I realize this is a rather old question, but I didn't like the idea of using a cronjob (or cloud-init, or anything that happens after the image would be instantiated) for this, and found what I find ...
5
votes
Accepted
How to create extra root user?
You can't. root is a special user with uid 0. Use sudo instead.
5
votes
Accepted
What are my options in terms of controlling document management
It's called backups, and VSS/Previous Versions. If needed, implement an actual document management system with versioning and auditing.
4
votes
Best way to find the computer a user last logged on from?
ThatGraemeGuy, thanks for excellent script! I had to rewrite it in PowerShell, but it still works.
$CompDN = "(&(objectCategory=computer)(objectClass=computer)(cn=$env:COMPUTERNAME))"
$strCompDN =...
4
votes
What's the best way to see logged in users in Windows Server 2012?
Get-WMIObject -class Win32_ComputerSystem -ComputerName 192.168.1.9 | Select-Object UserName
where 192.168.1.9 is the IP of the server
4
votes
How to change user to root in an SFTP client?
It's not completely true that you cannot change the user with SFTP.
For example, even if you are connecting to the common OpenSSH server, you can instruct it to run the SFTP subsystem/server with ...
4
votes
How do I log every command executed by a user?
A lesser known trick, but easily the most awesome is just to use the built-in audit capabilities of sudo. Sudo ships with a sudoreplay command that makes replaying sessions easy. It will even relay ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
user-management × 662linux × 160
active-directory × 107
windows × 61
user-accounts × 51
ubuntu × 45
security × 44
permissions × 41
windows-server-2008 × 38
ssh × 36
ldap × 35
user-permissions × 31
users × 26
debian × 24
groups × 24
centos × 19
windows-server-2003 × 19
group-policy × 18
powershell × 17
unix × 16
puppet × 16
ftp × 15
password × 13
windows-server-2008-r2 × 12
openldap × 12