Tag Info

Hot answers tagged

15

User accounts are used not only for actual, human users, but also to run system services and sometimes as owners of system files. This is done because the separation between human users' resources (processes, files, etc.) and the separation between system services' resources requires the same mechanisms under the hood. The programs that you run normally run ...


8

I presume you're finding this list of users by checking /etc/passwd? This is totally normal - 'users' serve to carry a set of permissions, useful for locking down not just 'actual users' but also programs to certain areas of your system and tracking what they changed (same concept with groups). I've inserted one of my Raspberry Pi /etc/passwd files below ...


6

You can login as the user or simply su from root to the user and run the command history you can also search history quite easily history | grep "what ever" Finally you can use ctrl+r {whatever}


6

You can read ~/.bash_history file in users folder if you are admin or have special permissions.


5

pw is the command you are looking for. To add user klaatu to the group foo, do: pw groupmod foo -m klaatu Here is the FreeBSD handbook page on the subject. It's an easy and informative read: Users and Basic Account Management


2

DO NOT SET THINGS in limits.conf !! In many new distro releases, especially enterprise distros, you'll find limits.conf is being phased out, and used now only monolithic lethergic leviathan companies like Oracle -- where the contractors who built the templates rolled into each new release's install scripts are now all long gone, and the time required to ...


2

/etc/security/limits.conf, at least on Debian. Path may vary a little by distro. There is an example in the file to limit all members of the student group to 4 logins (commented out): #<domain> <type> <item> <value> @student - maxlogins 4 You could do * instead of a group, but make sure not to hit ...


2

According to the man of limits.conf you can set restrictions in /etc/security/limits.conf: maxsyslogins maximum number of all logins on system So you can set (2 logins): * hard maxsyslogins 2 In another post is said not to use /etc/security/limits.conf. I could not find anything related to that except that value which is set in ...


2

Why do you want to see what was executed? If you are just curious, or trying to help a novice recover from a blunder or trying to share complex command lines, the other answers mostly work (with the caveat that each shell uses its own history file), but if you are auditing or something related to security or legal, you must realize that all shell history ...


1

A possible solution is for example with awk and reading /etc/shadow and /etc/group (I assume you don't need system users and I am trying to exclude them and locked users): awk -F":" 'NR==FNR { if ($2 !~ /\!/ && $2 !~ /\*/) { m[$1] = ""; } next; } { for (i in m) { if ($4 ~ i || $1 == i) { m[i] = m[i] $1 " ...


1

cat /etc/passwd (filter the contents with grep as per your requirements) Here you go: awk -F':' '{ print $1}' /etc/passwd | while read -r line; do id "$line"; done


1

On Linux when we install a service it creates a user of its service name or similar to that so that it can't access others files.


1

Showing history of commands is very simple! Just type following command on terminal: history This will show you all commands you have used!


1

The other answers are all good. This also works: pw usermod john -G mygroup


1

Wheel is famous for FreeBSD, if you want to need to use su command, you need to be member of wheel group, So pw groupadd get a groupName and -m get members of your group.Old style of the following command you needed to extra command. pw groupadd wheel -m mohsen,ali,john,Hilary,Kate


1

In addition to /etc/sudoers, sudo will also read files in the /etc/sudoers.d directory. The cloud-init application, commonly used on AWS instances, places a sudoers configuration in that directory for allowing the default user to sudo without a password.


1

root@hostname # su - oracle could not open session root@hostname # grep oracle.*nofile /etc/security/limits.conf oracle - nofile unlimited set nofile in limits.conf to some number instead of unlimited: root@hostname # vi /etc/security/limits.conf root@hostname # grep oracle.*nofile /etc/security/limits.conf oracle - ...



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