Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Problems With User Creation Script Post 302762215 by Hammadi dali on Monday 28th of January 2013 08:53:17 AM
Old 01-28-2013
it is a problem of parenthesis positionning :
Code:
@echo off
 SET /P deleteorkeep="This username %%i already exists, press d to delete the account and files, press k to delete the account but rename the files folder with a suffix of _old:" 
IF /i "%deleteorkeep:~,1%" EQU "d" (      ECHO delete    )
   IF /i "%deleteorkeep:~,1%" EQU "k" (   ECHO keep     
   ) ELSE (     
   NET USER %%i %%i /add     )

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

user creation using shell script for JSP

hello friends, I have problem. We want to create user from jsp(browser based) on our linux server. How we can do that ? or How do we create a user with shell programming by taking arguments and checking with the existing users and if the user exist it should display the message the user exists... (1 Reply)
Discussion started by: jarkvarma
1 Replies

2. Solaris

User creation

Hi all, I want to create one user with full permissions to one directory called /opt/tivoli/tsm/client/ba/bin. Name for the user Tivoli Thanks & Regards Babu (7 Replies)
Discussion started by: lbreddy
7 Replies

3. Shell Programming and Scripting

Help in Shell scripting to modify the User Creation script in oracle database.

Hi, I have several users to create on my test Oracle database taking the scripts from the Production Oracle database. I have a separate text file where I have user-id and passwords maintained. I need help in writing a shell script to go thru the user creation scripts and replace VALUES... (1 Reply)
Discussion started by: rparavastu
1 Replies

4. Solaris

Need help with user creation

Hello guys, i have a problem where i cant create a user and here some problem that i encounter. 1. /etc/passwd seems locked. 2. getting this error UX: useradd: ERROR: Cannot update system files - login cannot be created. # useradd -u 47367 -g 1084 -c "user123" -d /local/home/user123 -s... (2 Replies)
Discussion started by: brew
2 Replies

5. Shell Programming and Scripting

User creation script

Hi Gems.. I am working out on project of creating a mass user on 100 server. Please help me with script where i can create an user id of new 80 user using shell script Thanks in advance. Indrajit Bhagat (1 Reply)
Discussion started by: indrajit_renu
1 Replies

6. UNIX for Advanced & Expert Users

Can we Automate the User creation and setting password through a script in solaris 10

Hi, I am using Solaris 10 OS and Bash shell.Is there any way can we automate User creation and setting passwords through a script or any freeware tool. Advance thanks for your response. (1 Reply)
Discussion started by: muraliinfy04
1 Replies

7. Solaris

Package creation problems with Source files

Hi, I am creating "LSOF" solaris package from solaris "source" files. I have compiled the source file and with that i created prototype file also. Then using pkgmk command i can make the package . In the package i am having (pkginfo pkgmap reloc) two file and one directory respectively But... (3 Replies)
Discussion started by: Kathirvel G
3 Replies

8. Shell Programming and Scripting

Bash shell script for user creation in solaris

Hi All, I am new to shell scripting and have a task which need to be completed ASAP. I have searched all the forum and couln't find excat script which could run on solaris.can someone give me the fully working script for below. Bash shell script to create user account with paraments as... (1 Reply)
Discussion started by: sintilash
1 Replies

9. AIX

PowerVM/lpar creation problems

Hi, I'm a newbie to PowerVM and LPARs ( I work with VmWare and Oracle VM Server for Sparc) .recently we purchased an 8202-e4b server, with two enclosures for add'l disk capacity. it is licensed for PowerVM standard,came preloaded as such, AIX 7.1. I've set up HMC v8.2, and run it through a VM on... (30 Replies)
Discussion started by: computron
30 Replies

10. Shell Programming and Scripting

Shell script for user account Creation

Hi Folks, I had a request to create the user request. Between, I just write a script a create, Update Geos, and update the password. My script as below: The error message, what I am getting is all the users are updated with the same Goes value.. #!/bin/bash for i in `cat users.txt`;do... (2 Replies)
Discussion started by: gsiva
2 Replies
lppasswd(1)							    Apple Inc.							       lppasswd(1)

NAME
lppasswd - add, change, or delete digest passwords. SYNOPSIS
lppasswd [ username ] lppasswd -a [ -g groupname ] username lppasswd -x username DESCRIPTION
lppasswd adds, changes, or deletes passwords in the CUPS digest password file, passwd.md5. When run by a normal user, lppasswd will prompt for the old and new passwords. When run by the super-user, lppasswd can add new accounts (-a username), change existing accounts (user- name), or delete accounts (-x username) in the digest password file. Digest usernames do not have to match local UNIX usernames. OPTIONS
lppasswd supports the following options: -g groupname Specifies a group other than the default system group. SECURITY ISSUES
By default, the lppasswd program is not installed to allow ordinary users to change their passwords. To enable this, the lppasswd command must be made setuid to root with the command: chmod u+s lppasswd While every attempt has been made to make lppasswd secure against exploits that could grant super-user privileges to unprivileged users, paranoid system administrators may wish to use Basic authentication with accounts managed by PAM instead. SEE ALSO
lp(1), lpr(1), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 22 February 2008 CUPS lppasswd(1)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy