06-18-2011
Why edit groups into sudoers instead of adding users to groups? Let the login system do the legwork.
10 More Discussions You Might Find Interesting
1. Cybersecurity
Hi,
Is it possible that one user belongs to many groups, or the relation of user/group is 1/1?. Thanks
Ramón (2 Replies)
Discussion started by: rsanz
2 Replies
2. Linux
RH 7.2
I'm trying to list the users & groups on my machine. I found the lsuser & lsgroup commands but no associated man pages.
I typed: lsuser
I get --> Valid options are: -a
So I typed: lsuser -a
I get --> Valid options are: groups, home
So I typed: lsuser -a groups
I get -->... (2 Replies)
Discussion started by: jalburger
2 Replies
3. UNIX for Dummies Questions & Answers
hi eveyone i've recently requested my unix admin to create a userid for 2 groups. He created the id and i can see it by grep "id" /etc/group.
But when i login with that id into unix and try to cd that group it says permission denied. something like cd /groupname -- permission denied
Can my admin... (1 Reply)
Discussion started by: sammet
1 Replies
4. Shell Programming and Scripting
I'm trying to create a script to remove users from sudoers on multiple servers. I'm able to do this with a one-line script using sed, but only if it's on one server.
Example: sed '/someuser/d' /host/local/etc/sudoers
Also, I think the problem with this one-line script is that I would have to... (4 Replies)
Discussion started by: em23
4 Replies
5. Solaris
Hello gurus,
I've been working on a sudoers file to work with groups in LDAP. I've created the groups in LDAP and added the users to there respective groups. I've also setup my sudoers file to have the groups match what is in LDAP. And I've added ldap to nsswitch.conf in the group line. The... (6 Replies)
Discussion started by: em23
6 Replies
6. Shell Programming and Scripting
Hello,
I am new to Unix and shell scripting. I am trying to find unowned files and groups on my servers. I know, i could use the below command to find it on individual server.
#find / -nouser -o -nogroup -print
But I was wondering, if someone could help with a shell script so that I can... (2 Replies)
Discussion started by: ut916
2 Replies
7. Shell Programming and Scripting
Dear All,
I want to know all users & group history in one file, for root terminal through shell or any other option (5 Replies)
Discussion started by: kpoobathi
5 Replies
8. Shell Programming and Scripting
Hi all. I need a shell script that can, in short, read through a text file line by line and create a new user in Ubuntu, as well as assign that user to a group. The format of the text file is not important but preferably: 'username:group'. I don't have much programming knowledge no matter shell... (3 Replies)
Discussion started by: LewisWeekly
3 Replies
9. Red Hat
All,
I need to disable "sudo -i" and "su - " for all servers in our environment, We want to make sure no one run commands or delete files across environment using switching to root account. can you guys please lets me know if this is achievable.
Thanks and Regards
shekar (2 Replies)
Discussion started by: shekar777
2 Replies
10. UNIX for Beginners Questions & Answers
Hi Team,
I got a requirement to send a mail to the individual users of a unix server about their respective groups. can some one help me to provide the script as I am unable to write that.
I tried with below lines but I come out with errors.
cat /etc/passwd | awk -F':' '{ print $1}' |... (6 Replies)
Discussion started by: harshabag
6 Replies
logins(1M) logins(1M)
NAME
logins - display system and user login data
SYNOPSIS
groups] logins]
DESCRIPTION
displays data concerning system and user logins. The format and content of the output is controlled by command options and may include:
system or user login, user ID number, comment field value (for example, user name, location), primary group name, primary group ID, supple-
mentary group names, supplementary group IDs, home directory, login shell, user security level, user audit events, and password aging
parameters. The default data is: login, user ID, primary group name, primary group ID, and comment field value. Output is sorted by user
ID, with user logins following system logins. The default output consists of login, user ID, primary group, primary group ID and comment
field formatted into columns.
The following options are available to this command:
Display two account expiration fields. The fields show how long the
account can be unused (in days) before it becomes inactive and the date the account will expire.
Display logins with duplicate UIDs.
Show multiple group membership data.
Display with alternate format of one line of colon separated fields.
Display logins with no passwords
Display all system logins
Sort output by login rather than UID.
Display all user logins.
Display extended information about selected users. This extended
information includes home directory, login shell and password aging data, each on its own line. Password information consists of pass-
word status (PS for valid password, LK for locked and NP for no password) and, if a password is present, date of last change, required
number of days between changes, and number of days allowed between changes. In the case of non-trusted systems, the date of last
change will be the latest Thursday since the change.
Display all users belonging to
groups, sorted by login. A comma separated list specifies multiple groups.
Display the requested
logins. A comma separated list specifies multiple logins.
Specify a switch used to classify NIS
or local users. With the option, only users belonging to the specified repository are displayed.
Multiple options may be used. Any login matching any of the criteria will be displayed. A login will be displayed only once, even if it
meets multiple criteria.
EXAMPLES
List all logins in default format.
List all logins that have no password or have a duplicate UID in default
format.
List all system logins in the alternate format.
List all local users of the system.
List all the NIS users of the system.
WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
FILES
HP-UX password file.
HP-UX group file.
SEE ALSO
listusers(1), passwd(1), group(4), passwd(4), prpwd(4), shadow(4).
STANDARDS CONFORMANCE
logins(1M)