Using all numeric for username


 
Thread Tools Search this Thread
Operating Systems Solaris Using all numeric for username
# 1  
Old 06-13-2008
Bug 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  
Old 06-13-2008
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.
# 3  
Old 06-13-2008
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  
Old 06-14-2008
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 Smilie

I'm still looking for a way to overcome this problem other than saying to the customer that it can't be done Smilie, 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 Smilie
# 5  
Old 06-14-2008
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  
Old 06-14-2008
Quote:
Originally Posted by aryamahzar

Unfortunately the clien staff numbers is already 8 digit long, so I can't add more character in front of it Smilie
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Why does "ps -[u|U] username" not list processes when username is numeric?

Greetings, The title pretty much says it all. I've snooped everywhere and can't find anything on this. Since our organization went to numeric usernames, using the u|U option for ps returns no processes. Example passwd entry: 320074:DjZAJKXun8HBs:10129:6006:Joe Y:/cadhome/analysis/jy:/bin/bash... (4 Replies)
Discussion started by: crimso
4 Replies

2. Post Here to Contact Site Administrators and Moderators

How to change my username?

Moderators, I want to change my username. I tried but unable to find a way to do that. Can you please assist? Thanks & Regards Abedi (1 Reply)
Discussion started by: katherine2008
1 Replies

3. Post Here to Contact Site Administrators and Moderators

Is it possible to change my username?

I know username is the unique id for my unix_dot_com account, but is it possible change it ? should i raise any special request to moderators ? (2 Replies)
Discussion started by: Arun_Linux
2 Replies

4. Post Here to Contact Site Administrators and Moderators

Change Username

Hello, I'd like to change my username if possible. The reason is that it is my actual name, and I'd like to remove it from search engines. If it is possible, I'd like to change it to creeps. Thanks in advance! (1 Reply)
Discussion started by: cezar.elnazli
1 Replies

5. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

6. Post Here to Contact Site Administrators and Moderators

username

Is it possible to change my username in this site or is thre a way to delete my account and then create a new one with a diffrent user name (2 Replies)
Discussion started by: floresr
2 Replies

7. UNIX for Advanced & Expert Users

SFTP username

Hi , I have an issue with sftp username as i have @ character in the username. eg: username=abc@123 when i do as below, sftp abc@123@servername # Its taking only 123@servername . Also, i tried following options, sftp abc\@123@servername sftp 'abc\@123'@servername Please... (2 Replies)
Discussion started by: mohanpadamata
2 Replies

8. Shell Programming and Scripting

Numeric or not?

Is there an easy way using a command or other routine for testing whether an argument on the command line is numeric? Just want to validate... I ran a search and didn't find a similar question.... Thx (3 Replies)
Discussion started by: harrisjl
3 Replies

9. Shell Programming and Scripting

Numeric or not

Is there a simple way of determining whether a command line arguement is numeric or not?? I tried a search and didn't find anything similar... This is the 2nd time I've made this post.... It didn't appear that the first one showed up ?? Sorry if this is a duplicate... (1 Reply)
Discussion started by: harrisjl
1 Replies

10. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies
Login or Register to Ask a Question