ASAP Top

YGM72向けアカウントの追加,検索,削除をする方法についてです.

ユーザの追加

解説するまでもない.

@indra

$ su -
# cd openldap/useraccount/bin
# ./adduser

1. ユーザ名を入力

Input user name [default: k001] (Press Enter to apply the default)
特に指定がなければ,何も入力せず Enter (通常はこれでOK)
指定がある場合はユーザ名を入力.

1'. UIDを入力(※通常はスキップ)

Input UID number (Be sure it doesn't overlap with others!)
上でユーザ名を指定すると,UIDを何にするか聞かれる.重複のないように注意.

2. ユーザの名前を入力

Input full name of user (ex) Masahiro Yamada
ユーザの名前をフルネームで入力

3. 初期パスワードを入力

Input initial password
申込用紙に書いてあるパスワードを入力

4. 確認

==================================================
Username: k001
UID: 2001
Full name: Toshiaki Kamata
Initial password: supertossuie123
==================================================

Correct? [y/n]

合ってれば "y" を,修正があれば "n" を入力

※ 修正時

Information to modify: [1-3]
1. Username and UID
2. Full name
3. Initial password

1〜3で指定して修正.そしたらもっかい確認画面が表示されるので,よければ "y" を入力

5. 作成

Generating account...
Enter LDAP Password:
indraのルーパスを入力
done (Log saved in /root/openldap/useraccount/var/log/k001.ldif)

6. 続けて作る or 終了

Create another account? [y/n]
  続けてアカウントを作る場合は "y", 終了するなら "n"
Created 1 account(s).
Ending account generation script.

おしまい

ユーザの検索

ちゃんとアカウントが作成されたかどうかを調べる.

@indra

$ su -
# cd openldap/useraccount/bin
# ./searchuser

Input user name
アカウント名を入力
Enter LDAP Password:
indraのルーパスを入力

ヒットすれば大体以下のようなものが出てくる.

# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (uid=tossuie)
# requesting: ALL
# 

# tossuie, People, cell.st.keio.ac.jp
dn: uid=tossuie,ou=People,dc=cell,dc=st,dc=keio,dc=ac,dc=jp
uid: tossuie
cn: Toshiaki Kamata
objectClass: account
objectClass: posixAccount
objectClass: top
objectClass: shadowAccount
loginShell: /bin/bash
uidNumber: 1002
gidNumber: 10000
homeDirectory: /home/staff/tossuie
userPassword:: e2NyeXB0fSQxJGNsUVI1a21sJGlZNk1GUWsvUTQ5VjFqMVBFWURzbTE=
shadowLastChange: 14746 

# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1

ユーザの削除

よく考えてから消そう.

@indra

$ su -
# cd openldap/useraccount/bin
# ./deluser
 ****** CAUTION!!! CAUTION!!! CAUTION!!! ******
Execution of this script will delete account information of a specified user.

Input user name
削除するユーザ名を入力
Are you sure you want to delete k001? [y/n]
"y" か "n" を入力
Enter LDAP Password:
indraのルーパスを入力
Deleted account k001 successfully.

おしまい.

(2010-11-01 nskw)


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-09-20 (水) 07:32:52