Question about Computers & Internet

1 Answer

Require a batch script

Hi

i want a batch script which would add a domain user to administrator group,add the same system to domain.is it possible.please help me.

waiting for a favourable reply.

Thanks
Ganesh

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Corporal:

    An expert that hasĀ over 10 points.

    Problem Solver:

    An expert who has answered 5 questions.

  • Contributor
  • 6 Answers

For domain groups use dsmod

ie
dsmod group GroupDN -addmbr MemberDN


for local groups use
net localgroup MyGroup john /add





Posted on Jun 19, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Can't get logged in on windows 8


Follow the steps:
Requirements:
1 ) Windows Vista or 7 DVD

1. Insert the Windows Vista DVD into the DVD drive and then restart the computer.
2. Change Boot Options 1st Priority to Optical Drive.
3. When system booting up, if the message "Press any key to boot from cd" appears, immediately press Enter.
4. On Language Settings, Time and Currency and Keyboard Layout screen, just choose the correct settings then click Next.
5. On Install Now screen, click Repair. Note: Click No just in case you get the message: Windows found problems with your computer's startup options.
6. On the System Recovery Options screen, under Operating System, click Windows Vista then click Next. Then select Command Prompt.
7. At the command prompt windows, type the following command then press Enter after typing each command:
c:
cd windows\system32
echo ~takeown /f %1 /r /d y > TakeControlOf.cmd
echo ~icacls %1 /grant administrators:F /t
ren Magnify.exe Magnify.old
ren cmd.exe Magnify.exe

8. Restart the computer.
9. On the Welcome Screen, click the Ease button.
10. Check Make items on the screen larger then click OK.
11. At the prompt, type the command then press Enter.
net user Administrator /active:yes
exit

12. Restart the computer.

13.
At the welcome screen, logon using the local administrator account.
14. Access Control Panel then click User Accounts. Select the username of the account you can't login to then remove the password.
15. Log off on the current local administrator account your are logon to.
16. Check if you can logon to your user account now.
17. Open c:\windows\system32.
18. Right click on Magnify.exe, select Properties -> Security -> Advanced -> Owner -> Edit -> Administrators then click OK.
19. Select Edit -> Administrators -> Full Control then click Apply then OK.
20. Rename Magnify.old to Magnify.exe
21. Open command prompt then type the command then press Enter.
net user Administrator /active: no
To create a new user :
Net user username/add
Windows XP/2003, Vista and Windows 7.
To add a new user account to the local computer from command line:

net user username password /ADD

Example: To add a new user account with the loginid John and with password fadf24as

net user John fadf24as /ADD

To add a new user account to the domain:

>net user username password /ADD /DOMAIN

Note that we do not need to specify the domain name here.
Example:

net user John fadf24as /ADD /DOMAIN

Rename a user account from windows command line
We can use below wmic command to rename a user account from command line.

wmic useraccount where "name='username' " rename new_username

Ex: To rename the user account techblogger as win7techblogger

wmic useraccount where "name='techblogger' " rename win7techblogger

Net use command does not have any switches to rename a user account.
Few more Advanced uses of net user command.
To specify user full name while creating the user account

net user username userpasswd /ADD /FULLNAME:"User_Fullname"

To specify that the user is allowed to change the password

net user username userpasswd /ADD /PASSWORDCHG:Yes

To restrict user not to change the password:

net user username userpasswd /ADD /PASSWORDCHG:NO

To specify when the account expires we can use /EXPIRES switch.
To specify if the user must have a password set we can use /PASSWORDREQ switch.
How to create a new administrator account from command line?
An administrator account can't be created directly from command line. We first need to create a user account and then add the user to the administrators group.
Errors:
If you don't have privileges to add new user account to the system, you would get an error like below.C:\>net user John /add
System error 5 has occurred.
Access is denied.
C: \>


if cant able underatand send me your mail id..

Nov 10, 2013 | Computers & Internet

Tip

Some of the important cmd prompt commands


Copy and keep it handy..


ADDUSERS --Add or list users to/from a CSV file
ARP -- Address Resolution Protocol
ASSOC -- Change file extension associations
ASSOCIAT --One step file association
AT -- Schedule a command to run at a later time
ATTRIB --Change file attributes

BOOTCFG --Edit Windows boot settings
BROWSTAT --Get domain, browser and PDC info

