10-14-2009
IF $USER is not in this list of users, then do this
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!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi, to do a su - user, we need to know what are the users...
so in unix
1) which file to see the list of users, passwords? (2 Replies)
Discussion started by: yls177
2 Replies
2. AIX
Hello list,
Have a problem that's highlighting gaps in my knowledge; can you assist?
We have a script that's tacked onto our trading application which allows branch managers etc. to kill off the sessions of other users at their branch. A menu option in the application spawns a shell running... (8 Replies)
Discussion started by: alexop
8 Replies
3. AIX
Hi!
this would be my first time to post here in this forums, hope you can help me with my queries.
i would like to create a different user name but have the same access rights. Example: root > rootbaby.
thanks (5 Replies)
Discussion started by: HPL1706
5 Replies
4. UNIX for Dummies Questions & Answers
Hello everyone and let me start off by thanking anyone who can help with this.
I work for a company that uses Unix as one of their servers. I'm not at all familar with Unix beyond logging after I restart the server:rolleyes: I'm looking for some command that will bring me up a list of current... (3 Replies)
Discussion started by: disgracedsaint
3 Replies
5. Shell Programming and Scripting
Hi,
I have a situation where I want to ignore few users from list of users and print rest of user in log file.
say, I want to ignore aaa, bbb, ccc, ddd .. ppp from list of 20 user (do not want to include)
What is the good command or any script?
Thanks in advance. (1 Reply)
Discussion started by: sumit30
1 Replies
6. UNIX for Advanced & Expert Users
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)
Discussion started by: theodoraa
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
I have a small problem. When I log in as root and try to switch to any other user using su -user, then it is giving an error saying libncurses.so permission denied. Can you help me?
Thank you in advance.
Sai. (1 Reply)
Discussion started by: sai2krishna
1 Replies
8. UNIX for Advanced & Expert Users
I need to find all the unix user id's of all the users in unix... is there any such command... pl help out (6 Replies)
Discussion started by: Syed Imran
6 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: iliya24
1 Replies
10. Shell Programming and Scripting
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 SUSE
alter_group
ALTER
GROUP(7) SQL Commands ALTER GROUP(7)
NAME
ALTER GROUP - change role name or membership
SYNOPSIS
ALTER GROUP groupname ADD USER username [, ... ]
ALTER GROUP groupname DROP USER username [, ... ]
ALTER GROUP groupname RENAME TO newname
DESCRIPTION
ALTER GROUP changes the attributes of a user group. This is an obsolete command, though still accepted for backwards compatibility,
because groups (and users too) have been superseded by the more general concept of roles.
The first two variants add users to a group or remove them from a group. (Any role can play the part of either a ``user'' or a ``group''
for this purpose.) These variants are effectively equivalent to granting or revoking membership in the role named as the ``group''; so the
preferred way to do this is to use GRANT [grant(7)] or REVOKE [revoke(7)].
The third variant changes the name of the group. This is exactly equivalent to renaming the role with ALTER ROLE [alter_role(7)].
PARAMETERS
groupname
The name of the group (role) to modify.
username
Users (roles) that are to be added to or removed from the group. The users must already exist; ALTER GROUP does not create or drop
users.
newname
The new name of the group.
EXAMPLES
Add users to a group:
ALTER GROUP staff ADD USER karl, john;
Remove a user from a group:
ALTER GROUP workers DROP USER beth;
COMPATIBILITY
There is no ALTER GROUP statement in the SQL standard.
SEE ALSO
GRANT [grant(7)], REVOKE [revoke(7)], ALTER ROLE [alter_role(7)]
SQL - Language Statements 2010-05-14 ALTER GROUP(7)