Hi, I am overwhelmed by the help I got for my questions: I am sorry I would not be able to name all those who helped, becoz that would be too many to list here. For the first question almost all of them suggested that I save the file in another directory where the current user has permissions (or /tmp where there is write permission for all) by using :w /tmp/file. Then I can login as the required user and rename the file back to where I want it to be. Another solution suggested by one was in vi - :!su - username -c 'chmod a+w /full/path/filename' Another one: control-z to suspend vi and get to command line, su - to user, chmod to allow write to file for your real id, control -d to exit su, fg to un-suspend vi, do a :w! to force write, get out of vi, then use su - to remove write permission for your real id. - havent yet checked this out. Will do. For the second question, most advised against doing such a thing. However, many suggested sudo and admintool which worked really fine (sudo). Also, some suggested changing the group id And some told me to investigate the 'pseudo root', RBAC Also suggested were - Not usually recommended but simply create another user with UID=0 and he should have all the priviliges. - For having the second "root" equivelent user, I will use /usr/ucb/vipw, then yank the root line and print it under the root entry. Change the first field with the new login ID (say "aroot" for Anoop's root), change the Description field to have right info. Save this VI sessions. It will ask you to edit /etc/shadow file (and to do so type "e"). You just open it and save it without doing anything to it. Then run command "/usr/bin/pwconv". After this, run command "passwd -r files <new root loginID, say aroot> and supply password twice. - CAUTION: SECURITY HOLE AHEAD!! Create another user with the uid of 0. The only thing that the permission system checks is the numeric uid. CAUTION: END OF SECURITY HOLE!! Thanks a lot to all of you, -Anoop On Mon, 2002-11-18 at 07:43, Anoop Kumar V wrote: > Hi All, > > I checked in the faq..not having found answers to these I am posting > them here: > > In vi lets say i have opened a file as a user who has only read > permissions to the file. Now after editing the file (lots of text) I > wouldnt be able to save it as I do not have permissions, but I do know > the user id/password of the owner of the file (who also has write > pernissions). Now how do I save these changes without exitting out and > relogging as that user and re-editing the file again?? I tried using !su > <user> in vi but that somehow dint work. It took me out of vi. > > My other question is how can I create another user (if its possible) > that is equivalent to the 'root' user by terms of privileges to create > other accounts, disable user ids, view processes available to root > alone.. like another 'admin' user. > > regards and thanks, > Anoop > _______________________________________________ > sunmanagers mailing list > sunmanagers@sunmanagers.org > http://www.sunmanagers.org/mailman/listinfo/sunmanagers > -- Rik Schneider - AD6QV - On the air rik-at-schneider.org - At home riks-at-wni.com - At work wookie-at-deranged.schneider.org - On the net _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Wed Dec 11 01:28:12 2002
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:00 EST