Sponsored Content
Top Forums UNIX for Advanced & Expert Users Sudo and edit other user's info. Post 302739323 by linuxadmin on Tuesday 4th of December 2012 03:46:26 AM
Old 12-04-2012
RedHat Sudo and edit other user's info.

i did a mistake. Smilie
Code:
user1 ]$ vi ~/.bashrc
sudo su - user2

now , whenever I try to login to user1 , it will login to user2.

How can I resolve this ? Smilie

N.B
-- I do not have root access.
-- I dont know password of user2
-- this is a virtual machine.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

User Info

How could I get the details about a user logged in a Unix system? ( WHat tasks did he perform or if he had changed any file or not)? Please answer my question. (1 Reply)
Discussion started by: s_dhar
1 Replies

2. Solaris

How can i edit /etc/vfstab in single user mode

Hi Experts /etc/vfstab is corrupted as while editing it i forgot to comment some of the line. how can i edit the file in single in user mod? also, i have some problem in CD drive , so i cant boot it from CD and do the changes. i tried mounding the root file system as rw, however no... (10 Replies)
Discussion started by: kumarmani
10 Replies

3. Shell Programming and Scripting

Update LDIF User info based on Test User Certs ID's

Hi I need help.......... I have an Sun One Directory server LDIF file with 5000 user entries, I need to change the data to match Test ID's, so I can run a perf test. I'm way out of my league as I have not done any scripting for 10 years. There are four entries for each user in the file... (3 Replies)
Discussion started by: Macdaddy99
3 Replies

4. UNIX for Dummies Questions & Answers

sudo user

I am trying to run a command from different user on my server. However when i execute the command it asks for password can you please help. when i use this command to switch user no password is required 1) sudo su - bilbtf42 when i use 2) sudo su - bilbtf42 cp file1 direcotry1/file1 ... (3 Replies)
Discussion started by: blackeyed
3 Replies

5. UNIX for Dummies Questions & Answers

Discover the last user in a group to edit a file?

Alright, so a number of users are in a group, and they have certain access rights to a file, which is owned by a single user, standard stuff, right? However, I need to know which user in that group was the last user to edit a file. Is there any way to determine this in SunOS 5.9? I've looked... (5 Replies)
Discussion started by: rainedragon
5 Replies

6. UNIX for Dummies Questions & Answers

sudo su - USER ??? How to??

Hi folks, Here is my question of the day 8-) I have to provide the ability to sudo su - orapd2 & sudo su - pd2adm for the following people User A, B, C, D which all of them are part of the group staff. orapd2 and pd2adm are also users. Users A, B, C, D should not type the password for... (2 Replies)
Discussion started by: 300zxmuro
2 Replies

7. Solaris

Help me to edit sudo file

I am trying to edit sudoers file by running the command #visudo. But it is not opening and error showing like 'it is read only filesystem'. Than I changed the permissions of /etc/sudoers file to 640 and modified it(after I change the permission to 440). Than it is modified successfully. But sudo... (2 Replies)
Discussion started by: welcome23
2 Replies

8. AIX

Sudo to other user

Hello All, I am trying to grant sudo privileges to a set of users (say tom and jerry) to sudo to another set of users (jim, harry). This is because we don't want to disclose the password of jim and harry. I did defined the user_alias and runas alias. %wms ALL = (USR) /usr/bin/su -, where wms... (7 Replies)
Discussion started by: ibmtech
7 Replies

9. UNIX for Dummies Questions & Answers

How to make user groups and edit permissions?

OK guys and gals. I've been working on a debian system for a little bit, in hopes of making it into a system we can use for manifests and other things. I am very new to unix, particularly debian. I would like to make 2 or 3 different groups. 1 would be for me, and other people... (1 Reply)
Discussion started by: samee71
1 Replies
edquota(8)						      System Manager's Manual							edquota(8)