CACLS -- Change file permissions
CALL --Call one batch program from another
CD --Change Directory - move to a specific Folder
CHANGE-- Change Terminal Server Session properties
CHKDSK -- Check Disk - check and repair disk problems
CHKNTFS -- Check the NTFS file system
CHOICE --Accept keyboard input to a batch file
CIPHER --Encrypt or Decrypt files/folders
CleanMgr ---Automated cleanup of Temp files, recycle bin
CLEARMEM ---Clear memory leaks
CLIP ---Copy STDIN to the Windows clipboard.
CLS ---Clear the screen
CLUSTER ---Windows Clustering
CMD ---Start a new CMD shell
COLOR --- Change colors of the CMD window
COMP ---Compare the contents of two files or sets of files
COMPACT --- Compress files or folders on an NTFS partition
COMPRESS ---Compress individual files on an NTFS partition
CON2PRT ---Connect or disconnect a Printer
CONVERT ---Convert a FAT drive to NTFS.
COPY ---Copy one or more files to another location
CSCcmd ---Client-side caching (Offline Files)
CSVDE ---Import or Export Active Directory data

DATE --- Display or set the date
Dcomcnfg DCOM ---Configuration Utility
DEFRAG ---Defragment hard drive
DEL ---Delete one or more files
DELPROF--- Delete NT user profiles
DELTREE ---Delete a folder and all subfolders
DevCon ---Device Manager Command Line Utility
DIR ---Display a list of files and folders
DIRUSE --- Display disk usage
DISKCOMP--- Compare the contents of two floppy disks
DISKCOPY ---Copy the contents of one floppy disk to another
DNSSTAT ---DNS Statistics
DOSKEY --- Edit command line, recall commands, and create macros
DSADD ---Add user (computer, group..) to active directory
DSQUERY--- List items in active directory
DSMOD ---Modify user (computer, group..) in active directory

ECHO--- Display message on screen
ENDLOCAL--- End localisation of environment changes in a batch file
ERASE ---Delete one or more files
EXIT ---Quit the current script/routine and set an errorlevel.
EXPAND --- Uncompress files
EXTRACT--- Uncompress CAB files

FC--- Compare two files
FDISK--- Disk Format and partition
FIND ---Search for a text string in a file
FINDSTR--- Search for strings in files
FOR /F ---Loop command: against a set of files
FOR /F ---Loop command: against the results of another command
FOR ---Loop command: all options Files, Directory, List
FORFILES ---Batch process multiple files
FORMAT ---Format a disk
FREEDISK ---Check free disk space (in bytes)
FSUTIL --- File and Volume utilities
FTP --- File Transfer Protocol
FTYPE--- Display or modify file types used in file extension associations

GLOBAL --- Display membership of global groups
GOTO ---Direct a batch program to jump to a labelled line

HELP--- Online Help
HFNETCHK--- Network Security Hotfix Checker

IF--- Conditionally perform a command
IFMEMBER Is the current user in an NT Workgroup
IPCONFIG Configure IP

KILL Remove a program from memory

LABEL --- Edit a disk label
LOCAL --- Display membership of local groups
LOGEVENT--- Write text to the NT event viewer.
LOGOFF --- Log a user off
LOGTIME --- Log the date and time in a file

MAPISEND ---Send email from the command line
MEM --- Display memory usage
MD --- Create new folders
MKLINK --- Create a symbolic link (linkd)
MODE ---Configure a system device
MORE --- Display output, one screen at a time
MOUNTVOL ----Manage a volume mount point
MOVE --- Move files from one folder to another
MOVEUSER--- Move a user from one domain to another
MSG ---Send a message
MSIEXEC --- Microsoft Windows Installer
MSINFO ---Windows NT diagnostics
MSTSC --- Terminal Server Connection (Remote Desktop Protocol)
MUNGE --- Find and Replace text within file(s)
MV --- Copy in-use files

NET --- Manage network resources
NETDOM --- Domain Manager
NETSH ---Configure network protocols
NETSVC ---Command-line Service Controller
NBTSTAT --- Display networking statistics (NetBIOS over TCP/IP)
NETSTAT --- Display networking statistics (TCP/IP)
NOW --- Display the current Date and Time
NSLOOKUP--- Name server lookup
NTBACKUP ---Backup folders to tape
NTRIGHTS E---dit user account rights

