Sponsored Content
Top Forums Shell Programming and Scripting exec a build command (adduser) in a script Post 302344708 by chipcmc on Monday 17th of August 2009 11:12:23 AM
Old 08-17-2009
i found 2 ways,:

this i don't like so much
Code:
PART1="sudo adduser --uid 1010 --gid 1000 --home /homeL/guy --shell /bin/bash --gecos "
GECOS="ROUSSIN Guy"
PART3="--disabled-password guy"
${PART1} "$GECOS" $PART3

Code:
ADDUSER="sudo adduser --uid 1011 --gid 1000 --home /homeL/guy --shell /bin/bash --gecos \"ROUSSIN Guy\" --disabled-password guy2"
echo $ADDUSER >file_tmp.$$
sh file_tmp.$$
rm file_tmp.$$

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multiple exec command s in a script

Hi everyone, I've been racking my brains for ages on this and need your help/advice. I am writing a script that is reading in file to process and putting them into a temporary file. The loop starts and the script gets the first file name, does what i needs to do (copy it) and then returns to... (2 Replies)
Discussion started by: Angoss
2 Replies

2. Shell Programming and Scripting

question related to command "adduser"

Hello.. I dont know if i can ask this question in this session..if wrong please correct me.. This is my question.. When iam creating a user with command " adduser xxx" Where are the changes happening.. I know in /etc/passwd , /etc/shadow... in /home Is there any i missed.. please... (1 Reply)
Discussion started by: esham
1 Replies

3. Shell Programming and Scripting

Please help: Build a sed command and execute it in a script

I am using an array to store some data (keys e.g 47975081_1215781266128), it can be assumed that it is key to other data. I want extract data from a file based on a couple of keys (range) and store the resulting data in a variable using the following command: sed -n... (9 Replies)
Discussion started by: gugs
9 Replies

4. Shell Programming and Scripting

How to build a command in a script

Hi All I am trying to build a script that will take data from a tab separated file and use that to split up a quicktime file. So far the code is as follows #!/bin/sh #test parsing of data #fix excel file output returns cat $1 | tr "\r" "\n" > $1.fix printf "\n" >> $1.fix mv $1.fix $1 ... (3 Replies)
Discussion started by: babajuma
3 Replies

5. Shell Programming and Scripting

shell script for nessus-adduser

I took a stab at writing a script to automate the interactive process of adding users to Nessus - I have zero previous coding experience. So far, it doesn't get me anywhere. I took small sections of code from posts I found on this site and others:... (1 Reply)
Discussion started by: nolamiami
1 Replies

6. Shell Programming and Scripting

Script Variables Inquiry, Values Okay in Standalone Exec, No-Show in Cron Exec

I have the following bash script lines in a file named test.sh. #!/bin/bash # # Write Date to cron.log # echo "Begin SSI Load $(date +%d%b%y_%T)" # # Get the latest rates file for processing. # d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1) filename=$d export filename... (3 Replies)
Discussion started by: ginowms
3 Replies

7. Shell Programming and Scripting

Use of exec command in a script

Guru's, I want to make a use of "exec" command in my script and want to check return code of executing script, but as you know exec command will terminate current processID and comeout and will trigger new one, i am unable to check return code of script and not able to run a scrpit after exec. ... (2 Replies)
Discussion started by: pawar.atul28
2 Replies

8. Shell Programming and Scripting

Build.xml invocation by Build Script

Hi I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies

9. Programming

Bash script - find command with delete and exec

hi all, i have devised a script that starts in /restored/ and in there, there are a lot of sub folders called peoples names and in the sub folders are files/folders and it deletes the data in the sub folders BUT not the sub folder itself and it should then touch a file in all the sub folders... (3 Replies)
Discussion started by: robertkwild
3 Replies

10. Programming

Script to monitor progress of find/exec command

hi all, i want to monitor the progress of a find and exec command, this is the code i use - find . -type f -exec md5sum {} \; >> /md5sums/file.txt this command works and produces a text file with all the md5sums but while running it doesnt show the progress is there anyway i can do this... (4 Replies)
Discussion started by: robertkwild
4 Replies
SBUILD-ADDUSER(8)						   Debian sbuild						 SBUILD-ADDUSER(8)

NAME
sbuild-adduser - add an sbuild user SYNOPSIS
sbuild-adduser [-h|--help | -V|--version] USER1 [USER2 [USERn...]] DESCRIPTION
sbuild-adduser adds the specified users to the sbuild group, granting them the privelege to build packages with sbuild(1). The schroot(1) configuration must permit the user to obtain root permissions in the chroot via the root-users and root-groups options in schroot.conf, because this is required to install and remove build-dependencies inside the chroot. This is normally done using the sbuild group, but additional users or groups may be added in order to grant finer-grained permissions, for example to restrict individual users to particular chroots. OPTIONS
Actions -h, --help Display this manual. -V, --version Print version information. User selection USER The user to be granted sbuild access. EXAMPLES
To allow user rleigh sbuild access: % sudo sbuild-adduser rleigh AUTHORS
Roger Leigh. COPYRIGHT
Copyright (C) 2006-2008 Roger Leigh <rleigh@debian.org>. SEE ALSO
sbuild(1), sbuild-setup(7), schroot.conf(5). Version 0.63.2 18 Aug 2012 SBUILD-ADDUSER(8)
All times are GMT -4. The time now is 05:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy