149

Under Linux, the usermod command changes user names. It modifies the system account files to reflect the changes that are specified on the command line. To change just the username: usermod --login new_username old_username To change the username and home directory name: usermod --login new_username --move-home --home path_to_the_new_home_dir ...


115

Also you can use mkhomedir_helper Usage: /sbin/mkhomedir_helper <username> [<umask> [<skeldir>]]


70

Use the query user command Query User Command http://technet.microsoft.com/en-us/library/bb490801.aspx


47

You can use qwinsta from the command line to display the current RDP sessions. qwinsta /server:computer01 SESSIONNAME USERNAME ID STATE TYPE DEVICE console 0 Conn wdcon rdp-tcp 65536 Listen rdpwd administrator 2 Disc ...


42

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 without accountability and without any limit - a user breaking something breaks it for everyone. If the reason for this uid-sharing scheme is simply to reduce the ...


41

Open the Task-Manager and see the users tab. There you will find a list of users and their status.


37

One central component of Active Directory is LDAP, which is available on Linux in the form of OpenLDAP and 389DS (and some others). Also, the other major component Kerberos is available in the form of MIT Kerberos and Heimdal. Finally, you can even connect your machines to AD.


31

Yep, tsadmin is gone. Kinda' sucks. There's RDMS through Server Manager and the Remote Desktop Powershell cmdlets (get-command *RD*), but those both require that a full Remote Desktop Services deployment exist on that server. Those don't work on servers without RDS deployments or on workstations. You can use Task Manager... or, if you want something ...


28

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 reason for this is that he is the boss while you are just his subordinate. You are in the wrong position to push fundamental changes. Can you live with the ...


27

Apparently you can add /Y and the shell knows to interpret that as supplying a default answer of "yes" to the prompt. net user MyUser MyPasswordIsReallyLong /ADD /Y


26

You can try with puppet for managing user: Why Use Puppet to Manage User Accounts? (and not NIS, LDAP, etc) One of the benefits to managing user accounts in puppet is the fact that it is decentralized. Each user account is just a normal user account on the managed server. There is nothing special about the user accounts puppet creates other than the fact ...


26

The GECOS field in /etc/password can be modified with the chfn(1) command. chfn -f "Joe Blow" jblow


23

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 'infinity'; Assign permission to this read only user: GRANT CONNECT ON DATABASE YourDatabaseName TO Read_Only_User; GRANT USAGE ON SCHEMA public TO ...


22

Using Puppet virtual resources is the right way to do it - but if you can't change the user definitions and need a workaround fix meanwhile, the following is horrible and hacky, but will work: exec { 'foo somegroup membership': unless => '/bin/grep -q "somegroup\\S*foo" /etc/group', command => '/sbin/usermod -aG somegroup foo', require => ...


21

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": host all all 127.0.0.1/32 md5 host all all ::1/128 md5 Restart the PostgreSQL ...


21

Best solution: A security guard escort the person out... Second best solution: First, check the session number with qwinsta: QWINSTA /server:computername Write down the session ID. Then use the logoff command: LOGOFF sessionID /server:computername. C:\>qwinsta /? Display information about Remote Desktop Sessions. QUERY SESSION [sessionname | username ...


19

You will need to create the users directory manually. This requires three steps: Create directory in compliance to /etc/passwd, usually there will be already a /home/login entry. Copy initial files from /etc/skel And finally set right permissions: mkdir /home/YOU cd /home/YOU cp -r /etc/skel/. . chown -R YOU.YOURGROUP . chmod -R go=u,go-w . chmod go= . ...


19

man had the answer I missed before: grpconv http://linux.die.net/man/8/grpconv: The grpconv command creates gshadow from group and an optionally existing gshadow.


19

I don't think anybody uses NIS anymore - or at least, wants to. The fastest and easiest way to get a nice LDAP+Kerberos environment up is FreeIPA. It's easy and light enough that I even use it at home. Red Hat's Identity Management Guide is a great introduction to FreeIPA and will get you up and running quickly. Note that while Ubuntu has FreeIPA, the ...


18

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, including Target, Home Depot, and more. Home Depot spent $43,000,000 on its data breach in only one quarter. Target paid $10,000,000 in a settlement. An IBM ...


17

FreeIPA is probably what you're looking for. It's to Linux what Active Directory is to Windows. (It can also talk to AD if you have a heterogeneous environment, but shouldn't be used to manage Windows machines directly. Use AD for that.) Red Hat's documentation (they call it Identity Management) is very thorough and easy to follow, and should be mostly ...


16

If you declare users as virtual resources , you can then use 'realize' or the collection syntax ( User <| ... |>). Here's an example: @user { 'foo': groups => ['somegroup'], membership => minimum, } Then realize that virtual user with then collection syntax: User <| title == foo |> And elsewhere you can add to the parameters for ...


15

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 have it created already, and check this if you want it local on W10) from users, or Computer Management, whatever you like more. Open Administrative Tools, ...


14

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-folder The straight out way of doing this is: Create a new temp account with sudo rights: sudo adduser temp sudo adduser temp sudo Log out from your current ...


13

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 replacement for tsadmin


13

A lot of this depends on your definition of "log in" -- technically any user who exists in /etc/passwd & /etc/shadow is a "valid user" and could theoretically log in under the right set of circumstances. The methods you're talking about fall into the following broad categories: Users with "locked" accounts A user whose password is set to *, !, or some ...


12

I tried the script from par, and found a few issues. So I modified it for one specific userid and for OS X Mavericks (10.9). I found that there was a couple extraneous records added to the User account under Mavericks -- a PasswordPolicyOptions and an AuthenticationAuthority record -- that needed to be removed to correctly mimic other builtin service user ...


12

EDIT: Updated Jan 9, 2014 for OS X Mavericks (suggestions from Dave, thanks!) I wrote a bash script to do this. It will use the first unused uid which is less than or equal to 500 (daemon account uids on Mac OS X) that also has an identical unused gid. Save the script to a file named add_system_user.sh and set it executable with chmod 755 add_system_user....


12

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 DOCKER_OPTS=' -G jenkins' In ubuntu /etc/default/docker is the docker configuration file.


11

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.


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