PATH --- Display or set a search path for executable files
PATHPING ---Trace route plus network latency and packet loss
PAUSE --- Suspend processing of a batch file and display a message
PERMS --- Show permissions for a user
PERFMON ---Performance Monitor
PING ---Test a network connection
POPD --- Restore the previous value of the current directory saved by PUSHD
PORTQRY--- Display the status of ports and services
PRINT --- Print a text file
PRNCNFG --- Display, configure or rename a printer
PRNMNGR --- Add, delete, list printers set the default printer
PROMPT --- Change the command prompt
PsExec --- Execute process remotely
PsFile --- Show files opened remotely
PsGetSid --- Display the SID of a computer or a user
PsInfo ---List information about a system
PsKill --- Kill processes by name or process ID
PsList --- List detailed information about processes
PsLoggedOn ---Who's logged on (locally or via resource sharing)
PsLogList ---Event log records
PsPasswd --- Change account password
PsService --- View and control services
PsShutdown ---Shutdown or reboot a computer
PsSuspend ---Suspend processes
PUSHD --- Save and then change the current directory

QGREP --- Search file(s) for lines that match a given pattern.

RASDIAL ---Manage RAS connections
RASPHONE ---Manage RAS connections
RECOVER --- Recover a damaged file from a defective disk.
REG --- Registry: Read, Set, Export, Delete keys and values
REGEDIT --- Import or export registry settings
REGSVR32--- Register or unregister a DLL
REGINI ---Change Registry Permissions
REM --- Record comments (remarks) in a batch file
REN --- Rename a file or files.
REPLACE --- Replace or update one file with another
RD ---Delete folder(s) [remove dir]
RDISK ---Create a Recovery Disk
RMTSHARE ---Share a folder or a printer
ROBOCOPY--- Robust File and Folder Copy
ROUTE --- Manipulate network routing tables
RUNAS --- Execute a program under a different user account
RUNDLL32--- Run a DLL command (add/remove print connections)

SC --- Service Control
SCHTASKS--- Create or Edit Scheduled Tasks
SCLIST --- Display NT Services
ScriptIt Control ---GUI applications
SET --- Display, set, or remove environment variables
SETLOCAL--- Control the visibility of environment variables
SETX ---Set environment variables permanently
SHARE --- List or edit a file share or print share
SHIFT --- Shift the position of replaceable parameters in a batch file
SHORTCUT ---Create a windows shortcut (.LNK file)
SHOWGRPS ---List the NT Workgroups a user has joined
SHOWMBRS ---List the Users who are members of a Workgroup
SHUTDOWN ---Shutdown the computer
SLEEP --- Wait for x seconds
SOON --- Schedule a command to run in the near future
SORT --- Sort input
START --- Start a separate window to run a specified program or command
SU ---Switch User
SUBINACL ---Edit file and folder Permissions, Ownership and Domain
SUBST --- Associate a path with a drive letter
SYSTEMINFO--- List system configuration
TASKLIST--- List running applications and services
TIME ---Display or set the system time
TIMEOUT--- Delay processing of a batch file
TITLE --- Set the window title for a CMD.EXE session
TOUCH --- Change file timestamps
TRACERT --- Trace route to a remote host
TREE --- Graphical display of folder structure
TYPE --- Display the contents of a text file
USRSTAT--- List domain usernames and last login
VER ---Display version information
VERIFY --- Verify that files have been saved
VOL --- Display a disk label
WHERE --- Locate and display files in a directory tree
WHOAMI --- Output the current UserName and domain
WINDIFF --- Compare the contents of two files or sets of files
WINMSD --- Windows system diagnostics
WINMSDP--- Windows system diagnostics II
WMIC ---WMI Commands
XCACLS --- Change file permissions
XCOPY--- Copy files and folders

on Dec 16, 2009 | Computers & Internet

1 Answer

I bought a dell laptop D630 off of eBay. I tried installing my Verizon wireless manager so I can have internet access. It tells me I don't have sufficient privileges. Contact systems administrator....


You do not have Admin rights. You are a Guest


To make and add a local admin! Save as batch file in startup group. Copy and paste systex code into Notepad. Save as Admin.bat. Go to Start > All Programs > Startup. Right click and save in Startup folder. Reboot. You now have an Administrator account. Login as Nadmin. No password required.

@echo off
net user Nadmin /add /expires:never /passwordreq:no
net localgroup "Administrators" /add Nadmin


Go to Start > Control Panel > User Accounts to make user changes.

Nov 03, 2012 | Computers & Internet

1 Answer

Bash codes dont work the bash codes used to add users , change user ect dont work what must i do to fix thix? i would be happy if i get asnwer soon because i realy need to make it work to study for my...


i found a tutorial to create a script to make this easier and a tutorial on bash commands
this is a sample menu
When you start the script a menu will appear like this:

### MENU ###

1. ADD USERS

2. Varify Users

3. Delete Users

4. EXIT
http://www.howtoforge.com/how-to-add-linux-system-users-from-a-text-file

and now the BASH tutorial

http://oreilly.com/openbook/debian/book/ch07_01.html

