[SOLVED] Adding users with command prompt

I'm doing as the beginers guide says for adding non-sudo users to my installation. I'm using
adduser
to do this. For the bash bit is pressing enter to just have /bin/bash, which I assume is default ok? I also pressed enter to have default for user ID. The longer way around it had this as an example:
useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash archie
I'm looking in particular at the /bin/bash archie bit at the end. Do I leave it or make sure it's got the name of the user at the end e.g. in my case
/bin/bash ben
? It's just when I tried to do that the first time It gave me some message about it not being there.
Last edited by Ben9250 (2010-07-05 21:47:05)

Ah misread, solved it!

Similar Messages

  • Lenovo has different F8 screen, can't get to safe mode with command prompt - account locked out

    Thinkpad W500, Win7Pro.  Can't login: "the referenced account is currently locked out and may not be logged on to". I need to boot to safe mode with command prompt to enable the Administrator account (disabled by default) with a "net user administrator /active:yes" command, but Lenova has their own recovery and interfaces which are preventing me from accessing with normal windows techniques. I either need to be able to get a command prompt on the true C: drive, or reset this lockout situation, and fast...  Waiting more than 180 minutes did not work, and using system restore is not an option-key software patches and additions make this very unattractive, and I know how to do that. 
    Optional Information:
    Computer OS: Windows 7
    Browser: IE
    Already Tried:
    -ThinkVantage button (reg and advanced views) -a boot disk for pwd reset program (I know password, but I am locked out - didn't help) -F8, Repair options and all safe modes -NOT system restore, as we are trying to not undo months of software revisions - we just need to login!

    If we take the error messages seriously, then probably the first thing that you would have to do would be to replace the malformed library:
    /System/Library/Frameworks/Security.framework/Versions/A/Security
    If you have another computer with the same operating system, you could connect via target disk mode and copy over the good library to replace the bad one. I don't know if this library is different between 10.2.6 and 10.2.8. If the library were fixed, that might solve your other problems and it might not. There is no way for us to know.
    Alternatively, you could do an archive and install.

  • -Xlint warning when compiling with command prompt.

    1 of the method i write in the program has a compilation warning when compiling with command prompt. When i compile the codes with the application i used to write the program has no error at all. Below is my code:
    private static ArrayList readNum(String NumFile)
    ArrayList key = new ArrayList();
    String keyAttributes = readInput(NumFile);
    StringTokenizer stk = new StringTokenizer(keyAttributes);
    while(stk.hasMoreTokens())
    key.add(stk.nextToken());
    return key;
    When i javac the program with -X;int, this errror occured:
    warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList
    key.add(stk.nextToken());
    ^
    1 warning
    Anyidea how to solve this problem? Thanks for the help.

    A quick google for that message would have told you that you're not using generics and the compiler complains about that.
    Google for "Java Generics" to find out what all the fuss is about.

  • Create WiFi Hotspot with Command Prompt?

    I was trying to create WiFi Hotspot on my Windows 7-32bit running laptop using the command promt method after followinng the instructions from here >> http://www.techswatch.com/2014/11/create-wifi-hotspot-windows-87-command-prompt.html However, the problem is, after creating the hostpot, when I enter the password it does get connected but I cannot access the internet. I am sure that I have entered the correct password else it wouldn't have got connected. Any idea what could have gone wrong or if I need to follow anything else? Any help would be apprecited. 

    I think it is better to use Wi-Fi creator to create WiFi in laptop. Search 160 WiFi in Google!

  • Using Javadoc with Command Prompt

    Hi is there anyway where I can use javadoc using command prompt?
    my friend said is
    "C:>javadoc *.java"
    but it did not work for me but can work for him...
    any help pls?
    THanks

    Search for the file javadoc.exe in your computer.
    If found, change to that directory* and issue a valid javadoc.command.
    If not found, download and install Java's JDK, which contains the file.
    * You can also set your os's path variable to include this directory.

  • Adding License from command prompt .

    Dear Guru ,
                  I want to add the SAP licence from command prompt on windows server , So kindly give me what command and syntax i have to use . Kindly let me know .
    Regards
    Selvan .SP

    HI,
    If you are using ECC 6.0 then use tcode SLICENSE to install license.
    Products based on NW 7.0 use a "new" license (digitally signed) which can´t be imported any more using program saplicense.
    regards,
    kaushal

  • Adding users with special characters results in error

    Hi all,
    I know it is not best practice to implement a Active Directory with user names containing special characters.
    Unfortunately, we come across some sites that do have these special characters in their user names.
    So, maybe it is a reason to tell the customer to reevaluate their naming policy, but in some cases this is
    just not possible / desirable. What we see when you try to add a user in the Sun VDI portal (1801) with
    a special character in his or her name, the VDI Portal goes back to the main login screen of the portal and
    displays an error:
    Internal Error Occurred!
    You have been logged out because a consistent response could not be guaranteed.
    If the error continues to occur, contact your local technical support and provide .....
    Does anyone know a workaround / fix for this.
    We are running Sun VDI 3.1 Revenue Release.
    Kind regards,
    Sander

    Svanderpost
    Open a support call with Sun there is a fix for this issue.

  • OIF Adding User with UserFactory

    I have a servlet and I'm trying to add (and delete) a user using the UserFactory object. I can connect and search for the user just fine, but Add and Delete return "oracle.ldap.util.schema.ODISchemaException" with no other explanation.
    The code is basically right of the doc:
    ModPropertySet mps = new ModPropertySet();
                        mps.addProperty("cn", userID);
                        mps.addProperty("sn", userID);
                        IdmUser idmUser = uf.createUser(userDN,mps,false);
    Any ideas would be greatly appreciated.

    To anyone interested I gave up on the UserFactory object (and regular JNDI) and used the LDAP library from UnboundID.

  • After adding datafile with OEM a trace file genarating in alertSID.log file

    Hi to All,
    I have added a datafile with OEM but while adding its taking some time so terminated that program and added the datafile with command prompt but after some time i seen that datafile in datafile list and after this thing Im getting error and our server is very slow users gettting access to over server very slow and a trace file is generating in over alertSID.log file.with system language.

    user12239004 wrote:
    Hi anurag,
    # ls -lart /dev/vx/rdsk/datadg |grep his_link_y10_01_index
    crw------- 1 oracle dba 315,129093 Mar 14 09:53 his_link_y10_01_index_ts01
    crw------- 1 root root 315,129077 Mar 15 13:58 his_link_y10_01_index_ts02
    # chown oracle:dba his_link_y10_01_index_ts02
    # ls -lart /dev/vx/rdsk/datadg |grep his_link_y10_01_index
    crw------- 1 oracle dba 315,129093 Mar 14 09:53 his_link_y10_01_index_ts01
    crw------- 1 oracle dba 315,129077 Mar 15 13:58 his_link_y10_01_index_ts02
    root : root , I have changed the permisison now .. hope the error will subside and my next startup will be smooth
    Regards,Great,
    So give a try and let us know if you see any problem.
    Regards
    Anurag

  • Selecting different homes from command prompt

    Hi Gurus,
    Oracle client-9201
    Oracle client-10201
    Win XP SP2
    We have two oracle homes. We want to switch it from one to another. We have restriction that this should be done from command prompt only. Although I can change homes launching latest OUI and going to "INSTALLED PRODUCTS" tab where we find ENVIRONMENT tab. There it is possible to change home and apply. But this thing I want to do from command prompt.
    Any help will be highly appreciated.
    Regards.
    Virendra

    No, you don't want it to be from a command prompt and from OUI. What you want is to be able to do this without the need to visit all 400 client boxes. The method is irrelevant, as long as it efficiently achieves your real goal.That is true.
    You keep saying "command prompt" and "OUI", but can't visit all the necessary machines. So what were you envisioning? Creating some batch file you could distribute to all affected users over the network, and ask them to execute said batch file? That may (or may not) be valid, but to find the best solution we have to clearly define the real requirements and separate that from any pre-concieved solution.You can say it is my pre-concieved assumption that I will go with Command Prompt/OUI. But the real problem is I don't want to visit all machines. It can be a batch file distributed to all machines or our network people may execute it sitting on domain controller machine from which he can run programs in background of any machine in network.
    From the other things discussed on this thread, I suspect you are going to have to blow in some registry hack, by one of several possible means. But first we have to know what your real constraints are and all of the options open to you.Real constraint is, We don't want (rather can't) visit all 400 terminals.
    Do you have the ability to push registry settings at client logon?Yes, We can.
    Can you guarantee the consistency of configuration of all 400 clients?Home name and Location may be different on different machines.
    Do you have the ability to force the automatic execution of a command file from a file server and client log-on time?Yes, it is possible.
    Are you working with your network people to explore what help they might be able to provide on the above points?They may help us depending upon the requirement.
    Regards
    Virendra

  • Running command from command prompt

    hai all,
    iam using Javamail to send emails. for that iam using the command prompt.the code for executing the commands from the command prompt is as given below.
    public static String runCommand(String s)
    String result=new String();
         try
         //the command is executed and stored in 'p'
         Process p=Runtime.getRuntime().exe("cmd /c "+s);
         result=(loadStream(p.getInputStream()));
         if(p.waitFor()!=0)
         System.out.println("Exit Value = "+p.exitValue());
         System.out.println("Wait for = "+p.waitFor());
    System.out.println("Result is "+result);
         catch(IOException e)
    System.out.println("IO Exception");
         e.printStackTrace();
         catch(InterruptedException e)
    System.err.println("Interrupted waiting for process!");
         return result;
    the contents of the 'javamail' directory are
    activation.jar, mail.jar, Msgmultisendsample.java and Msgmultisendsample.class
    in the first call to this method i pass the string "set classpath=%classpath%;e:\javamail\mail.jar;e:\javamail\activation.jar;e:\javamail; " here i set the classpath since i will be executing the command from the command prompt.the command works fine and the exitValue() is 0.
    in the second call to this method i pass the string "java Msgmultisendsample [email protected] abc 123.456.789.012 true" for running the Msgmultisendsample.class file. but i get the exitValue() as 1 and the command is not getting executed. i dont know how handle this change in the exitValue().
    both the above commands works fine if i run directly from C:\ but not when called to this method.
    Please help me out people, i will be glad to receieve the replies as early as possible since i have to submit this tomorrow.
    Thanks in advance,
    Jayanth.

    well, the problem is not with the command line arguments. it doesnt matter if we get the input from the user through command prompt or GUI. The problem is only in the handling of the change in exitValue during running.

  • TS4123 I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    I have problem with iTunes story (secure link to itunes store failed). I make In the "Command Prompt" screen, type in   netsh winsock reset the itune story is solve but after i close itunes the problem is back

    The results show that you have a proxy server set and this can often cause problems with iTunes.
    The proxy setting can be accessed in Internet options>>Connections>>LAN Settings.
    Try un-checking the proxy server check box.
    It might also be a good idea to run a malware check if you didn't know you had the proxy server set.
    You can download a free version of an excellent scanner- Malwarebytes here:
    http://www.malwarebytes.org/

  • User with admin rights can't access files through the command prompt

    I have a strange situation where I have 2 users both setup exactly the same with admin rights on a 2003 (32 bit) server through an AD group membership, but one can do everything as expected but the other can't.
    The one that can't is trying to execute a program is a command prompt and keeps getting access denied or invalid directory when trying to cd into the folder.   I double and tripled check the permissions and they are correct, this person should have
    full admin.  In fact I did a effective permissions through explorer and it states full rights.  Along those lines this person can also access the folder in question through explorer just not a command prompt. 
    Has anyone seen this before ? and if so what can be done about it.
    Thanks

    Hi,
    Can the user execute the program through explorer? In Windows Server 2003, the Users group does not have Read and Execute permissions to the command processor (Cmd.exe). 
    You could refer to the article below to resolve the issue:
    "Access is denied" error message when you run a batch job on a Windows Server 2003-based computer
    http://support.microsoft.com/kb/867466
    Best Regards,
    Mandy 
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Problem with JUnit Testing from Command Prompt

    Hi There,
    Related Info:
    OS - Windows 7 32 Bit, IDE Used: Eclipse
    I'm using the following command to compile the java file from the command prompt:
    C:\Users\J\Desktop> javac -classpath .:junit.jar check4PrimeTest.java
    I get the error: "package junit.framework does not exist import junit.framework.*;"
    How can i fix this?
    I have downloaded junit from junit.org the 'junit4.10' and extracted in my Java Folder along side jdkjdk1.7.0_03, jre6, jre7.
    I will post my code below for the 'check4PrimeTest.java' file which im trying to test from the command prompt.
    package check4prime;
    // check4PrimeTest.java
    //Imports
    import junit.framework.*;
    public class check4PrimeTest extends TestCase {
         //Initialize a class to work with.
         private check4Prime check4prime = new check4Prime();
         //constructor
         public check4PrimeTest (String name) {
              super(name);
         //Main entry point
         public static void main(String[] args) {
              System.out.println("Starting test...");
              junit.textui.TestRunner.run(suite());
              System.out.println("Test finished...");
         } // end main()
         //Test case 1
         public void testCheckPrime_true() {
              assertTrue(check4prime.primeCheck(3));
         //Test cases 2,3
         public void testCheckPrime_false() {
              assertFalse(check4prime.primeCheck(0));
              assertFalse(check4prime.primeCheck(1000));
         //Test case 7
         public void testCheck4Prime_checkArgs_char_input() {
              try {
                   String [] args= new String[1];
                   args[0]="r";
                   check4prime.checkArgs(args);
                   fail("Should raise an Exception.");
              } catch (Exception success) {
                   //successful test
         } //end testCheck4Prime_checkArgs_char_input()
         //Test case 5
         public void testCheck4Prime_checkArgs_above_upper_bound() {
              try {
                   String [] args= new String[1];
                   args[0]="10001";
                   check4prime.checkArgs(args);
                   fail("Should raise an Exception.");
              } catch (Exception success) {
                   //successful test
         } // end testCheck4Prime_checkArgs_upper_bound()
         //Test case 4
         public void testCheck4Prime_checkArgs_neg_input() {
              try {
                   String [] args= new String[1];
                   args[0]="-1";
                   check4prime.checkArgs(args);
                   fail("Should raise an Exception.");
              } catch (Exception success) {
                   //successful test
         } // end testCheck4Prime_checkArgs_neg_input()
         //Test case 6
         public void testCheck4Prime_checkArgs_2_inputs() {
              try {
                   String [] args= new String[2];
                   args[0]="5";
                   args[1]="99";
                   check4prime.checkArgs(args);
                   fail("Should raise an Exception.");
               } catch (Exception success) {
                   //successful test
         } // end testCheck4Prime_checkArgs_2_inputs
         //Test case 8
         public void testCheck4Prime_checkArgs_0_inputs() {
              try {
                   String [] args= new String[0];
                   check4prime.checkArgs(args);
                   fail("Should raise an Exception.");
              } catch (Exception success) {
                   //successful test
         } // end testCheck4Prime_checkArgs_0_inputs
         //JUnit required method.
         public static Test suite() {
              TestSuite suite = new TestSuite(check4PrimeTest.class);
              return suite;
         } //end suite()
    } //end check4PrimeTestEdited by: 963042 on Oct 3, 2012 8:57 PM
    Edited by: 963042 on Oct 3, 2012 10:07 PM

    963042 wrote:
    C:\Users\J\Desktop> javac -classpath .:junit.jar check4PrimeTest.javaThat's the Linux way to do it. On windows there is a different list separator. Use this:
    javac -cp .;junit.jar check4PrimeTest.java
    And use -cp to save you some typing ;) If you want to incorporate unit testing into your builds I would suggest looking into automating it a little more through tool such as ant, maven, etc.

  • Create Users with Mail enabled in dscl or command line

    I have figured out how to use the dscl to add a user.
    example:
    $ sudo dscl . create /users/rothman uid 701
    $ sudo dscl . create /users/rothman gid 20
    $ sudo dscl . create /users/rothman realname "Ernest Rothman"
    $ sudo dscl . create /users/rothman passwd \*
    I went as far as to launch WorkGroup manager to enable Mail.
    The following gave me the key values:
    dscl . read /Users/test MailAttribute > mailsettings.txt
    When I try to replace from the txt file. WorkGroup Manager than believes the Mail is not enabled.
    How do I use dscl or a terminal command to enable the user with mail server and to use IMAP Only?
    I do not want to always have to remotely connect to launch Workgroup Manager to enable mail for new users.
    I hope you can help for I am new dscl or even NetInfo command line tools.
    I have tried these, but I guess it does't like how it is being restored into that property.
    dscl . create /Users/test MailAttribute `< mailsettings.txt`
    <?xml version="1.0" encoding="UTF-8"?>
    <dict>
    <key>kAPOPRequired</key>
    <string>APOPNotRequired</string>
    <key>kAltMailStoreLoc</key>
    <string></string>
    <key>kAttributeVersion</key>
    <string>Apple Mail 1.0</string>
    <key>kAutoForwardValue</key>
    <string></string>
    <key>kIMAPLoginState</key>
    <string>IMAPAllowed</string>
    <key>kMailAccountLocation</key>
    <string>192.168.181.132</string>
    <key>kMailAccountState</key>
    <string>Enabled</string>
    <key>kPOP3LoginState</key>
    <string>POP3Deny</string>
    <key>kUserDiskQuota</key>
    <string>0</string>
    </dict>
    I have also tried appending by doing something like this.
    dscl . create /Users/test MailAttribute '<?xml version="1.0" encoding="UTF-8"?>’
    dscl . append /Users/test MailAttribute ‘<dict>’
    dscl . append /Users/test MailAttribute ‘<key>kAPOPRequired</key>’
    dscl . append /Users/test MailAttribute ‘<string>APOPNotRequired</string>’
    dscl . append /Users/test MailAttribute ‘<key>kAltMailStoreLoc</key>’
    dscl . append /Users/test MailAttribute ‘<string></string>’
    dscl . append /Users/test MailAttribute ‘<key>kAttributeVersion</key>’
    dscl . append /Users/test MailAttribute ‘<string>Apple Mail 1.0</string>’
    dscl . append /Users/test MailAttribute ‘<key>kAutoForwardValue</key>’
    dscl . append /Users/test MailAttribute ‘<string></string>’
    dscl . append /Users/test MailAttribute ‘<key>kIMAPLoginState</key>’
    dscl . append /Users/test MailAttribute ‘<string>IMAPAllowed</string>’
    dscl . append /Users/test MailAttribute ‘<key>kMailAccountLocation</key>’
    dscl . append /Users/test MailAttribute ‘<string>192.168.181.132</string>’
    dscl . append /Users/test MailAttribute ‘<key>kMailAccountState</key>’
    dscl . append /Users/test MailAttribute ‘<string>Enabled</string>’
    dscl . append /Users/test MailAttribute ‘<key>kPOP3LoginState</key>’
    dscl . append /Users/test MailAttribute ‘<string>POP3Deny</string>’
    dscl . append /Users/test MailAttribute ‘<key>kUserDiskQuota</key>’
    dscl . append /Users/test MailAttribute ‘<string>0</string>’
    dscl . append /Users/test MailAttribute ‘</dict>’

    Got it to take as a single statement.
    dscl . create /users/test applemail "<?xml version='1.0' encoding='UTF-8'?> <dict> <key>kAPOPRequired</key> <string>APOPNotRequired</string> <key>kAltMailStoreLoc</key> <string></string> <key>kAttributeVersion</key> <string>Apple Mail 1.0</string> <key>kAutoForwardValue</key> <string></string> <key>kIMAPLoginState</key> <string>IMAPAllowed</string> <key>kMailAccountLocation</key> <string>192.168.181.132</string> <key>kMailAccountState</key> <string>Enabled</string> <key>kPOP3LoginState</key> <string>POP3Deny</string> <key>kUserDiskQuota</key> <string>0</string> </dict>"
    Doing the above showed in WorkGroup manager and I tested and the user received a email, so now I can automate adding users without needing the GUI. *Just to note you still have to setup mail services and your virtual, aliases files for postfix. This is just so the user is opened up to be allowed to receive email in the first place.
    I still could not seem to pipe a file into dscl command even though the file was a single line of text. I had planned to embed this in a single command so no big deal.

Maybe you are looking for