[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Linux in General  |  Linux Development & Programming  |  Topic: user administration(2)
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: user administration(2)  (Read 1007 times)
0 Members and 1 Guest are viewing this topic.
purusrhce
Linux Noob !
*
Offline Offline

Posts: 11


View Profile
« on: October 01, 2006, 12:32:34 AM »

hi all,

      i am having an issue while creating user account. i wrote a script for creating a user account in the name of 132001 to 132050.
     when i run the script i am getting an error message showing invalid user account.But if i run the script to create a name (ex) ram, tony ..... i can create an user account. i am using redhat linux 9.
     can anyone pls tell me how to solve this problem.


Thanks in Advance,
Purushothaman.
Logged
gauravbajaj
LST CareTaker
Experienced
*****
Offline Offline

Posts: 597


View Profile
« Reply #1 on: October 04, 2006, 12:51:26 AM »

Ok

Just , send or Paste your scripting code here....,otherwise its difficult that where u r getting error...

Gaurav
Logged
purusrhce
Linux Noob !
*
Offline Offline

Posts: 11


View Profile
« Reply #2 on: October 04, 2006, 02:06:11 AM »

Quote from: "gauravbajaj"
Ok

Just , send or Paste your scripting code here....,otherwise its difficult that where u r getting error...

Gaurav


hi gaurav,

Here the script

for I in $ (seq 113001 113050)
do
useradd $I
echo password | passwd --stdin $I
chage -d 0 $I

             when i run this script i am getting invalid user name,but if i am doing like this i can create

for I in $@
do
useradd $I
echo password | passwd --stdin $I
chage -d 0 $I
 
            if i run this script (i.e) bash users ram tony ...........  i can create user accounts
              I want to create a user account in numbers i.e 113001, 113002 ...........  


I am waiting for your Reply.

Thanks in Advance,
Purushothaman.
Logged
dragoncity99
LST CareTaker
Experienced
*****
Offline Offline

Posts: 494


View Profile
« Reply #3 on: November 11, 2006, 10:43:09 PM »

Why not u try to debug the script using -x option while running ur shell script?

i.e.:

root@localhost# bash -x /path/to/your-script

i assume ur using bash shell scripting. If it's not sorry, u can ignore what i shared with you here.
Logged
gauravbajaj
LST CareTaker
Experienced
*****
Offline Offline

Posts: 597


View Profile
« Reply #4 on: June 13, 2007, 11:52:39 PM »

Do one  thing enclose your numbers i.e 113001 with single quotes, so that it behaves like chracter string .........

I haven't tried this as I dont have the Linux/Solaris PC having root privalages, but just give a try
Logged
Ujjwol
Linux Learner
***
Offline Offline

Posts: 54


View Profile
« Reply #5 on: August 11, 2007, 03:58:47 AM »

Do one  thing enclose your numbers i.e 113001 with single quotes, so that it behaves like chracter string .........

I haven't tried this as I dont have the Linux/Solaris PC having root privalages, but just give a try
what this all scripting about i wanna learn and join
Logged
gauravbajaj
LST CareTaker
Experienced
*****
Offline Offline

Posts: 597


View Profile
« Reply #6 on: September 18, 2007, 06:27:34 AM »

We were talking about shell scripting , search google to know more.

Thanks
Gaurav
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
FOR LINUX GURU'S (SYSTEM ADMINISTRATION) Linux Servers Support akshatyadav 1 781 Last post July 08, 2004, 11:43:08 AM
by Ricky
How to make an oradinary user as a root user Miscellaneous pankaj4664 1 690 Last post November 24, 2005, 04:32:03 AM
by cyberjun
user administration Miscellaneous purusrhce 3 555 Last post September 13, 2006, 12:31:39 AM
by purusrhce
administration General Networking Support in Linux purusrhce 6 819 Last post June 30, 2007, 12:23:58 AM
by aktiwari4u
which is Best GUI Linux System Administration Utility Linux Application sussane 2 426 Last post June 30, 2007, 12:28:13 AM
by aktiwari4u
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2008, 11:21:07 AM

Login with username, password and session length
Navigation
Recent Discussions
[November 20, 2008, 11:30:52 PM]

[November 19, 2008, 07:52:41 PM]

[November 19, 2008, 07:52:36 PM]

[November 17, 2008, 10:42:59 AM]

[November 16, 2008, 12:49:47 AM]

[November 16, 2008, 12:48:58 AM]

[November 15, 2008, 08:29:02 AM]

[November 15, 2008, 08:24:41 AM]

[November 14, 2008, 05:11:50 AM]

[November 13, 2008, 03:28:22 AM]
Members
Total Members: 6227
Latest: karunadct
Stats
Total Posts: 8269
Total Topics: 2253
Online Today: 10
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 8
Total: 8
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc