LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-31-2001, 12:27 PM   #1
svs
LQ Newbie
 
Registered: Jul 2001
Posts: 1

Rep: Reputation: 0
adduser script problem


I'm trying to write a script that uses the adduser command to add a user to a specific group when a username and full name are specified.

In my script, the line to add the user is this:

./adduser -g biipsub -c \"$fullname\" $username

Whenever I run the script, the adduser command doesn't get executed. When I echo the same command, this is returned:

./adduser -g biipsub -c "Full Name" username

This is the correct syntax, so why doesn't the command work when it is run from the script??

Thanks for any help
Steve Szymanski
 
Old 07-31-2001, 02:22 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
Does the adduser command really existing in the current (working) directory (as indicated by ./adduser)? This means that if you execute this from root's home directory then your script will attempt to look in root's home dir for the binary. Should you be supplying something like /usr/sbin/adduser or /sbin/adduser.

HTH

Jamie...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PPPD Script problem when cron-scheduling the script andresurzagasti Linux - Networking 0 11-24-2004 02:54 PM
adduser and smbpasswd script homey Linux - Networking 7 09-16-2004 06:01 PM
Postfix->filter Script->sudo adduser lawtoncooper Linux - General 0 07-23-2004 01:12 AM
Easy problem??? Can't find adduser or useradd in fresh install of Fedora jdruin Linux - Newbie 3 02-21-2004 10:57 PM
Adduser script Copenhagen Cowboy Programming 0 03-06-2001 09:35 AM


All times are GMT -5. The time now is 08:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration