By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,660 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,660 IT Pros & Developers. It's quick & easy.

About athentication

100+
P: 129
Hello Friends,
My doubt is when we copy file from home folder to /usr/local/apache/htdocs/ folder then it asks for password. But i want to copy that file to /usr/local/apache/htdocs/ without asking password. I don't know how we execute linux commands in perl.

So please help me that how can we write the linux commands in perl and how to copy that file without asking permission or password.
Dec 23 '08 #1
Share this Question
Share on Google+
3 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
@sasimca007
Can we get a bit more information? Are you actually on the system you are trying to copy to or is this being done remotely? At most, when copying files on a system, you should get either success or a permission denied. How did you set up such authentication?

Regards,

Jeff
Dec 23 '08 #2

numberwhun
Expert Mod 2.5K+
P: 3,503
One more thing. I just found your cross post into the Linux forum here on bytes and have removed it. Please do not cross post. If it is deemed that your thread should be under another topic, we shall move it there for you. Since in this thread you referenced Perl, I left it here. The other one you did not reference Perl. Which solution are you actually looking for?

Regards,

Jeff
Dec 23 '08 #3

100+
P: 129
I got answer through linux file. That is in root , in visudo file we have to change as
username ALL = NOPASSWD: ALL
it will doesn't ask password for any command starting with sudo, and if we want to give that nopasswd authentication for single command,
username ALL = NOPASSWD: /bin/cp

username ALL = NOPASSWD: /bin/cp,/bin/rm,etc.....(more commands)
For example,
when we type--->sudo cp /home/user/image001.jpg /usr/local/apache/htdocs , it doesn't ask for authentication and password it will copy the file to the destination folder.

One another thing is i am writing to copy one file from home folder to apache/htdocs folder. Actually, it is linux platform and i am writing that command in perl. So, i posted in two topics. Please forgive me if i did wrong.
Dec 24 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.