|
Getting the "adduser" script to work on Linux
A reader writes:
" Hi, I'm a very beginner at shell scripting and unix/linux. I have your book (Wicked Cool Shell Scripts) and it is really great. So far I've done two or three, Inpath is the one i use most. I'm going make a user for an ftp account so my friends can upload/download songs and other files. I decided to use your adduser script for the job but when i run the script i get an erorr like - /etc/passwd : permission denied. How do i give the script permission to write to /etc/passwd? Sorry if this is an obvious question but i couldn't find an answer. I used chmod 755 and ran it as root. By the way, i really like the site and book cover, i wish all linux/programming manuals had really cool covers." In terms of your problem, I would want to see the permissions of both the file /etc/passwd, and, since it needs to add information to it too, /etc/shadow too. If you're running as root, theoretically, all should be well, but Linux isn't 100% predictable, so... Please respond with that information as a comment to this thread and we'll continue to debug your problem!
Categorized:
Shell Script Programming
(Article 3714,
Written by Dave Taylor)
Tagged: Previous: Nice writeup of my "Creating Cool Web Sites" book Next: Tweaking spacing in standard HTML Subscribe!
how to find root password using shell script? Posted by: v at November 26, 2005 10:10 AMWell, gosh, hmmm... if you want to learn how to hack into a Linux system, I think you've come to the wrong place. :-) Posted by: Dave Taylor at November 26, 2005 2:38 PMI have the same error:
Hi i wanted to know how will i write a post installation script in a kickstart file in linux to changes a few words in the inittab file for example "kernel" to kerne!" and also the grub.conf and the fstab entries as well. coz i want to create an automated troubleshooting situations for myself Posted by: Vinit at September 3, 2008 3:24 PMI have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |