Hot answers tagged

77 votes
Accepted

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

Use the query user command Query User Command http://technet.microsoft.com/en-us/library/bb490801.aspx
user avatar
  • 34.2k
49 votes

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

Open the Task-Manager and see the users tab. There you will find a list of users and their status.
user avatar
  • 6,748
25 votes

Where can I find data stored by a Windows Service running as "Local System Account"?

The destination is changing in time. On Windows 10: %systemroot%\ServiceProfiles E.g.: %systemroot%\ServiceProfiles\LocalService %systemroot%\ServiceProfiles\NetworkService However, the ...
user avatar
  • 351
23 votes
Accepted

Usermod -aG vs gpasswd -a as a best practice

They both can do the same, it's just with usermod you can do it wrong if you don't pay enough attention. In this wiki from Arch Linux (it is the same for other distros), it's explained: To add a ...
user avatar
  • 2,387
22 votes

User in Administrators group has not the same rights as Administrator (Win 2012 R2)

This could be caused by User Account Control, a feature (hated by many) which makes so that, even if you have administrative rights, you don't actually have them unless you explicitly request them. ...
user avatar
  • 68.4k
18 votes
Accepted

How to exclude some users from Linux Top screen?

The correct answer is: -U '!root' (or -u '!root' on some Ubuntus). This was introduced in top v3.2.9: man top for -U option: Prepending an exclamation point ('!') to the user id or name ...
user avatar
  • 360
16 votes

How to use update-alternatives per user

Yes, you can absolutely use update-alternatives for yourself. For example, I have different LLVM versions installed under ~/.local/llvm-VERSION. I can install binary links into ~/.local/bin (which is ...
user avatar
15 votes

List user's folder access permissions

This seems to do the trick (with perhaps a caveat), to find all folders that user "someuser" has access to, in this example on the C drive, using the built-in Windows icacls command: icacls c:\*. /...
12 votes
Accepted

Giving AD user accounts admin access on specific machines

Yes. You can add domain accounts to individual machines, and into whatever groups you want on individual machines as well. On a manual, one-off basis (for example, NET LOCALGROUP Administrators [...
user avatar
  • 53.3k
9 votes

"user is not in the sudoers file" despite user belonging to group wheel

The wheel entry in the sudoers file is commented out, so the group wheel has no sudo access at all. Remove the # from the line: %wheel ALL=(ALL) ALL
user avatar
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 ...
user avatar
  • 43.6k
8 votes

How do I share a Git repository with multiple users on a machine?

To aggregate the bits and pieces of good advice from the various other answers and comments about setting up a new repo: If you're setting up a brand new repo myrepo in /srv/git for the group mygroup,...
user avatar
8 votes

top is only showing current user processes

One possibility is /proc mounted with either hidepid=1 or hidepid=2. This mount option was added in latter Linux kernels and back ported sometime around CentOS 5.9 and 6.3. Mount options The ...
user avatar
  • 3,386
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 ...
user avatar
  • 71.3k
7 votes

List user's folder access permissions

You can use PowerShell without needing to download anything else. This will work with v2.0 and later: $ReferenceAccountName = 'DOMAIN\Username' [string[]]$SearchDirectories = @('X:\SomeDirectory', 'F:...
user avatar
  • 71
7 votes

using screen in another user with su

There is a better trick: su - user script /dev/null screen
user avatar
  • 341
7 votes

How to kick users from Windows Server 2012 R2

For the database you could issue these commands providing the accounts connecting to the database do not have db_owner privileges: ALTER DATABASE <dbname> SET OFFLINE WITH ROLLBACK IMMEDIATE; ...
user avatar
  • 1,935
7 votes
Accepted

How do I specify NetworkService or LocalService for a Windows Service on a Domain Controller?

Based on your final screenshot, you left out the space in the account name. Try Local Service instead. If that doesn't work, you can do it on the command line as shown here, I would write this as: ...
user avatar
6 votes

Show all users and their groups/vice versa

If you dont care about remote users such as LDAP or NIS, to list users and their associated groups in a simple way: cut -d: -f1 /etc/passwd | xargs groups Output; root : root myuser : root www-data ...
user avatar
6 votes

Where can I find data stored by a Windows Service running as "Local System Account"?

From a real process running as SYSTEM (S-1-5-18). GetUserName: SYSTEM User Sid: S-1-5-18 GetUserNameEx(NameFullyQualifiedDN): CN=HYDROGEN,CN=Computers,DC=stackoverflow,DC=com GetUserNameEx(...
user avatar
  • 5,121
6 votes
Accepted

"No input file specified." (I am stupid and deleted a user)

Where would I look to try to fix this set-up? At your backups.
user avatar
  • 424
6 votes

How to enable ssh access without public/private keys?

You need to add PasswordAuthentication yes to your config file in /etc/ssh/sshd_config Once you have that added, you'll need to reload your SSH daemon, using sudo systemctl restart ssh or ...
user avatar
5 votes

How to add a domain user to the local admin group remotely?

Another option - you can open up Local Users and Groups for the remote computer using this command: lusrmgr.msc /computer=computername
user avatar
5 votes

Adding an administrator user to SQL Server 2008

Since there was no complete answer for me for solving this Problem, here is what i did, for SQLServer 2014 Stop the SQL Server instance (Service Tab) Start the SQL Server instance (Service Tab, use ...
user avatar
  • 261
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
user avatar
5 votes

Restrict the user to access one folder only and deny all other folder in D: drive

On NTFS volumes, you can set security permissions on files and folders. These permissions grant or deny access to the files and folders. You can view security permissions for files and folders by ...
user avatar
  • 6,748
5 votes
Accepted

Find out if password expired or when it expires for user in a specific OU

Get AD Users Password Expiration Report from Specific OU: Import-Module ActiveDirectory Get-ADUser -SearchBase "OU=TestOU,DC=TestDomain,DC=Local" -filter {Enabled -eq $True -and PasswordNeverExpires ...
user avatar
5 votes
Accepted

How to kick users from Windows Server 2012 R2

You can prevent new user connection using firewall(do not forget to leave an exception for administrator). Than you can close RDP sessions using logoff or tskill commands Than you can close opened smb ...
user avatar
  • 3,255
5 votes
Accepted

How to create extra root user?

You can't. root is a special user with uid 0. Use sudo instead.
user avatar
  • 97k
4 votes

How to "jail" a ftp user inside its home directory (proftpd)?

The DefaultRoot line needs to be at the end of the configuration file.
user avatar

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