Sponsored Content
Special Forums UNIX and Linux Applications grant usage to users listed in a file Post 302242344 by ankimo on Wednesday 1st of October 2008 05:56:25 PM
Old 10-01-2008
for the other newbies, i made some dumb mistakes. the biggest was that i shouldn't have had a ; after quit. i think this is better:

Code:
while read user; do
   
  userid=$user
  passwd="changeme"

  mysql -u<root> -p<password>
  grant usage on *.* to '$userid' identified by '$passwd';
  flush privileges;
  quit

done < userid_file

 

10 More Discussions You Might Find Interesting

1. HP-UX

CVSWeb - Directories listed but files not listed

I am using CVSWeb on HPUnix. When i access it, all directories are listed but files are not listed. I am getting the error "NOTE: There are 51 files, but none matches the current tag. " in tomcat sevrer log i am getting the message "rlog warning: Missing revision or branch number after -r"... (0 Replies)
Discussion started by: ganesh
0 Replies

2. UNIX for Dummies Questions & Answers

memory usage : kernel, oracle, other users

Hello, I'm looking for a command or script that could permit me to know what is memory usage group by HP-UX kernel, oracle processes and other users (specific software). A command like 'top' but for all processes and not only for 12 max could be very useful Thanks in advance (4 Replies)
Discussion started by: thierryUX
4 Replies

3. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

4. UNIX for Advanced & Expert Users

any quicker way to list disc usage by users?

Hi: it takes a long time for "du -sh list_of_users" to give you the output. Is there a quicker way to get this info? Thanks! N.B. Phil (4 Replies)
Discussion started by: phil518
4 Replies

5. AIX

balance CPU usage between users

Hi! Is there any way to balance CPU usage between users on percentage basis? Something like Resource Manager in Oracle databases. Regards. ---------- Post updated at 02:17 PM ---------- Previous update was at 02:09 PM ---------- Workload Manager? ---------- Post updated at 03:44 PM... (0 Replies)
Discussion started by: bas_ua
0 Replies

6. UNIX for Dummies Questions & Answers

CPU usage restrictions for users?

I was wondering if there was a way to set resource usage per user. For example, if I use "grep -f <file1> <file2>" and the two files are very big it consumes a lot of resources. Onetime someone pinged me and asked what the hell I was doing and to kill it. Is there any way an SA can restrict... (7 Replies)
Discussion started by: MaindotC
7 Replies

7. Shell Programming and Scripting

Users and their storage usage

Hey, I'm trying to make a script that can list users and their storage usage in a file. Im trying to get it to where the format is: User xxkbs User2 xkb and so on. So far I figured out how to get the users, but I cannot figure out how to get the storage usage per user. This is what... (2 Replies)
Discussion started by: HakerDemon
2 Replies

8. AIX

High CPU Usage , users affected

Dear All, One production Server is affected by high usage. Application is slow now. Please guide me how to solve it? NMON Report shows full cpu usage. Here im posting some server details. bash-3.2# lparstat -i Node Name : ********* Partition Name ... (6 Replies)
Discussion started by: Thala
6 Replies

9. Shell Programming and Scripting

Space usage by top 5 users in a filesystem

I want to see top 5 users,who have occupied most amount of disk space in a filesystem. But not sure how to do it. I can get the usage for a particular user find . -user user -type f exec df -h {} \;|awk '{ s = s+$1 } END { print "Total used: ",s }' But how to get without specifying any user... (6 Replies)
Discussion started by: rka
6 Replies

10. Emergency UNIX and Linux Support

Usage by users

I would like to know how to capture the usage of CPU by each user. Is there a way to do this on AIX? Gaya (0 Replies)
Discussion started by: ggayathri
0 Replies
quotactl(2)							System Calls Manual						       quotactl(2)

NAME
quotactl - manipulate disk quotas SYNOPSIS
DESCRIPTION
manipulates disk quotas. cmd indicates a command to be applied to the user or group ID id. A command is composed of a primary command and a type that is used to interpret the id parameter. Types supported are USRQUOTA for users and GRPQUOTA for groups. To set the type of quota use the macro. Parameter special is a pointer to a null-terminated string containing the path name of the block special device for the file system being manipulated. The block special device must be mounted. The parameter addr is the address of an optional, command- specific, data structure which is copied in or out of the system. The interpretation of addr is explained with each command below: Turn on quotas for a file system. The parameter addr points to the path name of file containing the quotas for the file system. The quota file must exist; it is normally created using the command (see quotacheck(1M)). The id parameter is ignored. This call is restricted to users having appropriate privileges. Turn off quotas for a file system. The addr and id parameters are ignored. This call is restricted to the user with appropriate privileges. Get disk quota limits and current usage for user or group id. addr is a pointer to a structure (defined in Only users having appropriate privileges can get the quotas of a user other than himself. Get 64-bit disk quota limits and current usage for user or group id. addr is a pointer to a structure (defined in Only users having appropriate privileges can get the quotas of a user other than himself. VxFS 3.5 will only track usage for dqb64_curblocks up to to 2 TB. Set disk quota limits and current usage of files and blocks for user or group id. Note does not allow the current usage fields to be changed. addr is a pointer to a structure (defined in This call is restricted to users with appropriate privileges. Set 64-bit disk quota limits and current usage of files and blocks for user or group id. Note does not allow the current usage fields to be changed. addr is a pointer to a structure (defined in This call is restricted to users with the appropriate privileges. Set disk quota limits for user or group id. The parameter addr is a pointer to a structure (defined in This call is restricted to users with appropriate privileges. Set 64-bit disk quota limits for user or group id. The parameter addr is a pointer to a structure (defined in This call is restricted to users with the appro- priate privileges. Retrieve information about quotas supported by file system id. The parameter addr is a pointer to a flags word. The meaning of the various bit fields are defined in Update the on-disk copy of quota usages for a file system. If special is null, all file systems with active quotas are synced. The parameters addr and id are ignored. RETURN VALUE
Upon successful completion, returns 0; otherwise, it returns -1 and sets to indicate the error. ERRORS
fails when any of the following occurs: The quota file pointed to by addr exists but is either not a regular file or is not on the file system pointed to by special. attempted while another or is in progress. User's disk quota block limit has been reached for this file system. The addr or special parameter points to an invalid address. Reliable detection of this error is implementation-depen- dent. The parameters cmd and/or id are invalid. The parameter special contains a type of file system that does not support quotas. Currently, quotas are supported on HFS and VxFS file systems. The file specified by special or addr does not exist. The kernel has not been configured with the disk quota subsystem. The parameter special is not a block device. Type of quota not supported on the file system. 64-bit values will overflow 32-bit fields, either in the struct in the user level (for or in a 32-bit file system in the kernel (for and The call is privileged and the calling process does not have appropriate privileges. No disc quota is found for the indicated user or quotas have not been turned on for this file system. WARNINGS
The system call is incompatible with the 4.2/4.3 BSD implementation of Melbourne quotas which uses a different system call interface and on-disk data structure. Use and commands for 64-bit field values. AUTHOR
was developed by HP and Sun Microsystems, Inc. SEE ALSO
quota(1), edquota(1M), quotacheck(1M), quotaon(1M), rquotad(1M), mount(2), privileges(5), quota(5). quotactl(2)
All times are GMT -4. The time now is 05:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy