LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2018, 01:08 PM   #1
samul
LQ Newbie
 
Registered: Mar 2018
Posts: 4

Rep: Reputation: Disabled
Adding users to multiple services? (shell script or php)


I want to add/remove users to the system, samba and the webserver in one input. Not sure how to contruct a good script for this.

One problem is that when I write adduser --disabled-login $varname it doesn't work. While adduser $varname works fine.

I also wonder how the same password will be added in all of these.
 
Old 03-21-2018, 04:25 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Hello samul,

Welcome!

Anything you can do from the bash prompt you can do in a script. I think we have to see what else is going on with your script. Are you using 'adduser --disabled-login' for an existing user?
 
  


Reply



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
shell script for adding multiple users on multiple servers. newtech Linux - Newbie 3 04-07-2015 03:58 AM
Adding new users via Shell script coolfrog Linux - General 10 12-05-2010 10:47 AM
Adding users with PHP (pass php variables to Expect script) Jayla Programming 1 10-20-2006 10:44 AM
Adding multiple user shell script plexus Programming 2 06-19-2004 08:36 PM
bash script for adding multiple users pilipk01 Linux - Newbie 4 01-12-2004 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration