Help with scripts

Login or Register to Reply

Thread Tools Search this Thread
# 8  
Old 2 Weeks Ago
Originally Posted by rbatte1
share the screen output (pasted in CODE tags) from the following:-
uname -a
getent group your_group_name
getent user permitted username
ls -l /path/to/folder
ls -dl /path/to/folder

In addition: please post the filesystem type the FS in question is using. You get this by looking at the output of df /path/to/folder and then, using what shows up in the last column, doing a mount | grep <last-value>. i.e.:

# df /path/to/look/at
Filesystem             1K-blocks   Used Available Use% Mounted on
/dev/mapper/mylv         5029504 798444   3952532  17% /path

# mount | grep path
/dev/mapper/mylv on /path type ext4 (rw,relatime,data=ordered)

The background of this question is that some sorts of filesystems have different properties and migh make adjustments to the suggested procedure necessary.

I hope this helps.

This User Gave Thanks to bakunin For This Post:
rbatte1 (1 Week Ago)
# 9  
Old 2 Weeks Ago

I tried giving permission to the user a by using the below command.
sudo chown -R  o:ec2-user /*

After that i lost my root user access.I dont know the password of root and i have logged in the ec2-user user by using pem key without password.Now i am not able to login ec2-user it is asking password.I have all installed under ec2-user only.
I can able to login only o user with the password.If I do ls nothing is there under "o".
o@  ~cd /
o@  ~ cd ec2-user
-bash: cd: ec2-user/: Permission denied

Can anyone help me to get root access as well as ec2-user access?


Moderator's Comments:
Mod Comment Seriously: Please use CODE tags as required by forum rules!

Last edited by RudiC; 2 Weeks Ago at 06:07 AM.. Reason: Added CODE tags.
# 11  
Old 1 Week Ago
Originally Posted by iswarya123
can anyone help me in the above ?
First off: please do not bump up threads. If someone can answer you s/he will - and if not, then bumping up the thread won't help you either. Many people here do not visit regularly on weekends which is probably why your thread hasn't been answered up to now.

Second: yes, i can help you but are not going to like what i say.

The first thing is, you have generally no business tampering with the ownership of rights of files put there by the system. Actually you can do that in select few exceptional cases but if you do that you have to understand you are taking a very big risk and so you should know what you are doing and why pretty clearly beforehand. I like it better that way is NO such reason to do it.

The reason why sudo refuses to use /etc/sudoers now is because it needs to be readable/writable only for root for security reasons. It doesn't make sense to have rules about who is allowed to become root writable by anybody else but root.

Therefore, by changing the right of the file you have made sudo absolutely useless and effectively shut it off. You need a "conventional" way of becoming root therefore, but in many cases these are blocked intentionally for security considerations.

One way is to use su - root and switch to the root user. You need the root password for that and su may be forbidden to be executed.

Second way is to log on as root directly. You also need the root password and root may be forbidden to log on remotely or generally. If it is only forbidden to log on remotely you can log on locally - usually via the KVM, ILO or whatever the maintenance access to the server is called - via a local serial console.

Third, you can use a boot-CD and reboot the server from that, then mount the original root filesystem (/etc is probably located there) and change the rights back to what it was. Then reboot the server from its own filesystem and it should work again. You will need local access to the server for this and the procedure is going to be disruptive.

I hope this helps.

These 2 Users Gave Thanks to bakunin For This Post:
iswarya123 (1 Week Ago) rbatte1 (1 Week Ago)
# 12  
Old 1 Week Ago

sudo issue has been resolved.Thanks bakunin.can i create the more than 20 user under the group?I asked to share the few details ..please find the below

 getent group o
ls -l /path/to/folder
df /path/to/folder
Filesystem     1K-blocks      Used Available Use% Mounted on
/*                 838848492 611327160 227521332  73% /

# 13  
Old 1 Week Ago
Hello iswarya123 ,

Well, I did ask for the -a flag of uname so we got version information. That would be useful in all cases because things change. Just knowing "linux" is pretty useless..

Really, do you have a group called o? Why not something more meaningful? A few more characters would be so much easier for you to understand when you come to look at it later.

Are there no files in /path/to/folder? You don't sho us the long listing in any case (size, time/date etc. is missing)

Please do answer the questions posed in future to help us understand what we are working with. That way we are better placed to help, and that's why you are here in the first place, no? I joined to get help and I think almost everyone else did too. If you don't share what you are asked for (without compromising security or sensitive data, of course) then we are a little blind to the issue and what we can do to help. I don't want to moan, but ......... Smilie

I look forward to your next question, and I hope I can help, preferably before someone else beats me to it!

Kind regards,
This User Gave Thanks to rbatte1 For This Post:
Don Cragun (1 Week Ago)
# 14  
Old 2 Days Ago
Hi ,
Please find the below:
getent group ec2-user

I have attached the permission ,size, time/date and uname -a in that attachement.

Please let me know if anyone needs few more information

Help with scripts-ll-png
Help with scripts-uname-png

Last edited by iswarya123; 2 Days Ago at 07:22 AM..
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Calling multiple scripts from another scripts sharsour Shell Programming and Scripting 3 09-12-2013 02:33 AM
Calling scripts from with scripts echoes Shell Programming and Scripting 8 07-27-2012 03:31 PM
KSH - How to call different scripts from master scripts based on a column in an Oracle table Yoodit Shell Programming and Scripting 2 06-20-2011 07:39 AM
Need help on scripts jsmitha2009 AIX 7 05-11-2011 02:23 AM
Changing the Bash Scripts to Bourne Scripts:URGENT pgarg1989 Shell Programming and Scripting 3 08-30-2009 10:35 AM
Running scripts within scripts from cron sirbrian Shell Programming and Scripting 4 07-14-2009 10:04 AM
Help with Script using rsh and scripts within scripts brockwile1 Shell Programming and Scripting 3 06-18-2009 09:38 AM
New to scripts mmason3122 Shell Programming and Scripting 5 11-10-2008 11:42 AM
Profile scripts versus rc scripts.... rookie22 UNIX for Dummies Questions & Answers 1 09-17-2008 09:31 AM
Calling expect scripts from other expect scripts seva Shell Programming and Scripting 0 04-03-2008 01:45 PM
I need some scripts:S burakkilic Shell Programming and Scripting 5 05-14-2006 12:46 PM
Scripts LiTo UNIX for Dummies Questions & Answers 4 11-04-2004 06:08 PM
Help with scripts LiTo UNIX for Dummies Questions & Answers 1 11-04-2004 05:03 PM
Scripts GW01 UNIX for Dummies Questions & Answers 3 12-11-2002 07:06 AM