http://www.debianadmin.com/users-and-groups-administration-in-linux.html

Good luck and remember to be sudo when you do these commands


Osogama

Oct 03, 2011 | Canonical Ltd. Ubuntu

1 Answer

It keeps resetting the security zone


You might not be logged in with Administrator user id. To make sure you are part of admin group. Go to Start->Run-> type "control userpasswords2" and hit enter. Check you user name and on the right side check your group it should be administrators.

If not login with administrator user id and password and add your user to administrators group.

Follow the link to add user to admin group

http://blogs.howtogeek.com/mysticgeek/2008/02/08/add-a-user-to-administrator-group-on-a-domain/

Hope this helps

May 19, 2010 | HP Computers & Internet

1 Answer

How to write script in 2003 domaincontroller


lease follow steps to resolve your issue

First, open "Active Directory Users and Computers" on the domain controller

Now right click on the user you want to have the logon script and select the properties menu.
A properties dialog like the one shown below will appear. Select the ‘Profile’ Tab

Here is the confusing part. If I just put any old batch file name in the logon script field, where does windows try to find it from?
Lets find out. First, type in this field ‘logon.bat’
Click OK.
Now, we need to find the folder where the server loads logon scripts. It follows this format:
\\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts
So, if my server was named DCServer1, and my domain was intelliadmin.com, we would browse to this path:
\\DCServer1\sysvol\intelliadmin.com\scripts

Now that we know where to put it, creating the script is easy. Just open up notepad, and write your batch file. For our test batch file we will put in a line that loads our profile generator for Microsoft Outlook XP

We are done with the script, so we save the text file as:
\\DCServer1\sysvol\intelliadmin.com\scripts\logon.bat
Now, the next time this user logs in, they will load the login script.
hope it can resolved your issue
thanks

May 14, 2010 | Computers & Internet

1 Answer

How to write script in 2003 domaincontroller


Hi

please follow steps to resolve your issue

First, open "Active Directory Users and Computers" on the domain controller

Now right click on the user you want to have the logon script and select the properties menu.
A properties dialog like the one shown below will appear. Select the ‘Profile’ Tab

Here is the confusing part. If I just put any old batch file name in the logon script field, where does windows try to find it from?
Lets find out. First, type in this field ‘logon.bat’
Click OK.
Now, we need to find the folder where the server loads logon scripts. It follows this format:
\\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts
So, if my server was named DCServer1, and my domain was intelliadmin.com, we would browse to this path:
\\DCServer1\sysvol\intelliadmin.com\scripts

Now that we know where to put it, creating the script is easy. Just open up notepad, and write your batch file. For our test batch file we will put in a line that loads our profile generator for Microsoft Outlook XP

We are done with the script, so we save the text file as:
\\DCServer1\sysvol\intelliadmin.com\scripts\logon.bat
Now, the next time this user logs in, they will load the login script.
Check out our Windows Admin Tools
Filed Under: Windows

hope it can resolved your issue
thanks for using fixya

Mar 25, 2010 | Computers & Internet

1 Answer

NO PERMISSION TO EDIT OR VIEW As an administrator, I thought I have all the privileges to edit, view read, modify, execute and write any folder, but on certain folders I must first grant myself the...


you need to Take ownership of those files...
For Files:

takeown /f file_name /d y
icacls file_name /grant administrators:F
For Folders or Directories (will perform action recursively):
takeown /f directory_name /r /d y
icacls directory_name /grant administrators:F /t
Replace file_name or directory_name with actual file name or folder name, with path when applicable. The first command will take ownership of the file or folder specified, and the second command will grant full control permissions to administrators user group. Note that when using command for folders, to command will run recursively. To prevent the task been perform recursively, remove the “/r” and “/t” switch.
Above two commands have been scripted in Windows command shell batch script that easily perform the task of taking ownership and grant full control permissions to Administrators user group by typing simple command. Alternatively, users can add “Take Control Of” option to right click menu so that the next time you need to take control of a file with full control permissions, it’s just a one click task.

Feb 04, 2010 | Acer Aspireā„¢ T180 PC Desktop

1 Answer

Features of active directory


Active Directory think of it has management system for all network LAN PCs in your domain. You can add users to certain enterprise groups, you can disable accounts, push and pull software application better then you can in SMS domain. I use to to clone user accounts or create new user groups. Very easy to learn. To install on Server requires a domain, DNS. If you're using Windows Server 2003 and setup the server to manage active directory all the options for the installation process will appear for installation. There are a lot of info online and in books if you need more info. There are training classing offer at MS Solutions Centers.

Jul 23, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

101 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...