The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > 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 11:10 AM
Perl code to differentiate numeric and non-numeric input Raynon Shell Programming and Scripting 11 08-04-2007 11:32 AM
Checking numeric value malaymaru Shell Programming and Scripting 6 05-25-2007 09:42 PM
non-numeric argument TiredOrangeCat UNIX for Dummies Questions & Answers 3 02-13-2007 02:37 AM
Convert string to numeric kflee2000 Shell Programming and Scripting 3 11-19-2003 11:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-13-2008
aryamahzar aryamahzar is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 2
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
  #2 (permalink)  
Old 06-13-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,123
There will be some problems with this. Consider:
chown $user somefile
-->
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.
  #3 (permalink)  
Old 06-13-2008
rhfrommn rhfrommn is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2003
Location: Minnesota
Posts: 424
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.
  #4 (permalink)  
Old 06-14-2008
aryamahzar aryamahzar is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 2
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
  #5 (permalink)  
Old 06-14-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,123
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...
  #6 (permalink)  
Old 06-14-2008
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,123
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.
Closed Thread

Bookmarks

Tags
solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0