Suddenly getting permission refused to save edits made using /etc command

Asked by S.S.Mani

In my Kubuntu 14.04 I have been trying with limited success in using Samba share.

While earlier i was able to make as well as save edits, suddenly i am getting denial of permission for the same. May be I have made some mistake somewhere and landed here.

when i tried to save using the commnd kate gedit /etc/nsswitch.conf, on the output screen I tried adding 'wins' before 'dns mdns4'

I am unable to save it even if I give a commd to save it as using the same file name by overwriting.

How do I get over it?

By partial success I mean, now I am able to work with other computers using Smb4k but other computers are unable tosee my kubuntu!

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu samba Edit question
Assignee:
No assignee Edit question
Solved by:
S.S.Mani
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

This is normal. The file un /etc you tried to edit is not writable by users. This is a security feature and is how Ubuntu has worked since day one.

If you want to edit files that are not writable by your user you must first be in the sudo group which your first user is by default. You can then use the sudo command to get the extra access you need in order to edit files. So running :

gedit /etc/nsswitch.conf

Will allow you to save the changes to the original file. Sudo has finally been updated in polkit so is ok with GUI applications. Older releases need to use gksudo for GUI applications to avoid issues.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Sorry.

sudo gedit /etc/nsswitch.conf

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#3

@actionparsnip: don't forget about the difference between sudo and gksudo :-p

@S.S.Mani : I suggest running this command:

gksudo gedit /etc/nsswitch.conf

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

In Trusty, gksudo isn't in a default install and sudo has finally been added to polkit so is how you run GUI apps with extra access now. Gksudo isn't part of Trusty after you do a clean install from CD.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

In Trusty, gksudo isn't in a default install and sudo has finally been added to polkit so is how you run GUI apps with extra access now. Gksudo isn't part of Trusty after you do a clean install from CD.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#6

@actionparsnip: My apologies. I didn't know that. :-)

Revision history for this message
S.S.Mani (airomatic) said :
#7

I don't know whether what I understood from someone else and did is right or wrong but that worked. I used 'sudo nano...." command and made corrections accepted!

However my original problem of SAMBA shares did not get solved. Hence the following:

" I posted a few questions here and I got many sincere answers. Thanks for everyone.

However i was not able to solve my problem of accessing other network computers from mu Kubuntu and also my kubuntu was not showing in other computers.

I have now successfully uninstalled Kubuntu using OS uninstaller. I propose to reinstall directly 14.04 LTS unlike my earlier method of 12.04 and updating it, and hope to succeed.

However i want to record one peculiar(my observation) thing that happened during the last attempt.

While i was trying to uninstal, for once I "Tried Kubuntu".

During that time I was able to access all network computers!

However after uninstalling and reinstalling the same version of kubuntu in the same computer in the same network, I got into the same network issues as earlier! I wonder why?

The only difference, to my knowledge in my installation was, during installtion i had allowed the third paty installations as well as updates to be installed? Could that be the reason for this behaviour?

As I propose to START AFRESH, I AM CLOSING THIS, AS PROBLEM SOLVED! HOPE THAT IS ACCEPTABLE.

THANKS ONCE AGAIN"