How can I get the list of logged in users in the system programmatically?
I can get the list with 'who' or 'users' commands but I need to get the list programmatically...
May someone help, please?
Thanks in advance. (2 Replies)
Actually.I have 2 questions to ask.
1. how to list locked account in hp-ux?
2.how to list locked account in linux(redhat)?
I can use the command "passwd -S -username" to list a account who were locked .
who knows how to list all locked accounts with one command.
Thanks!! (5 Replies)
hi, i am trying to write a script to generate a big number of users in perl.. it is actually my second time writting perl .. i used to write shell scripts before. my short script seems not working because "useradd" isn't found by the compiler. if anyone may point out why it would be great. thanks.... (3 Replies)
I need to add to a BASH script if ${USER} is not in a list of users (smitha, brownd, adamsp) then do something... what is the best shortest way to accomplish an if statement with a list like this? Also the list of users should be in the script, not an external file.
Thanks! (5 Replies)
Hi
I am new to unix so hopefully someone can help. I need to list all the users I have in my unix enviroment (AIX) and the groups (primary and secondary) they belong to.
Can anyone help?
Many thanks in advance (2 Replies)
Hello!Does anybody know how to solve this script:
,,write a shell script which displays a list of names of users who have created files "*. c" in the last day."? (1 Reply)
Hi
i would like to know were the folder that contain file with list of all users ?
And were i can learn about what kind of folder i have and wheat they have inside?
question 2.
when i write ls -a i see all directories and then i choose for example Documents
and inside Documents i typed again... (1 Reply)
Is there any command that can used in Linux that export usernames and their manager's name from AD using bash shell script?
I know this can be done using powershell but I need to use Linux for this procedure. (2 Replies)
Discussion started by: dellanicholson
2 Replies
LEARN ABOUT CENTOS
lgroupmod
lgroupmod(1) General Commands Manual lgroupmod(1)NAME
lgroupmod - Modify an user group
SYNOPSIS
lgroupmod [OPTION]... group
DESCRIPTION
Modifies the user group with name group.
OPTIONS -A, --admin-add=list
Add users in comma-separated list among group's administrators.
-a, --admin-remove=list
Remove users in comma-separated list from group's administrators. Removing users that are not currently among group's administra-
tors silently succeeds.
-g, --gid=gid
Change group's group ID to gid.
-i, --interactive
Ask all questions when connecting to the user database, even if default answers are set up in libuser configuration.
-L, --lock
Lock group. This prevents users from using the group password with newgrp(1) to become a member of group.
-M, --member-add=list
Add users in comma-separated list among group's members.
-m, --member-remove=list
Remove users in comma-separated list from group's members. Removing users that are not currently among group's members silently
succeeds.
-n, --name=name
Rename group to name.
-P, --plainpassword=password
Set group's password to password. Note that the password can be viewed while running lgroupmod using tools such as ps(1).
-p, --password=encrypted
Set group's password to the password represented by the hash encrypted. Note that the hash can be viewed while running lgroupmod
using tools such as ps(1).
-U, --unlock
Unlock group.
EXIT STATUS
The exit status is 0 on success, nonzero on error.
libuser Jan 11 2005 lgroupmod(1)