What is the command that allows one to generate a list of all the usernames of authorised users on a Linux server? I have tried getent passwd | cut -d : -f 1 | xargs groups and less /etc/passwd and grep 'x:0:' /etc/passwd and getent passwdand grep /bin/bash /etc/passwd | cut -d: -f1but none of the above gives me exactly what I want, which is simply a list of usernames. Any help would be greatly appreciated
Command to list all usernames on a Linux server
linux;shell script
Use your first attempt, but remove the | xargs groups. Really, though, this is basic enough that it's not all that appropriate for this site...