Sponsored Content
Top Forums UNIX for Advanced & Expert Users Solaris 10 useradd confusion[solved] Post 302749177 by dokhebi on Thursday 27th of December 2012 07:04:12 PM
Old 12-27-2012
Oracle Solaris 10 useradd confusion[solved]

I installed Solaris 10 (8/11) and added an account for myself. It lives in
Code:
/export/home/{name}

but /etc/passwd shows it is
Code:
/home/{name}

where it seems to be mounted like a filesystem. I tried to
create another account from the command line but it doesn't work the same way.
I can't find anything in the man page for useradd to duplicate this
functionality nor does a search on the internet show anyone else who has made it
work.

Anyone know how to do this?

Thanks in advance,

Edward Hooper

---------- Post updated at 04:04 PM ---------- Previous update was at 02:20 PM ----------

Looks like I get to answer my own question because I did another search and, finally, found the solution.

Create the user account as usual in
Code:
 /export/home:useradd -u <userid> -g <groupid> -m -s <shell> -d \ /export/home/<name> <name>

Then modify the home directory location:
Code:
usermod -d /home/<name> <name>

Add a line to /etc/auto_home so it gets mounted when the user logs in:
Code:
<name> 127.0.0.1:/export/home/<name>

And lastly, just to make certain it all works:
Code:
svcadm enable autofs

And that seems to work for me. Smilie I did notice that after the users log out the home directories are unmounted. Well, most of them. Smilie The account created at startup stays mounted even after I log out so there is something I'm missing. Smilie If anyone knows please let me know. Smilie

Last edited by jim mcnamara; 12-27-2012 at 10:36 PM..
 

10 More Discussions You Might Find Interesting

1. Solaris

audit useradd, userdel on solaris 10

I just want to audit and log to syslog when a user is added, removed or modified from the system. According to the docs I have: #/etc/security/audit_control dir:/var/audit flags:ua minfree:20 naflags:ua plugin:name=audit_syslog.so.1; p_flags=ua But neither syslog nor auditreduce -c ua... (7 Replies)
Discussion started by: glisha
7 Replies

2. Solaris

useradd giving error in solaris 10

Hi, I have installed Solaris 10 in my PC and now installing Oracle10, but while adding a user i am getting following error: useradd -g oinstall -G dba -d /export/home/oracle oracle UX: useradd: ERROR: Inconsistent password files. See pwconv(1M). I have tried pwconv command,... (4 Replies)
Discussion started by: amitanshu.verma
4 Replies

3. UNIX for Advanced & Expert Users

Problem with useradd, -p option in Solaris 10

Good day all. I'm trying to add a user with useradd and the -p option to assign a project name, but the result is that the user is created with an error message: "UX: useradd: user.root name should be all lower case or numeric." The command: useradd -d /export/home/tester -g rtpgrp -G... (2 Replies)
Discussion started by: BRH
2 Replies

4. Shell Programming and Scripting

[SOLVED] Read XML for solaris

Hello I have this script that works fine in Linux But not on sun solaris. Can some one help me with the awk syntax for solaris. Linux: awk -F $0~/DBURL/ {print $7} /tmp/test.xml---------- Post updated at 11:16 AM ---------- Previous update was at 11:05 AM ---------- Sorry guys i got the... (0 Replies)
Discussion started by: pradeepmacha
0 Replies

5. Solaris

audit useradd userdel usermod in solaris 10

the previous thread on this problem was closed with no resolution/workaround that i could see...have there been any breakthroughs? :wall: (0 Replies)
Discussion started by: lisah66
0 Replies

6. Solaris

solaris version confusion

Hello sorry for this stupid question - but i have a Solaris 10 10/08 s10x_u6wos_07b server - and i dont know, what does this versioninfo "10/08 u6" mean - i think it is the version from installdate. but i often installed recommendet patchsets - i think a patchset doesn´t change the... (3 Replies)
Discussion started by: roorbacj
3 Replies

7. Shell Programming and Scripting

[SOLVED] sed -i not available in solaris 5.10

Hi All, i'm writing a script where i have to grep for a pattern and the 3 lines after the pattern and comment them out. Note that i have to do this for multiple files, i am able to grep the pattern and the next 3 lines but since solaris does not recognize the -i option, i was wondering if... (11 Replies)
Discussion started by: Irishboy24
11 Replies

8. Solaris

Solaris 10 - memory management confusion

Hello i have a Problem - my Server is running with following MEM Information (from TOP): Memory: 32G phys mem, 4195M free mem, 10G total swap, 9788M free swap So i think - no problem, 4GB Free, not swapin. So - our programmer wants to know what process taking how much memory - i... (5 Replies)
Discussion started by: roorbacj
5 Replies

9. Shell Programming and Scripting

[Solved] Pdf Printing in Solaris

HI All I need help related to Pdf printing in Solaris.as I print pdf file in solaris it print garbage.how can I print pdf correctly. need help asap. Regards (21 Replies)
Discussion started by: smazshah
21 Replies

10. Solaris

Audit useradd/userdel - Solaris 11

Linux audits in syslog, any time a user is deleted or added. However, I'm running a Solaris11 VM, and find no such entries. How can I enable auditing for useradd and userdel? Oracle's documentation on managing the auditing service, has been of no assistance. Thanks. Customizing What Is... (7 Replies)
Discussion started by: Nvizn
7 Replies
All times are GMT -4. The time now is 11:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy