Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 07-31-2001, 12:27 PM   #1
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
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.




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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:03 AM.

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