NAME
edquota - edits quotas SYNOPSIS
/usr/sbin/edquota [-gGuU] -t /usr/sbin/edquota [-p proto_username] [-u] username ... /usr/sbin/edquota [-P proto_userID] -U userID ... /usr/sbin/edquota [-P proto_userID] [-u] username ... /usr/sbin/edquota [-p proto_username] -U userID ... /usr/sbin/edquota [-p proto_groupname] -g groupname ... /usr/sbin/edquota [-P proto_groupID] -G groupID ... /usr/sbin/edquota [-P proto_groupID] -g groupname ... /usr/sbin/edquota [-p proto_groupname] -G groupID ... PARAMETERS
Specifies a prototypical user or group by the user name or group name. A prototypical user or group has previously-defined, valid quota files that you want to duplicate for other user or group quota files. Specifies a prototypical user or group by the user id or group id. A prototypical user or group has previously-defined, valid quota files that you want to duplicate for other user or group quota files. FLAGS
Edits the quotas of one or more groups, specified by groupname on the command line. When used with the -t flag, sets or changes the grace period for all file systems with group quotas specified in the /etc/fstab file. Edits the quotas of one or more groups, specified by groupID on the command line. When used with the -t flag, sets or changes the grace period for all file systems with group quotas specified in the /etc/fstab file. Initializes the specified quotas by duplicating the established quotas of the prototypical user's name (when used with the -u flag, the -U flag, or no other flags) or the prototypical group's name (when used with the -g or -G flags). The proto_username or proto_groupname must have a valid quota file. Establishing quotas for one user or group and then using the -p flag to duplicate these quotas for other users is the normal mechanism for initializing quotas for a group of users. Initializes the specified quotas by duplicat- ing the established quotas of the prototypical user's id (when used with the -U flag or the -u flag) or the prototypical group's id (when used with the -G flag or the -g flag). The proto_userID or proto_groupID must have a valid quota file. Establishing quotas for one user or group and then using the -P flag to duplicate these quotas for other users is the normal mechanism for initializing quotas for a group of users. Sets or changes the default grace period for which users may exceed their soft limits. By default, or when you specify -t with the -u flag, the grace period is set for all file systems with user quotas specified in the /etc/fstab file. When you specify -t with the -g flag, the grace period is set for all of the file systems with group quotas specified in the /etc/fstab file. Edits the quotas of one or more users, specified by username ... on the command line. The -u flag is the default. The -u flag, used with the -t flag, changes the grace period for all file systems with user quotas specified in the /etc/fstab file. Edits the quotas of one or more users, specified by userID ... on the command line. The -U flag used with the -t flag, changes the grace period for all file systems with user quotas speci- fied in the /etc/fstab file. DESCRIPTION
The edquota command is a quota editor that allows you to add and modify user and group quotas and modify file system quota grace periods. Use the quota command to display the existing quota information. Note that disk quotas are displayed as 1 kilobyte blocks. For each user or group specified, the edquota command creates a temporary file with an ASCII representation of the current quotas for that user or group, then invokes an editor to allow you to modify the file. The vi editor is invoked by default. To override the default, specify a different editor for the EDITOR environment variable in your login file. Setting a hard limit to 0 (zero) indicates that no quota should be imposed. Setting a hard limit to 1 (one) indicates that no allocations should be permitted. Setting a soft limit to 1 (one) with a hard limit of 0 (zero) indicates that allocations should be permitted on only a temporary basis (see the -t flag). The current usage information in the file is for informational purposes; only the hard and soft lim- its can be changed. For each file system, the edquota command creates a temporary file with an ASCII representation of the current grace period for that user or group, then invokes an editor to allow you to modify the grace period. The grace period may be specified in days, hours, minutes, or seconds. Setting a grace period to 0 (zero) indicates that the default grace period should be imposed. Setting a grace period to 1 second indicates that no grace period should be granted. When you exit the editor, edquota reads the temporary file and modifies the quota.user and quota.group files for the target file system to reflect the changes made. Changes in grace periods take effect immediately unless a grace period is currently in effect. For example, assume a user exceeds a soft limit and receives a grace period of 7 days. A subsequent change to a grace period of 1 day will not affect the user's already-invoked grace period, unless the user drops below the soft limit and exceeds it once again. The default grace period for a file system is speci- fied in the quota.user and quota.group files for the target file system. RESTRICTIONS
You can use the edquota command to edit only those file systems that are in the /etc/fstab file and have userquota and groupquota entries. You must be the root user to edit quotas. NOTES
The term file system represents either a UFS file system or an AdvFS fileset. The root user can exceed user and group quotas. The fileset grace period is equal to the group grace period. When you use the edquota command to set the group grace period for a fileset causes that same value to be used for the fileset grace period. EXAMPLES
To apply the existing quotas of the user named user1 to the user named user2: /usr/sbin/edquota -p user1 -u user2 To apply the existing quotas of the user named user1 to the user named user2, using the default: /usr/sbin/edquota -p user1 user2 To apply the existing quotas of the user with the user id 361 to the user with the user id 382: /usr/sbin/edquota -P 361 -U 382 To apply the existing quotas of the user named user1 to the user with the user id 382: /usr/sbin/edquota -p user1 -U 382 FILES
Specifies the command path Contains user quotas for file systems Contains group quotas for file systems Contains file system names and locations RELATED INFORMATION
quota(1), quotacheck(8), quotaon(8), quotactl(2), fstab(4). delim off edquota(8)
All times are GMT -4. The time now is 01:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy