The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Numeric Validation sumesh.abraham Shell Programming and Scripting 12 08-04-2008 07:10 AM
Perl code to differentiate numeric and non-numeric input Raynon Shell Programming and Scripting 11 08-04-2007 07:32 AM
Checking numeric value malaymaru Shell Programming and Scripting 6 05-25-2007 05:42 PM
non-numeric argument TiredOrangeCat UNIX for Dummies Questions & Answers 3 02-12-2007 10:37 PM
Convert string to numeric kflee2000 Shell Programming and Scripting 3 11-19-2003 07:21 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-13-2008
Registered User
 

Join Date: Jun 2008
Posts: 2
Stumble this Post!
Smile Using all numeric for username

Hello,

We have a Solaris 9 machine and recently our client want to create username based on staff numbers (all numeric).

Is there any limitation in Solaris regarding creating username with numeric values (eg: 13598029)?

Thanks & Regards

Aryawarman Mahzar
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-13-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,450
Stumble this Post!
There will be some problems with this. Consider:
Code:
chown $user somefile
The chown looks at the first argument. If $user is non-numeric like, say, "fred", chown will look up the numeric uid and use that. But if the first argument is something like "13598029", no look-up occurs. Chown simply uses 13598029 as the numeric uid. The passwd file man page says:
Quote:
"The first character should be alphabetic and the field should contain at least one lower case alphabetic character. A warning message is displayed if these restrictions are not met."
If you don't follow these instructions, expect to have problems. I don't know how many problems to expect because I have never tried it. But the use of the word "should" rather than "must" is an indication that it's possible. If you go ahead with this, please keep a list of the problems that ensue and post it here. Then we'll have a more complete answer ready for the next person who wants to try this.
Reply With Quote
  #3 (permalink)  
Old 06-13-2008
Registered User
 

Join Date: Nov 2003
Location: Minnesota
Posts: 387
Stumble this Post!
Our company assigns usernames based on staff ID numbers, but prepends a u for "user" or c for "contractor" depending on your status. So employee 12345 is u12345 and contractor 67890 is c67890. Easy, predictable, and avoids the problems perderabo was talking about in his posts. Maybe you could try something like that instead.
Reply With Quote
  #4 (permalink)  
Old 06-14-2008
Registered User
 

Join Date: Jun 2008
Posts: 2
Stumble this Post!
Lightbulb

Thank you all for replying...

Unfortunately the clien staff numbers is already 8 digit long, so I can't add more character in front of it

I'm still looking for a way to overcome this problem other than saying to the customer that it can't be done , based on little testing, the username with all numeric have problems when the user tries to connect to CDE GUI, an error message appeared in /var/adm/messages:

Jun 13 16:23:37 uajkt1 /usr/dt/bin/ttsession[27496]: [ID 848021 daemon.error] _Tt_iceauth::make_auth_cookie(): timeout in locking authority file '/home/13598029/.TTauthority'

It seems that DT unable to create .TTauthority in the user's home directory
Reply With Quote
  #5 (permalink)  
Old 06-14-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,450
Stumble this Post!
You might try making the user name the same as the uid. So user named "13598029" would just happen to have a uid of 13598029. Then when software mistakes one for the other... it's still right.

No guarantees though....just a random thought...
Reply With Quote
  #6 (permalink)  
Old 06-14-2008
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,450
Stumble this Post!
Quote:
Originally Posted by aryamahzar View Post

Unfortunately the clien staff numbers is already 8 digit long, so I can't add more character in front of it
I have seen long user names in use on Solaris. Creates problems too, but a different set of problems. I'm not sure what happens if the first 8 characters are not unique. But provided that you are using a local /etc/passwd file, It probably would mostly work.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0